Transport Types
add-mcp supports all three MCP transport types: HTTP, SSE, and stdio. The transport type determines how your coding agent communicates with the MCP server.Overview
| Transport | Type | Use Case | Default For |
|---|---|---|---|
| HTTP | Remote | Streamable HTTP connections | Remote URLs (default) |
| SSE | Remote | Server-Sent Events (legacy) | Remote URLs (with --transport sse) |
| stdio | Local | Standard input/output | npm packages & commands |
HTTP Transport
Streamable HTTP is the default transport for remote MCP servers.When to Use
- Modern remote MCP servers
- Production deployments
- Servers requiring streaming responses
Configuration
HTTP is the default transport for remote URLs:Example
Generated Configuration
For agents like VS Code, Zed, and Codex, thetype field is set to "http":
type field is optional and may be omitted.
SSE Transport
Server-Sent Events (SSE) is a legacy transport type supported by some MCP servers.When to Use
- Legacy MCP servers that don’t support HTTP transport
- Servers explicitly requiring SSE connections
- Backward compatibility with older MCP implementations
Configuration
Specify SSE transport with the--transport sse flag:
Example
Generated Configuration
For most agents, thetype field is set to "sse":
"sse" type:
stdio Transport
Standard input/output (stdio) is used for local MCP servers that run as child processes.When to Use
- npm packages (e.g.,
@modelcontextprotocol/server-postgres) - Local command-line scripts
- Development and testing
- Any MCP server that runs locally
Configuration
stdio transport is automatically used for non-URL sources:Example
Generated Configuration
For stdio servers, the configuration includescommand and args:
Transport Compatibility
Not all agents support all transport types:Claude Desktop
Only supports stdio transport. Claude Desktop does not support remote (HTTP/SSE) servers through its config file. If you try to install a remote server to Claude Desktop:Claude Desktop only supports local (stdio) servers via its config file. Add remote servers through Settings → Connectors in the app instead.
All Other Agents
All other supported agents (Cursor, VS Code, Claude Code, Codex, OpenCode, Gemini CLI, Goose, GitHub Copilot CLI, Zed) support all three transports: stdio, HTTP, and SSE.Specifying Transport Type
Use the--transport or --type flag to explicitly set the transport:
Valid Options
http- Streamable HTTP (default for remote URLs)sse- Server-Sent Events
stdio transport is automatically used for local packages and commands - you cannot specify it explicitly.
Transport Validation
When you specify agents with--agent or --all, add-mcp validates that the selected agents support the required transport:
--all flag, add-mcp will warn about unsupported agents but continue with compatible ones:
Agent-Specific Configuration
Different agents may transform the transport configuration slightly:Goose
Goose usesstreamable_http for HTTP and sse for SSE:
Cursor and OpenCode
Cursor and OpenCode don’t always require thetype field for remote servers:
Other Agents
Most agents (VS Code, Codex, Zed, etc.) require thetype field: