Local Development
Test your widgets in real AI hosts as you build. PancakeJS gives you a local development server with hot reload that works directly with ChatGPT, Claude, and other platforms.
Start the Dev Server
pnpm devThis starts a local server (default: http://localhost:3000) with hot module reloading.
Get a Public URL
To test in ChatGPT or other external AI hosts, you need a public URL. Use a tunnel service:
Using ngrok
# Install ngrok if you haven't
brew install ngrok
# Start a tunnel to your local server
ngrok http 3000This gives you a public URL like https://abc123.ngrok.io.
Using Cloudflare Tunnel
# Install cloudflared if you haven't
brew install cloudflared
# Start a tunnel
cloudflared tunnel --url http://localhost:3000Connect to ChatGPT
- Go to ChatGPT
- Open a Custom GPT or use the API
- Add your tunnel URL as the action endpoint
- Your widget will now render live in ChatGPT
Every time you save a file, your widget updates instantly in ChatGPT. No redeploy needed.
Connect to Claude
For Claude Desktop with MCP:
- Open your Claude Desktop config (
~/Library/Application Support/Claude/claude_desktop_config.json) - Add your local server:
{
"mcpServers": {
"my-app": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3000/mcp"]
}
}
}- Restart Claude Desktop
- Your tools and widgets are now available
Use the Inspector
PancakeJS includes a built-in inspector for testing without external hosts:
http://localhost:3000/_inspectorThe inspector lets you:
- Test all your tools
- Preview widget rendering
- See request/response payloads
- Debug issues quickly
Hot Reload in Action
The dev server watches for file changes and:
- Recompiles your widgets instantly
- Notifies connected clients
- Updates the UI without a full refresh
This means you can edit your React components and see them update live in ChatGPT or Claude within milliseconds.
Troubleshooting
Port already in use
# Find what's using port 3000
lsof -i :3000
# Or use a different port
PORT=3001 pnpm devTunnel not working
Make sure your firewall allows the connection. If using ngrok, check your dashboard for any blocked requests.
Widget not updating
- Check the terminal for compilation errors
- Hard refresh the AI host (Cmd+Shift+R)
- Check the browser console for errors
Next Steps
- Building Widgets: Create interactive components
- Deploy to Production: Ship your app
- Troubleshooting: Common issues and fixes