Deploy a no-auth remote MCP server on Cloudflare Workers with tools integration and AI Playground access
This example allows you to deploy a remote MCP server that doesn't require authentication on Cloudflare Workers.
The Remote MCP Server is an MCP (Model Context Protocol) implementation designed for use with cloud environments, specifically deployed on Cloudflare Workers. This server enables seamless integration of AI applications such as Claude Desktop, Continue, Cursor, and others without requiring authentication. By deploying this server to a specific URL, it can be connected directly from multiple MCP clients, providing a standardized way to access data sources and tools through the Model Context Protocol.
The core feature of this Remote MCP Server is its ability to expose local tools and AI model contexts as REST and SSE endpoints. These endpoints are accessible via standard HTTP requests, making it easy for AI applications to interact with them in their workflows. The server's implementation adheres closely to the Model Context Protocol (MCP), ensuring compatibility across different clients.
The Remote MCP Server is particularly useful for developers looking to integrate tools or data sources into their existing AI application frameworks without needing a dedicated authentication system. By removing the need for authorization, it simplifies the setup and reduces latency, making it faster and more efficient for real-time interactions between the client and server.
This server supports multiple tool integrations through defined methods within src/index.ts
using this.server.tool(...)
. This allows you to add custom tools or modify existing ones, expanding the capabilities of your AI application. Additionally, this server is built with flexibility in mind, enabling it to be deployed on Cloudflare Workers for quick and scalable deployment.
The architecture of the Remote MCP Server follows the Model Context Protocol (MCP), focusing on a modular design that can be easily extended or modified. The protocol defines how AI applications communicate with servers, ensuring consistent behavior regardless of the underlying implementation. This server is built to adhere strictly to these specifications, providing reliable and efficient connections between the client and the resources it manages.
At a high level, the architecture consists of three main components:
The implementation of the Remote MCP Server uses TypeScript to define these components, ensuring type safety and maintainability. The code is structured in a way that makes it easy to add new features or modify existing ones without affecting the overall architecture.
To get started with deploying your own Remote MCP Server on Cloudflare Workers:
Deploy via Button: Use the "Deploy to Workers" button provided by Cloudflare:
Install Locally: Alternatively, you can install and run the server locally using npm:
npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless
This setup process is designed to be straightforward, allowing developers to quickly get their MCP servers up and running, either in a production environment or for local testing.
The Remote MCP Server can be used in various AI workflows where tool integration is essential. Here are two realistic use cases:
Natural Language Processing (NLP): Imagine building an NLP system that needs to query external APIs for data or use custom tools like sentiment analysis scripts. The Remote MCP Server allows you to expose these tools as endpoints, making them easily accessible from any compatible AI client.
Model Deployment and Management: In a scenario where you have multiple AI models hosted on different servers, the Remote MCP Server acts as a unified interface for accessing all of them. This is particularly useful in distributed environments or when managing multiple versions of models across different locations.
To integrate the Remote MCP Server with various MCP clients, follow these steps:
The Cloudflare AI Playground is a ready-to-use client for testing and development. Here’s how to connect it:
remote-mcp-server-authless.your-account.workers.dev/sse
)For connecting Claude Desktop or other clients, use an MCP remote proxy like mcp-remote
. Here’s how:
Update your settings in Claude Desktop by navigating to Settings > Developer > Edit Config.
Add the following configuration:
{
"mcpServers": {
"calculator": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse" // or remote-mcp-server-authless.your-account.workers.dev/sse
]
}
}
}
Restart Claude, and you should see new tools available.
The performance of the Remote MCP Server is optimized for both local and cloud deployment. The compatibility matrix highlights its support for various MCP clients:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ❌ | Limited Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
This matrix shows the Remote MCP Server’s compatibility, indicating that it is fully compatible with Claude Desktop and Continue for tools and prompts. However, only resources are currently supported in Continue.
The Remote MCP Server can be configured to handle advanced use cases through environment variables and command-line arguments. For example, you can set an API key or define custom server behavior:
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
This configuration allows for granular control over the server's behavior and security settings. Additionally, you can secure your MCP Server by setting up appropriate firewall rules or using access tokens to restrict who can connect.
Why would I use a remote MCP server without authentication? Using an unauthenticated server simplifies setup and reduces latency in real-time applications like AI chatbots and live analytics tools.
Can this server be used with multiple clients simultaneously? Yes, the Remote MCP Server is designed to handle connections from multiple clients concurrently, ensuring scalability for various use cases.
How do I ensure data privacy when using the server locally? Data can be encrypted both in transit and at rest. Use HTTPS for secure communication between clients and servers, and consider client-side encryption where applicable.
What tools are supported out-of-the-box with this server?
Out-of-the-box support includes a variety of common tools such as NLP processors, API clients, databases, and more. Custom tool integration is straightforward via the init()
method in src/index.ts
.
Can I use this server for local development without deploying to Cloudflare? Yes, you can install it locally using npm commands provided in the README and run it as a standalone server for testing.
Contributions to the Remote MCP Server are welcome! If you wish to contribute, please follow these guidelines:
https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-authless
) and fork it.The Remote MCP Server is part of the broader Model Context Protocol ecosystem, which includes various tools and clients for developing, deploying, and integrating AI applications. For more information on MCP and its applications, visit the official Model Context Protocol documentation:
For any further questions or support, you can reach out to the community forums at Cloudflare Developer Community.
By leveraging the Remote MCP Server, developers and AI application teams can streamline their workflows and integrate tools more efficiently, driving innovation in their projects.
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Python MCP client for testing servers avoid message limits and customize with API key
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions
Analyze search intent with MCP API for SEO insights and keyword categorization
AI Vision MCP Server offers AI-powered visual analysis, screenshots, and report generation for MCP-compatible AI assistants