Deploy a remote MCP server on Cloudflare Workers without authentication for AI tool integration
An MCP (Model Context Protocol) server, built and deployed on Cloudflare Workers without authentication, enables AI applications to communicate with remote tools and data sources via a standardized protocol. This example showcases how to deploy such an MPC server using the Cloudflare platform.
Our Remote MCP Server
is designed for seamless integration of various AI tools and contexts across different workflows. Key features include:
The implementation of our Remote MCP Server follows these architecture steps:
init()
method in src/index.ts
initializes the server, setting up the necessary configurations.this.server.tool(...)
.The protocol flow diagram illustrates the communication between AI applications, MCP clients, and our Remote Server:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
This diagram highlights the seamless exchange of data and commands between the AI application, passing through the MCP protocol to reach the server, which then interacts with external tools or data sources.
To deploy your own Remote MCP Server on Cloudflare Workers:
Automatic Deployment:
Manual Deployment:
npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless
This Remote MCP Server can be used in a variety of advanced AI workflows:
These use cases demonstrate the versatility of our server in facilitating complex interactions between AI applications, external tools, and diverse data sources.
To connect your Remote MCP Server:
Cloudflare AI Playground:
remote-mcp-server-authless.<your-account>.workers.dev/sse
Claude Desktop: Follow these steps to connect your Remote MCP Server:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8787/sse"] // or remote-mcp-server-authless.your-account.workers.dev/sse
}
}
}
Our MCP server ensures compatibility with popular AI applications. Here is the compatibility matrix for various MCP clients:
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
Advanced configurations can involve:
The following code snippet provides an example of the configuration structure required by popular MCP clients.
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
npm
commands.Contribution to this project is encouraged! If you want to contribute:
Stay updated with the latest developments in the MCP ecosystem by visiting Model Context Protocol's official documentation. Explore additional resources and tools to enhance your AI application integrations.
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
AI Vision MCP Server offers AI-powered visual analysis, screenshots, and report generation for MCP-compatible AI assistants
Analyze search intent with MCP API for SEO insights and keyword categorization
Connects n8n workflows to MCP servers for AI tool integration and data access
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Expose Chicago Public Schools data with a local MCP server accessing SQLite and LanceDB databases