Skip to main content

What is the MCP Protocol?

The Model Context Protocol (MCP) is an open standard for communication between AI clients (Claude, Cursor, Windsurf) and tool servers. GetMCP implements the MCP specification using the Streamable HTTP transport.

Endpoint

Each GetMCP server exposes a single HTTP endpoint:
https://yoursite.com/mcp/{slug}/{server_id}
URL PartDescription
{slug}The server’s URL slug (e.g., my-weather-tools)
{server_id}Optional 16-hex-char security token

Transport: Streamable HTTP

All MCP requests use the Streamable HTTP transport:
MethodPurpose
POSTSend JSON-RPC requests (the primary method)
GETOpen an SSE stream for server-initiated messages
DELETETerminate a session
OPTIONSCORS preflight

Headers

Required for POST requests:
Content-Type: application/json
Optional session tracking:
Mcp-Session-Id: {session_id}
If Mcp-Session-Id is not provided, a new session ID is generated and returned in the response. Authentication (if server requires it):
Authorization: Bearer {api_key}

JSON-RPC 2.0

All POST request bodies and responses follow the JSON-RPC 2.0 specification.

Request Format

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": {
      "city": "London"
    }
  }
}

Response Format

Success:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {"type": "text", "text": "..."}
    ]
  }
}
Error:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32601,
    "message": "Method not found: unknown/method"
  }
}

Batch Requests

GetMCP supports JSON-RPC batch requests — send an array of request objects and receive an array of responses:
[
  {"jsonrpc": "2.0", "id": 1, "method": "ping", "params": {}},
  {"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}
]

Notifications

Requests without an id field are notifications. GetMCP processes them but returns no response (HTTP 202).
{
  "jsonrpc": "2.0",
  "method": "notifications/initialized",
  "params": {}
}

Supported Methods

MethodDescription
initializeNegotiate protocol version and get server capabilities
pingCheck server connectivity
tools/listList all available tools
tools/callExecute a specific tool

Error Codes

CodeDescription
-32700Parse error — invalid JSON
-32600Invalid request — malformed JSON-RPC structure
-32601Method not found
-32602Invalid params
-32603Internal error — server-side exception