# MCP streamable HTTP vs stdio: why we run both

> stdio means the client starts the server. Mosaic is already running, so its MCP server is HTTP inside the app, plus a small stdio bridge for clients.

Source: https://mosaicbrowser.com/blog/mcp-streamable-http-and-stdio

## Why our MCP server speaks HTTP and still ships a stdio bridge

stdio means the client starts the server. Mosaic is already running, so its MCP server is HTTP inside the app, plus a small stdio bridge for clients.

![One server inside the app, one bridge beside it, beside a screenshot: the Mosaic MCP server: let an AI assistant manage profiles, proxies and launches](https://mosaicbrowser.com/covers/mcp-streamable-http-and-stdio.webp)

MCP streamable HTTP and stdio differ in who starts the server. With stdio, the client launches the server as a child process and talks to it over standard input and output. With streamable HTTP, the server is already running somewhere and the client sends it POST requests. Mosaic is a desktop app that is already running, so its MCP server lives inside the app, over HTTP, and a stdio bridge exists only for clients that cannot speak anything else.

## What the two transports are

The [MCP specification's transports page](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports) defines two standard mechanisms, both carrying JSON-RPC. In stdio, "the client launches the MCP server as a subprocess", reads its replies from stdout and must never write anything to its stdin that is not an MCP message. In streamable HTTP, "the server operates as an independent process that can handle multiple client connections", and every client message is a fresh POST to one endpoint. It replaced the older HTTP+SSE transport from the 2024-11-05 version.

The specification also says clients should support stdio whenever possible. That sentence is why the bridge exists.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: MCP server](https://mosaicbrowser.com/features/mcp-server)

## Why stdio did not fit Mosaic

Every one of the more than 150 tools on our server acts on things one process owns. The profile store is open in the app. The browsers it launched are children of the app, with their debugging connections held by the app. The account session, the plan check and the proxy logins Mosaic makes for each browser all live there too.

A stdio server would be a new process spawned by the MCP client, holding none of that. It would have to open a connection back to the running app to do anything, which is an HTTP server with an extra hop in front of it. Or it would open the store itself beside the app, and two processes writing one library is a fault class we are not going to invite.

So the server is an HTTP listener inside Mosaic. It is off by default (Settings › MCP turns it on), listens on `127.0.0.1` port `39218` unless you change it, and takes JSON-RPC as `POST /mcp`. Each request must carry a Mosaic API key as `Authorization: Bearer <key>`. A wrong key gets a `401` saying so, and signed out every request gets the sign-in sentence instead, because there is no library open to check a key against. On an account on Free a correct key gets a `402`, since MCP is part of Pro.

![Settings › MCP in Mosaic, with the server switch, its port and the client config that runs the bridge](https://mosaicbrowser.com/shots/settings-mcp.png)
*Settings › MCP: the server, its port, and a config that runs the bridge*

We use the simple end of the transport. Every reply is a single `application/json` body, a notification gets `202` with no body, and a `GET` gets `405` with "MCP requests use POST.", which the specification allows for a server that offers no event stream. None of our tools needs to push messages to the client unasked, so there is no stream to offer.

## What the bridge does

The comment above it in our code says most MCP clients still only speak stdio, so we ship a bridge they can run. When the server starts, Mosaic writes two files into an `mcp` folder at the machine's own data root: `mosaic-mcp.mjs` and `claude_desktop_config.example.json`. The example points `node` at the script and leaves a placeholder for the key.

The script is about forty lines of Node with no dependencies. It reads newline-delimited JSON-RPC from stdin, posts each line to `http://127.0.0.1:<port>/mcp` with the key from `MOSAIC_API_KEY`, and writes the reply to stdout. `MOSAIC_MCP_URL` overrides the address.

Two details took more thought than the forwarding.

A refusal that happens before JSON-RPC is read, such as a wrong key or a plan without MCP, comes back from the server as plain JSON. An MCP client cannot parse that as a reply. So the bridge turns it into a JSON-RPC error, code `-32001`, carrying the server's own sentence. If the app is not running at all, the client gets `-32000` and "Mosaic is not reachable", followed by the network error.

The folder is at the machine root, not inside a library. Since accounts each have their own library on the computer, a path inside one would change with whoever is signed in, and the path is the thing you paste into a client's config.

## Errors a model can read

One more choice concerns both transports. When a tool fails, the server answers with a normal result marked `isError: true` and the message as text, not a transport error. A model can read the result and correct its next call. Arguments are checked against the tool's published schema before the handler runs, so a misspelt field is refused by name rather than dropped. Why that check reads the schema itself is in [the tool description is the contract](https://mosaicbrowser.com/blog/tool-description-is-the-contract).

## MCP streamable HTTP vs stdio: which one to use

If your client speaks streamable HTTP, point it at `http://127.0.0.1:39218/mcp` with the key in the header and skip the bridge. If it only launches commands, use `node` with the path to `mosaic-mcp.mjs`. Both end at the same server and the same tools. The [MCP server](https://mosaicbrowser.com/features/mcp-server) page lists what those tools reach, and [letting Claude control a browser](https://mosaicbrowser.com/guides/let-claude-control-a-browser) walks through the set-up end to end.

## Sources

1. [Model Context Protocol specification, 2025-06-18: Transports](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports), read November 3, 2026

## Questions

### What is the difference between MCP stdio and streamable HTTP?

With stdio the client launches the server as a child process and exchanges JSON-RPC over its standard input and output. With streamable HTTP the server is an independent process the client sends POST requests to, and it can serve several clients at once.

### Which MCP transport should a desktop app use?

If the app is already running and owns the state the tools act on, HTTP lets the client talk to that process directly. A stdio server would be a second process that has to reach the first one anyway.

### How do I connect Claude Desktop to Mosaic's MCP server?

Turn MCP on in Settings › MCP, then point the client at the bridge file Mosaic writes, mosaic-mcp.mjs, with an API key in MOSAIC_API_KEY. Mosaic writes an example config file next to it.

### Is Mosaic's MCP server reachable from other computers?

No. It listens on 127.0.0.1, is off until you turn it on, and answers only requests carrying a Mosaic API key. MCP is part of Pro.

## Related

[An anti-detect browser MCP server for your AI assistant](https://mosaicbrowser.com/features/mcp-server): Mosaic's anti-detect browser MCP server lets Claude or any MCP client create, launch and drive your profiles. 150+ tools, off by default, key-gated.

[How to let Claude control a browser](https://mosaicbrowser.com/guides/let-claude-control-a-browser): Let Claude control a browser with the Claude in Chrome extension, or with an MCP server in Claude Desktop or Claude Code. Which to pick, and how to set each up.

[We have a REST API and an MCP server, and they do different jobs](https://mosaicbrowser.com/blog/do-you-need-mcp-if-you-have-an-api): Use REST when your code decides the next call and MCP when a model does. On MCP the tool description is the whole contract, so it has to be exactly true.

[Model Context Protocol (MCP): how an AI assistant calls tools](https://mosaicbrowser.com/glossary/model-context-protocol): The Model Context Protocol is an open standard, published by Anthropic in November 2024, for connecting AI apps to tools and data through MCP servers.

[Three MCP tool descriptions that told a model something untrue](https://mosaicbrowser.com/blog/tool-description-is-the-contract): Auditing 47 MCP tools found a field that did not exist, a trash called irreversible and a device list with no phones. A description is the model's contract.







[Letting an AI assistant run browser profiles over MCP](https://mosaicbrowser.com/blog/ai-assistant-runs-profiles): Mosaic's MCP server lets Claude or any MCP client create, start and drive browser profiles. Three faults we found when a model was the caller.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
