MCP & Plugins Intermediate
MCP with stdio Transport
Connect a local MCP server using stdio — the most common transport for local tools
Command
"color:#9CA3AF;font-style:italic"># mcp-config.json $ { "mcpServers": { "filesystem": { "command": "">npx", "args": ["-y", "@anthropic-ai/mcp-server-filesystem", "/home/user/projects"], "env": {} }, "database": { "command": "python", "args": ["-m", "mcp_server_postgres"], "env": { "DATABASE_URL": "postgresql://user:pass@localhost/mydb" } } } }
Response
// stdio transport: server runs as a child process // Communication via stdin/stdout JSON-RPC // Server torn down when session ends
Parsing Code
059669">">// Define 059669">">in config scopes: 059669">">// User: ~/.claude/settings.json → mcpServers (all projects) 059669">">// Project: .claude/settings.json → mcpServers (team-shared) 059669">">// Local: .claude/settings.local.json → mcpServers (gitignored) 059669">">// CLI: --mcp-config 059669">'{...}' (one-shot)
Gotchas
! npx downloads packages on first run — may timeout on slow networks
! Set credentials in the env field, not as CLI arguments