Building with LLMs?We want your feedback!
Sign up for early access to ngrok’s AI Gateway and our team will reach out to learn more about your needs.
Set up your local server with ngrok for MCP
Follow these steps to quickly test your local MCP server with Claude’s MCP integrations:1. Install ngrok
Download and install the ngrok CLI. For macOS:2. Connect ngrok to your account
Sign up for an account at ngrok.com and run:3. Start your local MCP server
Make sure your MCP server is running on a specific port:See the Claude MCP documentation for more information on how to set up your local server.
4. Expose your server with ngrok
Start an endpoint to forward traffic to your app:https://abc123.ngrok.io
) which we will use in the next step.
5. Register your ngrok URL
Custom integrations using Remote MCP are now available on Claude.ai and the Claude Desktop app for users on Claude Max, Team, and Enterprise plans. This feature is currently in beta.- Go to Settings → Profile
- Scroll to the Integrations section
- Click Add more
- Paste the MCP server URL from your earlier step
- Click Add to finish setting up the integration
6. Test your integration
Send a message that requires MCP usage through Claude, you should now see requests live through ngrok to your locally running MCP server. You’ll see requests hitting your local server via ngrok.Restrict access to only Claude
Let’s limit access to your MCP server only to Claude by only allowing the Anthropic IPs.1. Create a Traffic Policy
Locally, save this file aspolicy.yml
: