Coding agent, meet ngrok: the ngrok MCP server is live
Your coding agent knows your code. You know what needs to happen between your code and the internet. Now you can just say it, in your own words, and watch it turn into ngrok. The ngrok MCP server is here, and it works on every plan, even free.
Let me show you what it can do. I recently launched gpu.compare, a site for finding GPU prices and availability. It’s getting real traffic, and ngrok sits in front of it. Here are eight things I asked my coding agent to do between launch and today, in the order I asked them.
- Can you remove the OAuth on gpu.compare and make it live? Please and thank you? Read gpu.compare: Google login, @ngrok.com emails only. Traced the login to the config that deploys the site. Removed the login there, so a deploy can't restore it. Loaded 10 pages with no login: all 200. Your coding agent: Done. gpu.compare is public, and the next deploy won't bring the login back.
- How much traffic has hit gpu.compare since we removed OAuth? Anything interesting? Found when the login came off: Nov 6, 23:16 UTC. Read 3 days of traffic: 1,393 requests from 351 IPs. Grouped it by status, path, country, and IP. Saw AI agents read /llms.txt and the .md pages. Found 35 probes for /wp-admin/install.php. Your coding agent: 1,393 requests, mostly bots. AI agents read the Markdown pages, and scanners probe for WordPress.
- Block those scanner requests at ngrok. Read the config that deploys gpu.compare. Wrote a rule for .php, /wp-, /.env, /.git, and Joomla paths. Ran it through the validator: valid. Saved it ahead of the app, where deploys keep it. Loaded 6 probe paths: 404. Real pages: 200. Your coding agent: Done. Scanners get an empty 404 from ngrok, so they can't tell they're blocked. Real pages still load.
- Confirm the blocks work. Read traffic to probe paths since the rule went live. Found 8 probes: all got a 404 from ngrok. Read the app's own traffic: none of the 8 reached it. Saw real pages and health checks still reach it. Your coding agent: They work. All 8 probes stopped at ngrok, but they were my own tests. No real scanner has come by yet.
- Hey big dawg, rate-limit gpu.compare to 120 requests per minute per IP, skipping /assets/. First check that no real visitor or crawler would have hit that limit, keep the scanner block, and confirm pages still load. Read 3 days of traffic: the busiest IP sent 62 requests. Read the docs for the rate-limit action. Wrote a limit of 120 a minute per IP that skips /assets/. Ran it through the validator: valid. Saved it after the scanner block, where deploys keep it. Loaded the homepage and its assets: 200. Probes: 404. Your coding agent: Done. Nobody came close: the busiest IP sent 62 requests in 3 days. Anyone over the limit gets a 429.
- Pass each visitor's country to gpu.compare so it can show the nearest GPU regions first. Read gpu.compare and its two traffic rules. Read the docs for geo variables and add-headers. Wrote a rule that sets a gpu_country cookie. Sorted the catalog and provider pages by distance. Ran the rule through the validator: valid. Opened the site as Finland and the US: nearest first. Your coding agent: Ready. The rule is valid, but saving it starts a production rollout, so I'll wait for your go-ahead.
- Yes, go ahead and apply the policy. You're doing great. Read the deploy config again so nothing else changes. Saved the cookie rule next to the block and the limit. Loaded gpu.compare: set-cookie gpu_country=US. Loaded /assets/: no cookie, as planned. Your coding agent: Thanks. Every visitor now gets a country cookie. The site sorts by it once the code ships.
- Read back to me all the effective Traffic Policy rules we added to gpu.compare, I wanna see the whole kit and caboodle Read the live policy on gpu.compare. Found 4 rules, in the order they run. Noted that the forward rule changes on each deploy. Your coding agent: Four rules: the scanner block, the rate limit, the forward to the app, and the country cookie.
- Should I make gpu.compare the headline story for our MCP server launch? y/y Your coding agent: y
Those eight sentences become 44 tool calls, 6 docs lookups, and 4 changes to my account. Take the rate limit I set on gpu.compare to stop overeager bots and scrapers. To cap every IP at 120 requests per minute, my coding agent:
- Pulled the busiest source IPs to check that no real visitor would hit the limit
- Looked up the rate-limit action docs
- Drafted a new rule
- Ran it through the Traffic Policy validator
- Applied everything to my endpoint
- Checked that pages still load
And that was just one of the jobs I threw at it.
I knew the jobs I wanted done, and instead of sussing out each one myself, I handed them to my coding agent and watched… or, more accurately, context-switched to a different thread.
Try it yourself
Connect your coding agent to the ngrok MCP server at:
We have setup instructions for your favorite coding agent to get you started. You’ll see a consent screen to choose exactly what you want your coding agent to be able to do. We also have docs for how it works and a video from Ryan that walks through it end to end.
Once you’re ready to send your first prompt, might I recommend one of these?
What tricks did you just learn from the ngrok MCP?
Get my service on port 8080 online with ngrok.
Tell me about the traffic hitting one of my services.
We have plenty of example prompts to keep your coding agent busy.
Why MCP, why now?
A few months ago, a lot of these prompts would have gone sideways. When I asked coding agents to write rules like rate limits or scanner-blockers, they often misconfigured Traffic Policy by making up actions and falling over.
The models have ngrok http 8080 on lock, but have a ways to go when it comes to all the ways ngrok handles production traffic today. That leaves you clicking through the dashboard, pasting an API key into chat and letting it script against our APIs, and learning every nuance of how you configure ngrok with CLI config and Traffic Policy YAML.
You can big dawg a coding agent and it’ll build you anything you want with relative ease. That also means you now expect it to handle the connectivity: the domain, the auth, and the traffic rules that shape how people (or bots, so many bots) reach it. A developer tool that doesn’t let you add connectivity to the services you’ve built is probably one you won’t use much longer.
ngrok’s MCP server gives your coding agent the ability to add connectivity to any service, anywhere, with three things it didn’t have before:
- Tool descriptions, so it knows what it can ask ngrok for and with which arguments, instead of guessing at API routes.
docs_search, so it reads today’s docs instead of whichever ngrok it memorized in training.- The Traffic Policy validator, so it checks its own YAML before you see it. Every rule my coding agent wrote in the examples I started with went through it before it touched gpu.compare.
That’s the why now.
But a coding agent that can drive ngrok can also drive somewhere you didn’t mean to go. The good news is that you decide what your agent can do, and ngrok enforces it.
You decide exactly what your coding agent can do
To do what the ngrok MCP does without the MCP, you’d paste an API key into your coding agent. That key works on your whole account, and it keeps working long after you forget you pasted it. If you’ve left an ngrok API key sitting in your environment for your agent, the MCP server lets you nix it.
How? Well, it doesn’t accept API keys or authtokens at all. When you connect, your browser opens a consent screen that lists every scope in plain language. You choose between where the MCP server can write and where you’d like it to only read, and new scopes you haven’t yet approved get marked as, well, new. I personally allowed my coding agent to write to my account to apply the 120-per-minute rate limit, for example, but if all you wanted to do was analyze traffic, that only requires reads.
With your approval, your coding agent gets a token that:
- Expires after 15 minutes, and your agent quietly refreshes it while you work. After a week, you approve the connection again.
- Only works with the ngrok MCP.
- Can’t do more than your own role in your account allows.
- Gets checked by ngrok on every call and logged just like any changes you might’ve previously made through our API or dashboard.
The MCP server never decides what your coding agent can do. Every ngrok service checks the token, and if the tool call hasn’t declared which scopes it needs, ngrok will refuse the call. A bug in a tool or a wayward prompt can’t go further than you approved on the consent screen… but as with all write operations with coding agents, check their work, why don’t you?
What the MCP works with today, and what comes next
One thing I want to clarify: the MCP doesn’t replace the ngrok CLI. The MCP server works on your account and your configuration, but the CLI still creates the secure tunnels that get your services online.
That’s where our ngrok skills come into play. They help your coding agent learn the latest and greatest about driving the CLI, like if you wanted to start with a prompt such as get my React app on 5173 online with ngrok (big dawg). They’re available now, and we’ll expand the repertoire over the coming weeks and months.
Turning back to the core MCP experience, we’re also building:
- An
ngrok setup ai-agentssubcommand to set up your coding agents quickly. - More tools, including ones for your inference metrics and your AI Gateway.
- Support for even more harnesses.
- Connectors in official marketplaces, like Claude’s, so you can add them to desktop apps in a few clicks.
You can also help directly influence this list, and the MCP server makes that easier than ever.
A prompt for your thoughts
Are we missing a tool? Wish the MCP worked in your favorite harness? Did you try to implement something and your coding agent still fell over? Share your feedback, or the results of its attempts, through the MCP server itself. We get your note and the agent’s summary of your thread (not your whole context window), and we’ll use all of these feedback tool calls to make the MCP better.
For example:
Tell the ngrok team I want <YOUR_IDEA_HERE>.
ngrok, in your own words
For years, using ngrok meant learning ngrok. There are agent configs (multiple versions!), Traffic Policy rabbit holes, and where to find which setting in the dashboard. That’s now changed. I took gpu.compare from an OAuth login wall for ngrok.com emails to a scanner-blocked, rate-limited, region-aware public website in eight sentences, and I didn’t write a line of YAML myself.
Your turn. All of that, and plenty more, is one sentence away. See what’s running, read your traffic, write a rule, set things up, check your account. Pick one below and get after it.
Coding agent, meet ngrok. Have fun.
Frequently asked questions
Yes. ngrok launched its MCP server on November 16, 2026. It's generally available on every ngrok plan, including the free plan, and it can do anything your plan allows.
Connect your coding agent to https://mcp.ngrok.com/mcp over the streamable HTTP transport. Get the setup commands and config for each client at https://ngrok.com/mcp.
Add https://mcp.ngrok.com/mcp as an HTTP MCP server in your coding agent, then sign in. Your browser opens a consent screen where you approve what the agent can do. For Claude Code, run claude mcp add --transport http --scope user ngrok https://mcp.ngrok.com/mcp, then claude mcp login ngrok. Setup for every other client is at https://ngrok.com/mcp.
It lets your coding agent:
- List and explain your endpoints, agents, domains, and other running resources.
- Query and analyze HTTP and TCP traffic from Traffic Inspector.
- Write Traffic Policy rules, check them with the validator, and save them to your cloud endpoints.
- Report your usage, team members, API keys, and other account details.
- Search the current ngrok docs.
- Send feedback to the ngrok team.
Any MCP client that connects to remote HTTP servers. The setup page at https://ngrok.com/mcp covers Claude Code, Codex, Cursor, Gemini CLI, Amp, Cline, and VS Code. Zed, Goose, and OpenCode also work. In Claude on the web, Claude Desktop, and Cowork, add the server URL as a custom connector. ChatGPT can't connect yet.
No. It doesn't accept API keys or authtokens. Most clients sign in with OAuth, and you approve a list of scopes. The agent gets a token that works only with the ngrok MCP server, expires after 15 minutes, and refreshes while you work. After a week, you approve the connection again. A client without OAuth can send a personal access token instead. Either way, the agent can't do more than your own role in your ngrok account allows.
Yes, within the scopes you approve. It can update cloud endpoints and their Traffic Policy, reserve domains and TCP addresses, manage IP policies, vaults, and secrets, and revoke authtokens, API keys, and SSH keys. Most clients ask you to approve each change first. For read-only access, connect with a personal access token that has only read scopes. The MCP server can't edit your ngrok agent's local config file, but your coding agent can edit that file itself.
At https://ngrok.com/docs/mcp-server. They list every client's setup, every tool, and every scope. Example prompts to try are at https://ngrok.com/docs/mcp-server/prompts.
Answers come from ngrok.com and the ngrok docs, and can be wrong. Check the linked pages before you rely on one.