---
title: What is the stdio transport in MCP?
type: glossary
url: https://agentsfordevs.com/glossary/stdio-transport
markdown: https://agentsfordevs.com/glossary/stdio-transport.md
publisher: Agents for Devs
author: Agents for Devs desk
reviewed_by: Agents for Devs desk
published: 2026-12-06
updated: 2026-12-06
license: https://agentsfordevs.com/reuse
citation: Agents for Devs. "What is the stdio transport in MCP?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/stdio-transport
attribution: Credit Agents for Devs and link to https://agentsfordevs.com/glossary/stdio-transport
term: stdio transport
aliases:
  - STDIO transport
  - standard input/output transport
---

# What is the stdio transport in MCP?

The stdio transport is the MCP binding in which the client launches the server as a subprocess and the two exchange newline-delimited JSON-RPC messages over the server's standard input and output.

**Definition:** The stdio transport is the MCP binding in which the client launches the server as a subprocess and the two exchange newline-delimited JSON-RPC messages over the server's standard input and output.

```bash
# Register a local stdio server in Claude Code (example from Anthropic's docs)
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
  -- npx -y airtable-mcp-server
```

Everything after `--` is the command the host runs as a subprocess, and the API key reaches the server as an environment variable. That is the stdio pattern: MCP's authorization spec says stdio implementations should not use its OAuth flow and should take credentials from the environment instead.

The wire rules in spec version 2026-07-28 are short. The server reads JSON-RPC from `stdin` and writes it to `stdout`, one message per line, with no embedded newlines. It must never write anything else to `stdout`. Logs go to `stderr`, which the client should not read as an error signal. To shut down, the client closes `stdin`, waits, and kills the process if it doesn't exit.

A stdio server opens no network listener, which is why MCP's security guidance recommends it to limit access to just the client. It also runs with the user's privileges, so clients offering one-click setup must show the exact command and get explicit approval, and should consider sandboxing.

**See also:** [MCP transport](/glossary/mcp-transport) · [Shadow MCP](/glossary/shadow-mcp) · [stdio vs Streamable HTTP](/guides/mcp-transports) · [Claude Code MCP config](/guides/claude-code-mcp)

## Sources

1. [stdio (specification version 2026-07-28), Model Context Protocol](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/stdio)
2. [Authorization (specification version 2026-07-28), Model Context Protocol](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization)
3. [Security Best Practices (version 2026-07-28), Model Context Protocol](https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices)
4. [Connect Claude Code to tools via MCP, Anthropic (Claude Code docs)](https://code.claude.com/docs/en/mcp)

## Changelog

- 2026-12-06: First published.

## Cite this page

Agents for Devs. "What is the stdio transport in MCP?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/stdio-transport

- Page: https://agentsfordevs.com/glossary/stdio-transport
- Markdown: https://agentsfordevs.com/glossary/stdio-transport.md
- Reuse: quote or summarize with a link to the page. Terms: https://agentsfordevs.com/reuse
