Core Mental Model
When learning MCP, there are two independent concepts:
1. Transport
How the MCP Client communicates with the MCP Server.
2. Execution Model
How the MCP Server process is started. Think of it as:
Claude Code / Cursor / VS Code
│
▼
Transport Layer
│
▼
MCP Server
▲
│
Execution ModelMCP Architecture
┌──────────────────────────┐
│ MCP Client │
│ Claude Code / Cursor │
└────────────┬─────────────┘
│
│ Transport
▼
┌──────────────────────────┐
│ MCP Server │
└────────────┬─────────────┘
▲
│
│ Execution Method
▼
Node / Python / Docker /
Binary / Cloud ServiceMCP Transport Protocols
Transport defines:
How messages move between the MCP Client and MCP Server.
Modern MCP primarily supports:
- Stdio
- Streamable HTTP
1. Stdio Transport
How It Works
The client launches the MCP server as a subprocess.
Communication happens using:
stdin
stdoutvia JSON-RPC messages.
Claude Code
│
▼
Launch Process
│
▼
MCP Server
stdin ─────► Request
stdout ◄───── ResponseExample
uvx mcp-server-gitor
npx chrome-devtools-mcpThe AI tool starts the process and communicates directly through standard input/output.
Advantages
✅ Fast ✅ No network setup ✅ Works offline ✅ Local-only security ✅ Easy to configure
Disadvantages
❌ Must run on same machine ❌ Difficult to share across users ❌ Not ideal for cloud deployment
Common Use Cases
- Git MCP
- Filesystem MCP
- Browser automation
- Local databases
- Developer tools
2. Streamable HTTP Transport
How It Works
The MCP server runs independently as a web service. The client connects over HTTP.
Claude Code
│
▼
HTTP
│
▼
MCP ServerUnlike older SSE implementations, Streamable HTTP provides a simpler and more scalable architecture.
Example
https://mcp.company.comAdvantages
✅ Cloud native ✅ Multiple users ✅ Centralized management ✅ Kubernetes friendly ✅ Better authentication support ✅ Easier scaling
Disadvantages
❌ Network dependency ❌ Authentication required ❌ More infrastructure complexity
Common Use Cases
- Internal company tools
- Enterprise integrations
- Shared databases
- CRM systems
- Multi-user MCP platforms
Execution Models
Execution models answer:
How does the MCP server start?
Most execution methods are used together with Stdio transport.
1. NPX (Node.js)
Best For
JavaScript / TypeScript MCP servers.
How It Works
Claude launches:
npx -y chrome-devtools-mcpNPX:
- Downloads package if needed
- Caches package
- Executes package
Example
mcp_servers:
chrome-devtools:
command: "npx"
args:
- "-y"
- "chrome-devtools-mcp"Advantages
✅ No global installation ✅ Easy distribution ✅ Popular in MCP ecosystem
2. UVX (Python)
Best For
Python MCP servers.
How It Works
Claude launches:
uvx mcp-server-gitUVX:
- Creates temporary environment
- Installs package
- Runs package
- Cleans up automatically
Example
mcp_servers:
git:
command: "uvx"
args:
- "mcp-server-git"Alternative
Traditional Python:
python server.pyor
python -m my_mcp_serverAdvantages
✅ Fast startup ✅ No virtual environment management ✅ Python equivalent of NPX
3. Native Binary
Best For
Compiled languages:
- Go
- Rust
- C++
- Zig
How It Works
The MCP server is distributed as a standalone executable.
Example:
ssh-mcp.exeor
ssh-mcpNo Node or Python runtime is required.
Example
mcp_servers:
ssh:
command: "C:/tools/ssh-mcp.exe"Advantages
✅ Fastest startup ✅ Small footprint ✅ No runtime dependencies
4. Docker
Best For
Isolation and security.
How It Works
Claude launches Docker. Docker launches the MCP server.
Claude Code
│
▼
Docker
│
▼
Container
│
▼
MCP ServerExample
mcp_servers:
sqlite:
command: "docker"
args:
- "run"
- "-i"
- "--rm"
- "mcp/sqlite"Advantages
✅ Isolation ✅ Dependency management ✅ Reproducible environments ✅ Enterprise-friendly
Common Use Cases
- Databases
- Filesystem operations
- Internal tools
- Untrusted MCP servers
5. Remote Hosted MCP Services
Best For
Enterprise and cloud deployments.
How It Works
The MCP server is already running. The client connects using Streamable HTTP.
Claude Code
│
▼
HTTP
│
▼
Hosted MCP ServiceExample
{
"mcpServers": {
"company-db": {
"url": "https://mcp.company.com"
}
}
}