[KongchangAI]
Conceptstdio传输 / 标准输入输出传输

stdio transport

The most common local-integration transport mode in the Model Context Protocol (MCP). It operates by spawning a subprocess and exchanging JSON-RPC messages over standard input and output streams, requiring no network ports. This mode is suited to local tooling and low-latency communication scenarios.

Core Facts

Timeline (last 90 days)

Sep 25

The stdio transport is an inter-process communication mechanism where the parent process sends requests by writing to the child process's stdin and reads responses from stdout, requiring no open network ports and making it suitable for running tool processes in a local sandbox.

Unverified50%
Sep 25

In stdio mode, environment variables often carry critical configurations such as API keys, authentication tokens, runtime paths, or debug switches.

Unverified50%
Sep 25

If the SDK has incorrect merge logic when launching a child process (such as overwriting values explicitly passed in by the developer with the system default environment), it will result in an incomplete child process environment, manifesting as authentication failures or functional anomalies that are difficult to trace to the root cause.

Unverified50%
Sep 25

@ai-sdk/mcp@1.0.86 fixes an issue where explicitly set environment variable values were lost or overwritten when using the stdio transport.

Unverified50%
Sep 25

The stdio transport sends and receives JSON-RPC messages by spawning a child process and using standard input/output streams, requiring no network ports.

Unverified50%
Jul 23

MCP has a built-in Stdio (standard input/output) local communication mechanism, but Stdio cannot transmit across networks and can only be used for inter-process communication on a local machine.

Verified80%

All Facts (6)

Source Articles