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 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.

An AI assistant can make, start and drive your profilesIn Mosaic: MCP server. Let an AI assistant create, launch and drive profiles. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

How it works: 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
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.

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 page lists what those tools reach, and letting Claude control a browser walks through the set-up end to end.