Add the ngrok MCP server to your coding agent.
Agent, meet developer infrastructure. Connect Claude Code, Codex, Cursor, and other MCP clients to your ngrok account. Check usage, inspect endpoints, investigate traffic patterns, and write rules to shape your traffic.
Connect your coding agent
Pick your agent for the exact command or config. Each one opens your browser to sign in to ngrok.
Paste it into your coding agent. It reads our setup guide and follows it.
The second command opens your browser so ngrok knows it’s you.
Needs Codex 0.157.0 or later. The second command opens your browser so ngrok knows it’s you. If add starts a login, cancel it and run login.
~/.cursor/mcp.json
Then connect the server in Cursor’s MCP settings and sign in to ngrok.
~/.gemini/settings.json
Then run /mcp auth ngrok in Gemini CLI.
Run these on the machine that runs Amp, then start Amp to finish signing in.
cline_mcp_settings.json
Add this through Cline’s MCP settings, then use Cline’s authorize action to sign in.
.vscode/mcp.json
Then start the server from that file and sign in to ngrok.
Clients that support OAuth client metadata documents, such as Zed, Goose, and OpenCode, connect with the server URL. In Claude on the web or desktop, add it as a custom connector. ChatGPT can’t connect yet.
MCP URL
Copy this URL into any client that adds MCP servers by URL.
Some tools require authentication. To connect, you’ll need to log in through OAuth.
Install agent skills
Give your agent instructions for sharing local apps, adding authentication, verifying webhooks, and troubleshooting ngrok errors.
Agent skills- expose-localhostPut my app on port 3000 online so a teammate can try it.
- secure-endpointExpose my app on port 3000 and require Google login.
- receive-webhooksVerify Stripe webhooks sent to my local server.
- run-mcp-gatewayLet Claude reach my MCP server on port 8000.
- troubleshoot-ngrokMy ngrok URL says ERR_NGROK_3200. Fix it.
Try a prompt
After connecting to the MCP server, paste a prompt into your agent.
- TrafficIs my API on fire? Show me 500s by hour for the last day.
- Debug/checkout started throwing 502s an hour ago. What changed?
- PolicyRate-limit /api to 100 requests a minute, and make sure I didn’t break anything.
- UsageAm I about to blow through my request limit this month?
- SecurityWho’s hammering /login at 3 a.m., and from where?
More resources for your agent
Give your agent ngrok skills, documentation, and API references.