# MCP over stdio or Streamable HTTP: how a team's coding agents should connect

> The two standard MCP transports, from the 2025-11-25 specification, and what each means for a team running Claude Code, Codex and Cursor: where the server process runs, how it signs in, what goes in a committed config file, and where the record of calls ends up.

The two standard MCP transports, from the 2025-11-25 specification, and what each means for a team running Claude Code, Codex and Cursor: where the server process runs, how it signs in, what goes in a committed config file, and where the record of calls ends up.

December 1, 2026 · 4 min read · The Sandscale team

Every MCP server your coding agents use is reached over a transport. Most people pick whichever line the server’s README shows first. For one developer that is fine. For a team, the transport decides some things you will care about later: whose account the server acts as, whether a config file can be committed, what happens when someone leaves, and where the record of what the agent did ends up.

The MCP specification (version 2025-11-25) defines two standard transports: stdio and Streamable HTTP. This post explains both from the [transports page of the specification](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports), then looks at them from the point of view of a team running Claude Code, Codex and Cursor.

## stdio: the server is a subprocess of the agent

With stdio, the client launches the MCP server as a subprocess. They exchange newline-delimited JSON-RPC messages over the server’s standard input and output, and the server may write logs to standard error.

What follows from that:

- **It runs where the agent runs, as the agent’s user.** If Claude Code runs on your laptop, a stdio server it starts runs on your laptop, with your files, your environment and your network.
- **Credentials come from the environment.** The specification’s [authorization page](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization) says implementations using stdio should not follow its OAuth flow and should instead retrieve credentials from the environment. In practice that means an API key or token in an environment variable, or a CLI that is already signed in.
- **It is installed per machine.** Each person, or each agent machine, installs and updates the server binary or package.
- **Its lifetime is the session’s.** The client starts it and stops it.

## Streamable HTTP: the server is a service the agent calls

With Streamable HTTP, the server is an independent process that can handle many clients, reached at a single MCP endpoint such as `https://example.com/mcp` that accepts POST and GET. It can stream messages with Server-Sent Events. A server may assign a session id in an `MCP-Session-Id` header at initialization, which the client then sends on later requests.

What follows from that:

- **It runs somewhere else.** The agent’s machine only needs to reach the endpoint.
- **Sign-in can be per person.** HTTP-based transports should follow the specification’s authorization flow, which is OAuth. Each person signs in as themselves in the browser, and the client holds the token.
- **Nothing to install on each machine** beyond the client itself, and the server is updated in one place.
- **The specification asks servers for some care.** Servers must validate the `Origin` header, should bind to 127.0.0.1 when running locally, and should authenticate all connections.

## What changes for a team

| Question | stdio | Streamable HTTP |
| --- | --- | --- |
| Where does the server’s code run? | On the agent’s machine, as its user | On the server’s host |
| How does it authenticate? | Credentials in the environment | OAuth sign-in per person (when the server supports authorization) |
| Can the client config be committed? | Only if it holds no secret | Usually, since the config is just a URL |
| What happens when someone leaves? | Revoke whatever key their environment held | Revoke their sign-in |
| Who updates it? | Every machine | The server’s operator |

Three practical consequences:

**Committed config is easier with HTTP.** A project-level MCP config that points at a URL holds no secret, so it can live in the repository, and each person’s client signs in as them. A stdio config that needs an API key in it cannot be committed, so each person keeps their own copy, and they drift.

**A stdio server inherits the agent’s reach.** Whatever the agent’s machine can read, a stdio server started by the agent can read. That is the strongest argument for running coding agents on their own machines rather than on laptops: a stdio server then runs next to the agent’s checkout, not next to your SSH keys. Our post on [running untrusted MCP servers in a microVM](https://sandscale.dev/blog/running-untrusted-mcp-servers-in-a-microvm) goes further into that.

**Records differ.** With HTTP, every call goes through a service that can record it per person. With stdio, the record is whatever the server and the client log on that machine.

Neither transport is better in general. stdio is the right choice when the server must act on the agent’s own machine: its files, its processes, a CLI signed in there. HTTP is the right choice for shared services the whole team uses.

## How Sandscale offers both

Sandscale’s [MCP server](https://sandscale.dev/sandboxes/mcp) comes in both forms, and they are not identical. Our post on [choosing between Sandscale’s two MCP servers](https://sandscale.dev/blog/remote-vs-local-sandscale-mcp-server) compares them tool by tool; in short:

- **Remote, over Streamable HTTP**, at `https://mcp.sandscale.dev/mcp`. Clients sign in with OAuth in the browser, and no secret goes in the config. `sandscale mcp connect` prints how to add it to Claude Code, Codex, Cursor, VS Code or Windsurf:
  ```sh
  sandscale mcp connect codex
  ```
- **Local, over stdio**: `sandscale mcp`, which comes with the Sandscale CLI (1.4.1) and uses your `sandscale login`. The CLI’s help describes adding it to a coding tool as a stdio server with the command `sandscale` and the argument `mcp`. For Claude Code, the [Quickstart](https://sandscale.dev/docs/quickstart) shows this form:
  ```sh
  claude mcp add sandscale -- sandscale mcp
  ```

Either way, calls go through the same API, permissions, plan limits and [audit log](https://sandscale.dev/docs/concepts/audit). For calls through the remote server, the audit log records the tool, the region, the outcome and the app, never the arguments.

## A rule of thumb

- Shared services, one URL, everyone signs in as themselves: Streamable HTTP.
- Tools that must act on the agent’s own machine: stdio, and put that agent on a machine of its own.
- Never commit a config file that contains a key, whichever transport it is for.

**On this page**

1. stdio: the server is a subprocess of the agent
2. Streamable HTTP: the server is a service the agent calls
3. What changes for a team
4. How Sandscale offers both
5. A rule of thumb

**Run your agents in a box of their own**

Each sandbox is a Firecracker microVM. Free includes 100 awake vCPU-hours a month.

[Start free](https://cloud.sandscale.dev/auth/signup)

## Keep reading

- [December 2, 2026 · **Auditing the MCP tool calls your team's coding agents make** · When Claude Code, Codex, Cursor or Gemini CLI call MCP tools, the record of what happened can live in three places: the client, the MCP server, and the system behind it. What each layer can see, which one to trust as the record, whether to keep arguments, and how to read Sandscale's audit log for agent calls from the CLI.](https://sandscale.dev/blog/auditing-mcp-tool-calls)
- [December 2, 2026 · **Device flow login on headless machines: signing a coding agent's machine in as a person** · An agent's cloud machine has no browser, so a CLI there cannot open a sign-in page. The OAuth device authorization grant (RFC 8628) solves that: a short code you approve on your phone or laptop. How it works, the one phishing risk to teach your team, and how to use sandscale login --device on each agent's machine.](https://sandscale.dev/blog/device-flow-login-on-headless-machines)

---
Source: https://sandscale.dev/blog/mcp-stdio-vs-streamable-http
