# stdio transport

Canonical page: /glossary/stdio-transport

API keys & secrets glossary, Claude Code & MCP. stdio Transport in MCP: How Claude Talks to a Server

**Short answer:** stdio transport is the most common way Claude Code talks to an MCP server: the server is launched as a local subprocess, and messages pass over its standard input and output streams instead of a network socket. There is no port to open and nothing to expose to the network.

## Why it matters

Because the server only exists as long as the subprocess runs, and only Claude Code's own process can write to its stdin, stdio servers are naturally local-only. The alternative, an HTTP-based transport, is used for servers that run on a remote machine.

## In Claude Keychain

Claude Keychain's MCP server runs over stdio. It never opens a network port for this purpose, which is also why it does not inherit your shell's environment variables automatically, they have to be passed explicitly.

## Common questions

**Does stdio mean it only works in a terminal?**

No, it refers to how the two processes exchange messages internally, not to how you interact with anything.

**Is stdio slower than a network connection?**

No, it is a local pipe, so it is typically faster than a network round trip.

## Related

[MCP server](/glossary/mcp-server), [Subprocess](/glossary/subprocess), [.mcp.json](/glossary/mcp-json)
