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 Model

MCP Architecture

┌──────────────────────────┐
│      MCP Client          │
│ Claude Code / Cursor     │
└────────────┬─────────────┘

             │ Transport

┌──────────────────────────┐
│       MCP Server         │
└────────────┬─────────────┘


             │ Execution Method

Node / Python / Docker /
Binary / Cloud Service

MCP Transport Protocols

Transport defines:

How messages move between the MCP Client and MCP Server.

Modern MCP primarily supports:

  1. Stdio
  2. Streamable HTTP

1. Stdio Transport

How It Works

The client launches the MCP server as a subprocess.

Communication happens using:

stdin
stdout

via JSON-RPC messages.

Claude Code


 Launch Process


 MCP Server
 
stdin  ─────► Request
stdout ◄───── Response

Example

uvx mcp-server-git

or

npx chrome-devtools-mcp

The 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 Server

Unlike older SSE implementations, Streamable HTTP provides a simpler and more scalable architecture.

Example

https://mcp.company.com

Advantages

✅ 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-mcp

NPX:

  1. Downloads package if needed
  2. Caches package
  3. 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-git

UVX:

  1. Creates temporary environment
  2. Installs package
  3. Runs package
  4. Cleans up automatically

Example

mcp_servers:
  git:
    command: "uvx"
    args:
      - "mcp-server-git"

Alternative

Traditional Python:

python server.py

or

python -m my_mcp_server

Advantages

✅ 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.exe

or

ssh-mcp

No 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 Server

Example

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 Service

Example

{
  "mcpServers": {
    "company-db": {
      "url": "https://mcp.company.com"
    }
  }
}