remote-mcp-server-demo-demo
This document provides a guide to setting up a remote Model Context Protocol (MCP) server on Cloudflare Workers, including local development, connection to MCP Inspector, and integration with Claude Desktop.
The Remote MCP Server on Cloudflare guide details the process of setting up a Model Context Protocol server using Cloudflare Workers. It includes steps for local development, connecting to the MCP Inspector, and integrating with Claude Desktop. The guide also covers deployment to Cloudflare and provides troubleshooting tips. The MCP server allows for OAuth login and can be accessed remotely, enabling users to explore and utilize MCP tools effectively. The document provides scripts and configurations for seamless integration and operation across different platforms.
Features
- Local Development: Instructions for setting up and running the MCP server locally using pnpm and npx.
- MCP Inspector Connection: Steps to connect the MCP Inspector to the server for exploring APIs.
- Claude Desktop Integration: Configuration for connecting Claude Desktop to the local and remote MCP server.
- Cloudflare Deployment: Guide to deploying the MCP server on Cloudflare Workers with OAuth login.
- Debugging Tips: Solutions for common issues, including restarting services and clearing authentication files.
Usage with Different Platforms
Develop Locally
bash
# clone the repository
git clone https://github.com/cloudflare/ai.git
# Or if using ssh:
# git clone git@github.com:cloudflare/ai.git
# install dependencies
cd ai
# Note: using pnpm instead of just "npm"
pnpm install
# run locally
npx nx dev remote-mcp-server
Connect Claude Desktop Locally
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}
Deploy to Cloudflare
bash
npx wrangler kv namespace create OAUTH_KV
# Follow the guidance to add the kv namespace ID to wrangler.jsonc
npm run deploy
Connect Claude Desktop Remotely
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"https://worker-name.account-name.workers.dev/sse"
]
}
}
}
Debugging
bash
npx mcp-remote http://localhost:8787/sse
# In some rare cases it may help to clear the files added to ~/.mcp-auth
rm -rf ~/.mcp-auth
Related MCP Servers
View all cloud_platforms servers →Figma-Context-MCP
by GLips
Framelink Figma MCP Server allows AI-powered coding tools to access Figma design data, enhancing design implementation accuracy.
edgeone-pages-mcp
by TencentEdgeOne
An MCP service for deploying HTML content, folder, and zip file to EdgeOne Pages and obtaining a publicly accessible URL.
firecrawl-mcp-server
by mendableai
Firecrawl MCP Server is a Model Context Protocol server implementation that integrates with Firecrawl for web scraping capabilities.
HubSpot
by PipedreamHQ
Pipedream MCP Server is a reference implementation that allows you to run your own MCP server for over 2,500 apps and APIs, powered by Pipedream Connect.
mcp-atlassian
by sooperset
Model Context Protocol (MCP) server for Atlassian products (Confluence and Jira). This integration supports both Confluence & Jira Cloud and Server/Data Center deployments.
Nx MCP Server
by nrwl
A Model Context Protocol server implementation for Nx, providing LLMs with deep access to monorepo structures.
mcp-grafana
by grafana
A Model Context Protocol (MCP) server for Grafana providing access to your Grafana instance and its ecosystem.