Run the MCP server over HTTP, safely

Most MCP clients start requestarium mcp as a local process and talk to it over stdio. Nothing listens on the network. Some setups can't do that: a cloud agent, a team machine several people's agents share, a web tool. For those, the CLI can serve MCP over HTTP. It's a few flags, and a few things to get right.

Start it

Terminal
export REQUESTARIUM_MCP_TOKEN="$(openssl rand -base64 32)"
requestarium mcp --http --port 8765

The endpoint is http://127.0.0.1:8765/mcp. Without REQUESTARIUM_MCP_TOKEN, the CLI makes a random token and prints it on start. A client that takes a URL connects like this:

JSON
{
  "mcpServers": {
    "requestarium": {
      "type": "http",
      "url": "http://127.0.0.1:8765/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}

What the token gives away

The server runs with your Requestarium login and sends requests from this machine. So a caller with the token can:

  • run your collections, against any environment you can use,
  • create, edit and delete requests you can edit,
  • reach anything this machine can reach: localhost, your VPN, internal hosts.

It can't read environment values (they're never returned) and sees credentials masked, as with any MCP client. But "run requests as me, from inside the network" is plenty. Keep the token out of repositories and chat, and use a different one per setup.

Reaching it from another machine

The server speaks plain HTTP. Don't open it to a network as is:

  • Same machine only (default --host 127.0.0.1): nothing else is needed.
  • From elsewhere: put HTTPS in front, with a reverse proxy (Caddy, nginx) or a tunnel (Cloudflare Tunnel, Tailscale), and only then use --host 0.0.0.0, or keep 127.0.0.1 and let the tunnel connect locally.

A tunnel that only your team's network can reach, such as Tailscale, is better than a public URL with a token.

Browser pages

A web page in a browser could try to call http://127.0.0.1:8765 on a visitor's machine. The server refuses requests from any browser origin unless you allow it:

Terminal
requestarium mcp --http --allow-origin https://tools.example.com

Allow only origins you control. Don't allow *.

Sessions

Each client gets its own session with its own cookie jar (or the shared --cookie-jar file). Up to 32 sessions stay open, and a session unused for 2 hours ends. Stop the server with Ctrl+C; nothing keeps running.

A dedicated account for shared setups

On a team machine that several agents use, don't sign in with your personal account. Sign the CLI in with a token meant for that machine (on the Team plan, an organization API token), give it access only to the workspaces it needs, and revoke it when the setup goes away.