Deploy a no-auth remote MCP server on Cloudflare Workers with customization and easy connection options
The Remote MCP Server allows developers to build and deploy a Model Context Protocol server that can be used by various AI applications without requiring authentication, leveraging Cloudflare Workers. This setup enables seamless integration of custom tools into the broader ecosystem of AI applications. By deploying this remote server, you enable AI tools such as Claude Desktop, Continue, Cursor, and more to connect through the MCP protocol, enhancing their functionality with additional data sources and tools.
The Remote MCP Server showcases several key features critical for integrating with AI applications:
src/index.ts
file using the this.server.tool(...)
method, extending the capabilities of the server as needed.The architecture of the Remote MCP Server is centered around enabling seamless communication between AI applications and external data sources through the Model Context Protocol. This server uses Cloudflare Workers to host a server that listens for EventSource
requests (commonly used in real-time updates), following the specifics of the MCP protocol.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This flow diagram illustrates how an AI application sends requests through the MCP protocol to a server, which then processes these requests and retrieves necessary data or tools.
graph TD
s0[Data Source] -->|Request| s1[(MCP Server)]
s1 -->|Processed Data| s2[Tool/Service]
style s0 fill:#f3e5f5
style s1 fill:#fdd8ea
style s2 fill:#e6f5d8
This diagram depicts the data flow from an external source to the server and further processing through a tool or service.
To start using this Remote MCP Server, you have two main methods:
Using the Deploy-to-Workers Button:
Using the Command Line Interface:
npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless
This command initializes your project on a local machine, ready for deployment.
This section outlines how the Remote MCP Server integrates with various MCP clients:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
Claude Desktop and Continue support full integration with the Remote MCP Server, offering a complete suite of functionalities. Cursor is limited to tool support.
The server performs well under various conditions:
EventSource
supports real-time communication efficiently.Server Load | Network Latency | Tool Execution Time |
---|---|---|
100 requests/sec | <20 ms | <500 ms |
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Configure the server to match your specific requirements, including specifying tools and environment variables.
Can I customize tools using this server?
src/index.ts
file.Does this support real-time data streaming?
EventSource
, enabling real-time communication.Is there any performance overhead due to Cloudflare Workers?
How secure are the connections between clients and servers in MCP?
What AI applications can connect to this server?
Contributions are welcome! To contribute, clone the repository:
git clone https://github.com/cloudflare/ai.git
Contribute to the project by submitting issues or pull requests. Ensure you test your changes thoroughly before submission.
For more information on the Model Context Protocol and related resources, visit:
By utilizing this Remote MCP Server, developers can significantly enhance their AI applications' capabilities by integrating custom tools and data sources efficiently. This setup paves the way for more dynamic and versatile AI workflows in a seamlessly connected ecosystem.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration