Skip to content
Cloudflare Docs

MCP Server SDK

Deploy an MCP Server to Cloudflare

You can build and deploy MCP servers on Cloudflare, using the workers-mcp package, which provides an SDK for authorization, transport, and tool definition and discovery.

This guide and the accompanying examples will help you get started.

What is the Model Context Protocol (MCP)?

Model Context Protocol (MCP) is an open standard that connects AI systems with external applications. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect your devices to various accessories, MCP provides a standardized way to connect AI agents to different services.

MCP Terminology

  • MCP Hosts: AI assistants (like Claude or Cursor), AI agents, or applications that need to access external capabilities.
  • MCP Clients: Clients embedded within the MCP hosts that connect to MCP servers and invoke tools. Each MCP client instance has a single connection to an MCP server.
  • MCP Servers: Applications that expose tools, prompts, and resources that MCP clients can use.

Remote vs. local MCP connections

The MCP standard supports two modes of operation:

Cloudflare's MCP Server SDK, is designed to support remote MCP connections. Remote MCP connections allow MCP clients that run in web browsers, mobile apps, and other environments outside of the end-user's machine to connect to your MCP server, such as Claude.ai, and other AI agents.

Why deploy your MCP server to Cloudflare?