Remote MCP Server on Cloudflare
by rawatadit
This project allows you to set up a remote Model Context Protocol (MCP) server on Cloudflare Workers with OAuth login. It enables you to connect to the server locally or remotely using tools like the MCP Inspector and Claude Desktop.
Last updated: N/A
What is Remote MCP Server on Cloudflare?
This is a remote MCP server implementation designed to run on Cloudflare Workers. It provides a way to expose MCP tools and functionality over a network, allowing clients like the MCP Inspector and Claude Desktop to interact with them.
How to use Remote MCP Server on Cloudflare?
To use this server, you first need to clone the repository and install the dependencies. You can then run it locally for development and testing. To deploy it to Cloudflare, you need to create a KV namespace, update the wrangler.jsonc
file, and run the deploy command. Finally, configure your MCP client (e.g., MCP Inspector or Claude Desktop) to connect to the deployed server's URL.
Key features of Remote MCP Server on Cloudflare
Remote access to MCP tools
Cloudflare Workers deployment
OAuth login
SSE transport
Integration with MCP Inspector and Claude Desktop
Use cases of Remote MCP Server on Cloudflare
Exposing MCP tools to remote clients
Integrating MCP functionality into cloud-based applications
Enabling Claude Desktop to use remote MCP servers
Testing and developing MCP tools in a serverless environment
FAQ from Remote MCP Server on Cloudflare
How do I connect to the server locally?
How do I connect to the server locally?
Use the MCP Inspector with the SSE transport type and the URL http://localhost:8787/sse
.
How do I deploy the server to Cloudflare?
How do I deploy the server to Cloudflare?
Create a KV namespace, update wrangler.jsonc
with the namespace ID, and run npm run deploy
.
How do I connect Claude Desktop to the server?
How do I connect Claude Desktop to the server?
Update the Claude configuration file to point to the server's URL (e.g., https://worker-name.account-name.workers.dev/sse
).
What if something goes wrong?
What if something goes wrong?
Try restarting Claude or connecting directly to the MCP server on the command line with npx mcp-remote http://localhost:8787/sse
. You can also try clearing the files added to ~/.mcp-auth
.
Where can I find more information about MCP?
Where can I find more information about MCP?
Visit the Model Context Protocol website: https://modelcontextprotocol.io/