Set up and connect remote MCP servers on Cloudflare Workers with OAuth and Claude integration
The Remote MCP (Model Context Protocol) Server on Cloudflare provides a powerful platform for AI applications to connect with various data sources and tools through the Model Context Protocol. This server simplifies integration, enabling seamless communication between AI models like Claude Desktop and specific backend services or data resources.
The Remote MCP Server on Cloudflare supports a range of features that make it a robust solution for developers building AI applications:
The architecture of the Remote MCP Server integrates seamlessly with Model Context Protocol (MCP) to provide a standardized interface for AI applications. Below is a Mermaid diagram illustrating the protocol flow:
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
To get started with local development and deployment, follow these steps:
Clone the Repository:
git clone [email protected]:cloudflare/ai.git
Install Dependencies:
cd ai
npm install
Run Locally:
npx nx dev remote-mcp-server
You can access the server at http://localhost:8787
.
A financial analyst needs to analyze market trends using natural language processing (NLP) tools integrated with backend financial data sources. The Remote MCP Server on Cloudflare allows the analyst to seamlessly access and process complex financial data through predefined NLP tools.
A customer service chatbot needs to provide personalized responses based on user inquiries and historical data. The Remote MCP Server on Cloudflare can act as a middleware between the chatbot and various backend data sources like CRM systems or knowledge bases.
The Remote MCP Server on Cloudflare supports integration with popular MCP clients such as Claude Desktop. Here are the steps to connect your AI application:
Install MCP Inspector:
npx @modelcontextprotocol/inspector@latest
Configure Server URL:
SSE
.http://localhost:8787/sse
).List and Call Available Tools: You can now explore and call any defined tools within your AI application.
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
{
"mcpServers": {
"[server-name]": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-[name]"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
To troubleshoot issues, restart Claude Desktop by restarting it or clearing the ~/.mcp-auth
files.
rm -rf ~/.mcp-auth
npx mcp-remote http://localhost:8787/sse
Q: Can I use this MCP server with any AI application?
Q: How can I ensure secure connections between my AI application and the MCP server?
Q: Can I deploy this server on Cloudflare Workers?
Q: What are the key benefits of using a centralized MCP server?
Q: Can I debug issues directly from the command line?
npx mcp-remote
to test connections.If you're interested in contributing to the project or improving it further, refer to our contribution guidelines:
git clone [email protected]:cloudflare/ai.git
cd ai
npm install
npx nx dev remote-mcp-server
Explore additional resources and tools in the Model Context Protocol ecosystem:
By leveraging the Remote MCP Server on Cloudflare, developers can significantly enhance their AI application's capabilities through seamless integration with Model Context Protocol.
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Explore community contributions to MCP including clients, servers, and projects for seamless integration
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Integrate AI with GitHub using MCP Server for profiles repos and issue creation
Python MCP client for testing servers avoid message limits and customize with API key
Explore MCP servers for weather data and DigitalOcean management with easy setup and API tools