Skip to main content
Investi connects to MCP servers over the internet: you give it an https URL and Investi calls that URL from its own servers on every chat turn. A server running on your own computer isn’t reachable that way, for two reasons:
  1. How it talks. Most local servers are designed to be launched as a program on your machine (the command and args config you see in most GitHub READMEs). Investi runs in the cloud and can’t start programs on your computer; it can only call servers over HTTP.
  2. Where it lives. Even a local server that speaks HTTP lives at localhost, an address that only means something on your own machine. Investi rejects http://localhost:8000/mcp outright; it requires https and an address that’s reachable from the internet.
There are three ways around this, and most people want the first one.

Start here: which path is yours?

The question that decides it: does the server need your machine specifically? If it just calls somebody’s API, running it on your laptop buys you nothing and costs you a tunnel, an always-on computer, and a security risk. Path C is the last resort, for when the data or the program genuinely lives on your computer.

Path A: use a server somebody else already hosts

Nothing to install, nothing to keep running, works when your laptop is closed. 1. Check for an official remote server. Notion, Linear, GitHub, Stripe, Sentry, Atlassian, Cloudflare and many others publish a hosted MCP URL, usually in their docs under “MCP” or “AI integrations”. Paste it into Investi and, if it asks you to sign in, use the Connect button. This is the best option when it exists: no third party in the middle. 2. Or use a connector gateway. These services already run connectors to thousands of apps and give you a single URL. Nothing is deployed and no code is involved: Before you pick one: you’re trusting that service with whatever it touches, including any accounts you connect through it. That’s a reasonable trade for a documentation search tool and a poor one for your email. These are third parties Investi has no relationship with. Treat them the way you’d treat any service you hand an API key to, and prefer an official vendor URL when one exists. What Path A can’t do: run a server that nobody hosts (that’s Path B), or reach files and programs on your computer (that’s Path C).

Path B: deploy the server instead of tunnelling it

If the server is just code, whether you wrote it or found it on GitHub, and it doesn’t need anything on your computer, deploy it once and you’re done forever. No tunnel, no bridge, no laptop that has to stay awake, and a URL that doesn’t move. This is strictly better than Path C whenever it’s an option. Whichever you pick, don’t leave it open to the world. A deployed MCP server on a public URL is reachable by anyone who finds it, exactly like a tunnel is. Use the platform’s auth if it has one (FastMCP Cloud and Smithery both do), or require a token header of your own and add it in Investi under Headers, the same idea as step 3 below.

Path C: bridge and tunnel your own machine

You have two problems to fix, so the setup has two layers. A bridge makes your server speak HTTP, and a tunnel gives it an address on the internet:
Before you start, know what you’re signing up for: two terminal windows that stay open, a computer that has to stay awake, and a server of yours exposed to the internet. Read the security section first. If the server can read your files or run commands, skipping step 3 leaves a hole in your machine.

Step 1: get your server speaking HTTP on a local port

If your server already supports HTTP

Many servers accept a transport flag. Run it in Streamable HTTP mode on a spare port and note the path it serves (usually /mcp):
Confirm it’s up, then go to step 2:

If your server is stdio-only (the common case)

Use supergateway, a small free tool that wraps a launch-a-program server in an HTTP endpoint. Take the launch command from the server’s README and pass it as one quoted string to --stdio. A README config like this:
becomes this, with command and args joined by spaces:
Your server is now at http://localhost:8765/mcp. Leave this terminal running. Two notes:
  • Add --stateful --sessionTimeout 60000 if your server keeps state between tool calls (a browser session, a database connection). The default starts a fresh copy of the server for every request, which is more robust but slower and forgetful.
  • Python servers work the same way: --stdio "uvx mcp-server-git".

Step 2: put it on the internet with ngrok

A tunnel takes what’s running on a port on your machine and gives it a public web address. We recommend ngrok for this. Its free tier gives you a stable URL that doesn’t change between restarts, and endpoints that stay online indefinitely. Both matter here, because the URL is saved in your Investi settings, and a URL that rotates means reconnecting every day. It also lets you require a secret on every request (step 3) without writing any code. See other tunnel providers for Tailscale and Cloudflare.
  1. Install and authenticate (a free account is required):
  1. Find your permanent domain. The free plan assigns your account one dev domain, like detract-congress-reviver.ngrok-free.dev. It’s shown in the ngrok dashboard, and in the Forwarding line the first time you run a tunnel.
  2. Start the tunnel, pinned to that domain so the URL is identical every time:
Your MCP endpoint is now https://your-name.ngrok-free.dev/mcp. Don’t connect it yet. Right now anyone who guesses that URL has your tools. Free-tier ceilings are 20,000 requests and 1 GB of traffic per month, and 3 online endpoints. Ordinary chat use stays well inside that.

Step 3: require a secret header

The tunnel URL is public and unauthenticated by default. If you’ve exposed a filesystem or shell server, anyone who finds the URL can read and write your files. Fix it by making ngrok reject every request that doesn’t carry a secret you choose. Generate a token:
Save this as mcp-policy.yml, pasting your token in place of <YOUR-TOKEN>:
Restart the tunnel with the policy attached:
Verify that the lock works. This must return 401:
Requests without the header are now rejected at ngrok’s edge, before they ever reach your machine.

Step 4: connect it in Investi

In Investi, add an MCP server with: Investi probes the server immediately (up to 15 seconds) and shows the result:
  • Connected: you’ll see the tool list. You’re done; the analyst can use those tools on every turn.
  • Needs auth: the token is missing or doesn’t match. Re-check step 3.
  • Error: the URL is unreachable or isn’t an MCP endpoint. See troubleshooting.
Your token is encrypted at rest and never shown again; you’ll see a “credentials stored” state instead. You can connect up to 20 MCP servers.

Keeping it running

Both processes, the bridge and the tunnel, must stay up. Close either terminal, put the laptop to sleep, or change networks, and the server goes offline. That’s a soft failure, not a broken chat: Investi health-checks each server at the start of every turn, skips any that are down (marking them error), and tells you which ones it skipped. When your machine comes back, the server reconnects itself on the next turn and flips back to connected, with no re-testing needed. Only a needs_auth state requires you to do something. For something you use daily, run both as background services rather than in terminals: ngrok has a background service mode, and on macOS launchd (or pm2 for the bridge) will keep the gateway alive across reboots. The real fix, if this becomes permanent: stop tunnelling. If the server didn’t actually need your files after all, go to Path A or Path B. Then there’s no laptop in the path, no bridge to babysit, and no request quota. A tunnel is the right tool for trying something out, not for infrastructure you depend on.

Other tunnel providers

We walk through ngrok because it’s the only free option that gives you both a URL that survives a restart and a way to check a secret before traffic reaches your machine. If you’d rather use something else, here’s the honest comparison. Note that swapping the tunnel means solving the token problem yourself.

Troubleshooting

Match the message Investi shows against this table. Two more, specific to this setup:
  • An HTML page or a JSON parse error instead of a tool list. ngrok’s free tier shows a browser warning page on some traffic. It doesn’t normally affect MCP clients, but if you hit it, add a second header in Investi: ngrok-skip-browser-warning: 1.
  • Using SSE instead of Streamable HTTP. Investi picks the transport from the URL: a path ending in /sse means the older SSE transport, anything else means Streamable HTTP. So the URL’s path has to match how your server is actually running: /mcp for --outputTransport streamableHttp, /sse for supergateway’s default SSE mode.

Security

On Path A, the thing to weigh is who you’re trusting: an official vendor URL is about as safe as using that vendor’s app, while a connector gateway is a third party sitting between Investi and your accounts. Prefer the official URL when one exists, and where a gateway lets you choose which actions to expose (Zapier does), enable only the ones you need. On Path B, remember that deploying doesn’t make a server private. Turn on the platform’s authentication or require your own token header. An open URL is an open URL whether it’s a tunnel or a Worker. Path C is the one that deserves real care, because you’re handing an AI agent live access to your computer:
  • Never run the tunnel without the token check from step 3. An open tunnel to a filesystem server is a remote-access hole in your machine.
  • Scope the server as narrowly as it allows. Point a filesystem server at one project directory, not your home folder. Prefer read-only modes.
  • Think about what the tools can destroy. write_file, move_file, and anything shell-shaped can cause real damage if the analyst misfires. Investi prefixes MCP tool names with the server name (filesystem_write_file) in the chat so you can see exactly which server a call went to.
  • Rotate the token by editing mcp-policy.yml, restarting the tunnel, and updating the header in Investi.
  • Disconnect when you’re done experimenting. Deleting the server in Investi also deletes the stored credentials; stop the tunnel too.
Investi never sees your MCP server’s own upstream API keys. Those stay in the environment where you launch the server.