MCP & Connectors

What is the MCP server URL format for Claude connectors?

QUICK ANSWER

The Model Context Protocol (MCP) uses Server-Sent Events (SSE) for HTTP transport, where the client establishes a SSE connection to a GET endpoint (e.g. http://localhost:3000/sse) and sends JSON-RPC client-to-server messages via POST requests to a separate endpoint declared by the server.

Format Specification

While local MCP connections run over Standard Input/Output (stdio) using child processes, remote connections utilize Server-Sent Events (SSE). The URL structure requires two components:

  1. SSE Connection Endpoint: The entry point where the Claude client starts a GET request to open a persistent events connection stream. For example: http://localhost:3000/sse.
  2. HTTP POST Route: Once connected, the server sends a unique session identifier. The client sends JSON-RPC payload commands to the corresponding post URL, typically structured as: http://localhost:3000/message?sessionId=<session_id>.

Example Endpoint Configurations

Transport Mode Endpoint / Connection Scheme Authentication Payload Location
Stdio (Local) Process Execution (e.g., npx @modelcontextprotocol/server-postgres) Environment Variables (e.g., PGPASSWORD)
Remote SSE (HTTP) http://[domain]/sse or https://[domain]/sse Authorization Header / Bearer Token
Verified against: MCP Spec v1.0.4