/mcp path is part of the OAuth resource, so the bare origin https://mcp.ngrok.com doesn’t work.
Access isn’t read-only.
Your AI agent can create, change, and delete resources in your account, such as Cloud Endpoints, domains, IP policies, and secrets.
The AI agent acts as you, with your role’s permissions, so check what it’s about to do before you approve a tool call.
See Make changes safely.
This page covers ngrok’s own MCP server.
To put your own MCP server online with ngrok, see the guide on using ngrok as an MCP gateway.
Quickstart
Most clients sign in with OAuth. You add the server, then sign in to ngrok in your browser and approve the consent screen. You never paste a token into your AI agent.- Claude Code
- Codex
- Cursor
- Gemini CLI
- Amp
- Cline
- Pi
- VS Code
--client-id or --callback-port.
Claude Code finds its client through server discovery.Other clients
If your client supports OAuth client ID metadata documents, addhttps://mcp.ngrok.com/mcp as a remote HTTP server.
Zed, Goose, and OpenCode work this way.
In Claude on the web, Claude Desktop, and Cowork, go to Customize > Connectors and add a custom connector with https://mcp.ngrok.com/mcp.
Then connect it to sign in.
On Team and Enterprise plans, an owner adds the connector in Organization settings > Connectors.
Clients without OAuth
If your client can’t sign in with OAuth, use a personal access token (PAT) instead:Create a personal access token
endpoints:read, let the AI agent look things up.
Write scopes, such as endpoints:write and ip-policies:write, let it make changes.
To see which tools each scope unlocks, see Tools and scopes.
Copy the token right away.
It starts with ngrok_pat_ and the dashboard shows it only once.Send the token as a bearer header
https://mcp.ngrok.com/mcp:headers object next to url.Check that it works
After you sign in, confirm that your client sees the ngrok tools:- Claude Code: run
/mcpand selectngrok. - Codex: run
codex mcp list. - Pi: run
pi mcp list. - Any client: ask your AI agent “What ngrok tools do you have?”
- Endpoints, ngrok agents, and Traffic Inspector traffic.
- Gateway resources, such as domains, TCP addresses, IP policies, certificates, vaults, and event destinations.
- Your account, team, credentials, usage, and limits.
- AI Gateway models, costs, requests, and captures. See AI Gateway tools.
- AI Gateway setup, such as access keys, providers, virtual models, and firewall policies.
- The ngrok documentation.
- Cloud Endpoints, including their URL, bindings, pooling, and Traffic Policy.
- Reserved domains and TCP addresses.
- IP policies and their allow and deny rules.
- Vaults and secrets.
- Credentials: it can revoke authtokens, API keys, and SSH keys.
- Team: it can invite a team member by email and cancel a pending invitation.
- Traffic Policy: it can write a policy and validate it before applying it.
- AI Gateway setup: access configs, access keys, custom providers, provider keys, virtual models, firewall policies, and gateway settings. Changes apply to live traffic right away.
What you can ask
These examples show what a conversation with the ngrok MCP server looks like. Your AI agent picks the tools, so the exact steps can differ. For more prompts you can copy, grouped by job, see Example prompts.Show me the HTTP 500s on my endpoints by hour for the last 24 hours, in Pacific time
Show me the HTTP 500s on my endpoints by hour for the last 24 hours, in Pacific time
I got an ngrok error page with request ID req_0a1b2c3d. What happened?
I got an ngrok error page with request ID req_0a1b2c3d. What happened?
ERR_NGROK code only when full capture is turned on.
Without full capture, paste the error code from the error page too, so the AI agent doesn’t blame your app for an ngrok error.
Follow up with “Which connection carried that request?” to see the client, timing, bytes, TLS details, and failure of the connection it used.Am I being rate limited? Why are my requests failing?
Am I being rate limited? Why are my requests failing?
Rate limit /api and every path under /api/ on my Cloud Endpoint to 100 requests per minute per IP
Rate limit /api and every path under /api/ on my Cloud Endpoint to 100 requests per minute per IP
rate-limit action docs, writes the policy, and validates it.
The rule matches /api and paths that start with /api/, such as /api/users, but not /apiv2.
If you mean only the exact path /api, say so.
If validation fails, it fixes the errors and validates again.
Then it asks to update your Cloud Endpoint’s Traffic Policy.Are my event destinations failing to deliver logs?
Are my event destinations failing to deliver logs?
Who on my team has API keys? Revoke the ones that belong to people who left
Who on my team has API keys? Revoke the ones that belong to people who left
Make changes safely
The MCP server marks each tool as read-only or as one that makes changes, and marks deletes and some updates to live configuration as destructive. Most clients use these markers to ask you before the AI agent runs a tool that changes your account. Keep those prompts on, and read what the AI agent is about to do before you approve it. For how each tool is marked and the scope it needs, see Tools and scopes. To keep an AI agent read-only, connect with a personal access token that has only read scopes. See Clients without OAuth.Troubleshooting
- “Got new credentials, but ngrok rejected them”: Your account doesn’t have access to the MCP server. Contact ngrok support.
- Sign-in fails or the server isn’t found: Check that the URL ends in
/mcp. - Pi fails with “Authorization server does not support dynamic client registration”: Set
oauth.clientRegistrationtocimdfor the server in~/.pi/agent/mcp.json, then runpi mcp login ngrokagain. - Claude Code uses an old callback port: Run
claude mcp remove ngrok --scope user, then add the server again. - A PAT is rejected: The token is invalid, expired, or revoked.
Create a new one and update the
Authorizationheader.
Related resources
- Traffic Inspector: The traffic data behind most questions.
- Traffic Policy: The rules your AI agent can write and validate.
- IP policies: How deny and allow rules apply to endpoints.
- Role-based access control: What your role allows the AI agent to do.
- Use ngrok as an MCP gateway: Put your own MCP server online with ngrok.