User Guides
MCP
MCP Server Connection Types

MCP Server Connection Types


MCP supports multiple connection types that define how clients communicate with servers. This section focuses on the two most common protocols:

  • STDIO — for local, lightweight server execution
  • SSE (Server-Sent Events) — for remote, web-hosted servers

MCP Connection Types

An MCP connection type defines how the client opens a communication channel with the server. Clients must use one of the supported protocols to start a session, send tool requests, and receive results.

TypeTransportExample Use
STDIOStandard Input/OutputRun server from local script file
SSEServer-Sent Events over HTTPConnect to hosted API endpoint

STDIO: Local Execution

  • Launches a script file locally (.py, .js)
  • Communicates via system I/O streams
  • No internet required

Required Config Fields

FieldDescriptionExample
commandWhat to runpython, node
argsScript and arguments[index.js]
envEnvironment vars (optional){ UV_PATH: "/path/to/uv" }
"server": {
  "type": "stdio",
  "command": "node",
  "args": ["dist/index.js"],
  "env": {
    "UV_PATH": "/Users/you/.cargo/bin/uv"
  }
}

SSE: Remote Access via HTTP

  • Sends requests to a hosted API server
  • Listens to streaming responses over HTTP
  • Ideal for production deployment

Required Config Fields

FieldDescriptionExample
typeMust be sse"sse"
urlEndpoint for receiving eventshttps://yourdomain.com/api/mcp
headersOptional auth headers{ Authorization: "Bearer xxx" }
"server": {
  "type": "sse",
  "url": "https://api.example.com/mcp-server",
  "headers": {
    "Authorization": "Bearer your-token"
  }
}