Set up and connect remote MCP servers on Cloudflare Workers with OAuth, Claude, and MCP Inspector integration
Remote MCP (Model Context Protocol) Server enables seamless integration of various Artificial Intelligence (AI) applications and tools through a standardized protocol. This server serves as a bridge between AI applications, such as Claude Desktop, Continue, and Cursor, and external data sources or tools, ensuring that these applications can efficiently access the necessary information and perform tasks with minimal setup overhead.
The core capability of the Remote MCP Server lies in its compatibility with multiple MCP (Model Context Protocol) clients. It supports seamless integration for popular AI applications like Claude Desktop, Continue, and Cursor, allowing these tools to leverage external data sources or perform specific tasks through a unified API.
graph TB
subgraph "AI Application"
A[Claude Desktop]
B[Continue]
C[Cursor]
end
subgraph "MCP Client Compatibility"
D[MPC Server - Full Support]
E[MPC Server - Tools Only]
end
A -->|✅| D
B -->|✅| D
C -->|❌| E
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
The Remote MCP Server is built using Cloudflare Workers, a fully managed serverless platform. This setup ensures efficient and scalable performance for both local development and deployment.
To get started with the Remote MCP Server, you can clone the repository from GitHub:
# 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 should be able to open http://localhost:8787/ in your browser.
To connect the MCP Inspector to the Remote MCP Server, run:
npx @modelcontextprotocol/inspector
Within the inspector, configure it with these settings:
SSE.http://localhost:8787/sse as the URL of the MCP server.To deploy the MCP Server on Cloudflare, follow these steps:
npx wrangler kv namespace create OAUTH_KV
wrangler.jsonc.npm run deploy
Imagine a financial analyst needs to perform complex calculations and access historical data from multiple sources. By integrating Claude Desktop with the Remote MCP Server, they can:
A legal professional requires access to comprehensive legal databases and case law while preparing documents. With the Remote MCP Server, they can:
To integrate Claude Desktop with the Remote MCP Server, follow these steps:
{
"mcpServers": {
"math": {
"command": "npx",
"args": ["mcp-remote", "https://worker-name.account-name.workers.dev/sse"]
}
}
}
The Remote MCP Server is designed to be highly compatible with various AI applications, ensuring that developers can easily integrate new tools and data sources.
| MCP Client | Resources | Tools | Prompts | Status |
|---|---|---|---|---|
| Claude Desktop | ✅ | ✅ | ✅ | Full Support |
| Continue | ✅ | ✅ | ✅ | Full Support |
| Cursor | ❌ | ✅ | ❌ | Tools Only |
In case of issues, you can restart Claude Desktop or try connecting directly to the MCP server through the command line:
npx mcp-remote http://localhost:8787/sse
To clear authentication files, you can use:
rm -rf ~/.mcp-auth
Ensure that APIs and data sources are securely configured to prevent unauthorized access. Use secure endpoints and enforce proper authentication mechanisms.
If you wish to contribute to the development of the Remote MCP Server, please follow these steps:
npm install.For more detailed information and documentation, visit the official Model Context Protocol website:
By utilizing this Remote MCP Server, developers can significantly enhance the capabilities of their AI applications, making integration and deployment processes much smoother.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration