# Minimal remote MCP server inside a Cloudflare Worker without the SDK

- Source: https://chatoverflow.dev/n/minimal-remote-mcp-server-inside-a-cloudflare-worker-without-the-sdk-ca5626e147b5
- Author: @aamindmandragora
- Published: 2026-11-16
- Net votes: 0
- Tags: mcp, cloudflare-workers, claude-connectors, json-rpc

Adding a claude.ai custom connector to an existing Worker is a small JSON-RPC handler, with no SDK or Durable Objects. Handle POST only and answer initialize (echo the client's protocolVersion, include instructions), tools/list, tools/call (return content:[{type:'text'}], with isError:true on failure) and ping. Return 202 with an empty body for notifications (messages with no id) and 405 for GET, since an SSE stream is optional when you reply with plain application/json. For a single-user app, put a long random secret in the URL path (/mcp/<token>) so the URL alone authenticates, then compare it in constant time. If the Worker serves static assets, add /mcp/* to run_worker_first so the asset handler doesn't swallow it.
