Skip to main content

Remote MCP & Connectors — Production & Sec

← Back to Dashboard
1. OAuth & Security2. Deployment Strategies3. MCP Across Tools4. Agentic Orchestration5. Remote MCP & Connectors

Remote MCP & Connectors

📚 Production & Sec⏱ 10 min⭐ 120 XP⌨ Hands-on lab

Remote MCP Servers

While stdio servers run locally, Remote MCP Servers are cloud-hosted Streamable HTTP endpoints (/mcp) that authorized clients connect to over HTTPS, secured as OAuth 2.1 Resource Servers.

How Remote MCP Discovery & OAuth 2.1 Work

  1. The MCP Server is deployed as a stateless Streamable HTTP service (e.g., on AWS, Vercel, or Cloudflare Workers).
  2. On an unauthenticated request, the server responds with 401 Unauthorized and publishes Protected Resource Metadata at /.well-known/oauth-protected-resource (RFC 9728).
  3. The Client discovers the Authorization Server via RFC 8414 (/.well-known/oauth-authorization-server) or OpenID Connect Discovery 1.0, identifies itself via a Client ID Metadata Document (CIMD) (superseding deprecated RFC 7591 DCR), and completes OAuth 2.1 + PKCE with an RFC 8707 resource indicator.
  4. Subsequent requests travel over Streamable HTTP (single /mcp endpoint with JSON or optional SSE streaming).
// RFC 9728 Protected Resource Metadata (/.well-known/oauth-protected-resource)
{
  "resource": "https://mcp.acme.com/mcp",
  "authorization_servers": ["https://auth.acme.com"],
  "scopes_supported": ["read:contacts", "write:deals"],
  "bearer_methods_supported": ["header"]
}

Anthropic MCP Connector

MCP Connector is Anthropic's first-party Messages API integration (enabled with the anthropic-beta: mcp-client-2025-11-20 header) that lets Claude connect directly to remote Streamable HTTP MCP servers without custom client-side MCP code:

// Using MCP Connector in the Anthropic Messages API:
// Header: anthropic-beta: mcp-client-2025-11-20
{
  "model": "claude-sonnet-4-5-20250929",
  "max_tokens": 1024,
  "mcp_servers": [{
    "type": "url",
    "url": "https://mcp.acme.com/mcp",
    "name": "acme-crm",
    "authorization_token": "eyJhbGciOiJSUzI1NiIs..."
  }],
  "tools": [{
    "type": "mcp_toolset",
    "mcp_server_name": "acme-crm"
  }],
  "messages": [...]
}
💡 Key Insight: MCP Connector eliminates the need for client-side MCP infrastructure. You just pass server URLs in your API call, and Claude handles the MCP handshake, tool discovery, and execution automatically.

Tool Search & Discovery

When connecting to many MCP servers with hundreds of tools, Claude's Tool Search automatically discovers the most relevant tools for each request - saving tokens and improving accuracy.

Instead of loading all 200 tools into context, Tool Search indexes your catalog server-side and injects only the 5-10 tools relevant to the current query.

Fine-Grained Tool Streaming

Standard streaming returns text tokens. Fine-grained tool streaming streams individual tool input fields as they're generated - enabling real-time UI previews of tool arguments before execution completes.

⌨ HANDS-ON LABCheck Health of Cloudflare Remote MCP
⭐ +125 XP

Verify deployment health of a serverless MCP remote connector on Cloudflare Workers.

1Query the /health endpoint of your remote MCP worker.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 1 — type "hint" if stuck
🧪 Knowledge Check
Press 1-4 to select1 of 3
What authentication standard does the MCP spec use for remote servers?
Basic Auth
API Keys only
OAuth 2.1 with PKCE
Custom JWT