[go: up one dir, main page]

Skip to main content
MCP server

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.

Read the docs

Connect your coding agent

Pick your agent for the exact command or config. Each one opens your browser to sign in to ngrok.

Read https://ngrok.com/agent-setup/prompt.md and follow it
to get my app online with ngrok.

Paste it into your coding agent. It reads our setup guide and follows it.

claude mcp add --transport http --scope user ngrok \
  https://mcp.ngrok.com/mcp
claude mcp login ngrok

The second command opens your browser so ngrok knows it’s you.

codex mcp add ngrok --url https://mcp.ngrok.com/mcp
codex mcp login ngrok

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

{
  "mcpServers": {
    "ngrok": {
      "url": "https://mcp.ngrok.com/mcp",
      "auth": {
        "CLIENT_ID": "iamcli_3KeK8d8sO4d9RArARx7RFzcTVtO",
        "scopes": ["ship:apps:read", "ship:apps:write", "integrations:read", "events:read", "team:read", "service-users:read", "api-keys:read", "ssh-credentials:read", "credentials:read", "ip-policies:read", "tls-certificates:read", "certificate-authorities:read", "vaults:read", "app-users:read", "app-sessions:read", "kubernetes-operators:read", "tcp-addrs:read", "tunnel-sessions:read", "domains:read", "endpoints:read", "ip-policies:write", "tcp-addrs:write", "domains:write", "credentials:write", "api-keys:write", "ssh-credentials:write", "vaults:write", "endpoints:write", "ngrok:invitations:write", "ngrok:usage:read", "ngrok:limits:read"]
      }
    }
  }
}

Then connect the server in Cursor’s MCP settings and sign in to ngrok.

~/.gemini/settings.json

{
  "mcpServers": {
    "ngrok": {
      "httpUrl": "https://mcp.ngrok.com/mcp",
      "oauth": {
        "enabled": true,
        "clientId": "iamcli_3KeK8docLctYxdqmXkXUIBSFhMo",
        "scopes": ["ship:apps:read", "ship:apps:write", "integrations:read", "events:read", "team:read", "service-users:read", "api-keys:read", "ssh-credentials:read", "credentials:read", "ip-policies:read", "tls-certificates:read", "certificate-authorities:read", "vaults:read", "app-users:read", "app-sessions:read", "kubernetes-operators:read", "tcp-addrs:read", "tunnel-sessions:read", "domains:read", "endpoints:read", "ip-policies:write", "tcp-addrs:write", "domains:write", "credentials:write", "api-keys:write", "ssh-credentials:write", "vaults:write", "endpoints:write", "ngrok:invitations:write", "ngrok:usage:read", "ngrok:limits:read"]
      }
    }
  }
}

Then run /mcp auth ngrok in Gemini CLI.

amp mcp add ngrok https://mcp.ngrok.com/mcp
amp mcp oauth login ngrok \
  --server-url https://mcp.ngrok.com/mcp \
  --client-id iamcli_3KeO0uXWr4mqAa5QKHWzGNdqtv0 \
  --scopes ship:apps:read,ship:apps:write,integrations:read,events:read,team:read,service-users:read,api-keys:read,ssh-credentials:read,credentials:read,ip-policies:read,tls-certificates:read,certificate-authorities:read,vaults:read,app-users:read,app-sessions:read,kubernetes-operators:read,tcp-addrs:read,tunnel-sessions:read,domains:read,endpoints:read,ip-policies:write,tcp-addrs:write,domains:write,credentials:write,api-keys:write,ssh-credentials:write,vaults:write,endpoints:write,ngrok:invitations:write,ngrok:usage:read,ngrok:limits:read

Run these on the machine that runs Amp, then start Amp to finish signing in.

cline_mcp_settings.json

{
  "mcpServers": {
    "ngrok": {
      "type": "streamableHttp",
      "url": "https://mcp.ngrok.com/mcp",
      "oauthClient": {
        "clientId": "iamcli_3KeO0voSIkw55lArUFbxy1fUnqM"
      }
    }
  }
}

Add this through Cline’s MCP settings, then use Cline’s authorize action to sign in.

.vscode/mcp.json

{
  "servers": {
    "ngrok": {
      "type": "http",
      "url": "https://mcp.ngrok.com/mcp"
    }
  }
}

Then start the server from that file and sign in to ngrok.

https://mcp.ngrok.com/mcp

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.

https://mcp.ngrok.com/mcp

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
npx skills add ngrok/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.