Public Tunnel: Fixed URL for Your Brain
Your ModusBrain MCP server and voice agent need public URLs so Claude Desktop, Perplexity, and Twilio can reach them. ngrok gives you a fixed domain that never changes.IMPORTANT: Instructions for the Agent
You are the installer. This is foundational infrastructure. Other recipes (voice-to-brain, remote MCP) depend on this. Set it up first. Why this matters:- Voice-to-brain needs a public URL for Twilio webhooks
- Remote MCP needs a public URL for Claude Desktop and Perplexity
- Free ngrok URLs change on every restart, breaking all integrations
- Hobby tier ($8/mo) gives a fixed domain. Set it once, never touch it again.
Architecture
Setup Flow
Step 1: Create ngrok Account + Get Hobby Tier
Tell the user: “I need you to create an ngrok account. I strongly recommend Hobby tier ($8/mo) for a fixed domain that never changes. Without it, every restart breaks your Twilio webhooks and Claude Desktop connection.- Go to https://dashboard.ngrok.com/signup (sign up)
- Go to https://dashboard.ngrok.com/billing and upgrade to Hobby ($8/mo)
- Go to https://dashboard.ngrok.com/get-started/your-authtoken
- Copy your Authtoken and paste it to me”
- Mac:
brew install ngrok - Linux:
curl -sL https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz | tar xz -C /usr/local/bin
Step 2: Claim a Fixed Domain
Tell the user: “1. Go to https://dashboard.ngrok.com/domains 2. Click ’+ New Domain’ 3. Choose a name (e.g.,your-brain.ngrok.app)
4. Click ‘Create’
5. Tell me the domain name you chose”
If user stayed on free tier (no fixed domain), note that URLs will change on
restart and the watchdog will need to update Twilio. Recommend upgrading later.
Step 3: Start the Tunnel
Step 4: Set Up Watchdog
The tunnel must auto-restart if it dies. Create a watchdog:Step 5: Log Setup Completion
Connecting AI Clients (after tunnel is running)
Claude Code:https://your-brain.ngrok.app/mcp
IMPORTANT: Claude Desktop does NOT support remote MCP via JSON config.
You MUST use Settings > Integrations in the GUI. This is the #1 setup failure.
Perplexity Computer:
Settings > Connectors > Add Remote MCP.
URL: https://your-brain.ngrok.app/mcp
Implementation Guide
The Watchdog Pattern (from production)
ngrok Inspect Dashboard
http://localhost:4040 shows all requests flowing through the tunnel. Use this
to debug MCP connection issues (see request/response headers, latency, errors).
Tricky Spots
-
Claude Desktop requires GUI setup. Adding remote MCP servers via
claude_desktop_config.jsondoes NOT work. It silently fails with no error. You MUST use Settings > Integrations. - Free tier URLs are ephemeral. They change on every ngrok restart. The watchdog handles Twilio, but Claude Desktop and Perplexity must be manually reconfigured. This is why Hobby ($8/mo) is worth it.
-
One domain, multiple services. Hobby gives 1 free domain. Route by path
(
/mcp,/voice) on one domain, or pay $8/mo more for a second domain. - The watchdog must run on startup. If the machine reboots, ngrok won’t auto-start unless you have a watchdog cron or systemd service.
How to Verify
- Start tunnel. Visit
https://your-brain.ngrok.appin a browser. You should see a response (health check or default page). - From Claude Desktop, run
modusbrain search "test". Results should come back. - Kill ngrok. Wait 2 minutes. Check the watchdog restarted it.
- From a different device (phone), access the same URL. Verify it works.
Cost Estimate
Part of the ModusBrain Skillpack. See also: Voice-to-Brain, Remote MCP Deployment