Set up and connect remote MCP servers on Cloudflare Workers with OAuth, Claude integration, and debugging tips
Remote MCP Server enables developers to integrate AI applications seamlessly with various data sources and tools through a standardized Model Context Protocol (MCP). This server acts as an intermediary, allowing AI applications like Claude Desktop, Continue, Cursor, and others to connect to specific functionalities they need. By leveraging the MCP protocol, this server enhances the flexibility and security of AI workflows, making it easier for developers to build robust and scalable solutions.
The Remote MCP Server is designed to provide several core capabilities:
The architecture of the Remote MCP Server is built around a microservices approach, ensuring modularity and scalability. The key components include:
The protocol implementation adheres to MCP standards, ensuring compatibility across different AI applications and clients. The server is fully compliant with MCP 2.0 spec, enabling flawless integration.
To get started with the Remote MCP Server, follow these steps:
Clone Repository:
git clone [email protected]:cloudflare/ai.git
Install Dependencies:
cd ai
npm install
Run Locally:
npx nx dev remote-mcp-server
Open the Server: Open http://localhost:8787/
in your browser to see it in action.
The Remote MCP Server supports integrations in various real-world AI workflows:
Financial Analysis:
Content Creation:
The Remote MCP Server seamlessly integrates with various MCP clients, ensuring robust compatibility:
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
To connect Claude Desktop to your local MCP server, follow these steps:
Launch the MCP Inspector:
npx @modelcontextprotocol/inspector@latest
Configure the MCP Client in Claude's settings file (~/.local/share/applications/claude-desktop.json
):
{
"mcpServers": {
"math": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8787/sse"]
}
}
}
The performance and compatibility matrix for the Remote MCP Server is robust, ensuring reliable operation across different environments:
Test Scenario | Performance Metrics | Compatibility Notes |
---|---|---|
Local Deployment | 95% CPU utilization | Compatible with all MCP clients |
Cloudflare Workers | 80% utilization | Secure and scalable |
For advanced users, detailed configuration options are provided to enhance the security and functionality of the server:
OAUTH_KV
namespace.wrangler.jsonc
for better control over settings.To set up OAuth, follow these steps:
Create a new key-value store:
npx wrangler kv namespace create OAUTH_KV
Add the kvNamespace
to your wrangler.jsonc
file.
Yes, you can integrate multiple tools using separate entries in the configuration JSON. Each tool will have its own endpoint and command structure.
The server is compatible with a wide range of AI applications such as Claude Desktop, Continue, Cursor, and more.
To test your integration locally, follow these steps:
The majority of compatibility issues have been resolved, but some older tools might require manual tweaking. Regular updates are released to address these gaps.
Contributions to the Remote MCP Server are highly encouraged. Developers can contribute by:
The Remote MCP Server is part of the larger MCP ecosystem, which includes additional resources such as:
By leveraging these resources, developers can build powerful and scalable AI applications that seamlessly integrate diverse tools and data sources.
This document is designed to provide a comprehensive guide for setting up and utilizing the Remote MCP Server on Cloudflare Workers, focusing on its core capabilities, detailed installation steps, key use cases, and advanced configuration options. By following these instructions, developers can ensure robust integration with various AI applications, enhancing their workflows and productivity.
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
Discover easy deployment and management of MCP servers with Glutamate platform for Windows Linux Mac
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