MCP.so
登录
服务器

Remote MCP Server on Cloudflare

@akramansaritorinit

概览

What is Remote MCP Server on Cloudflare?

A template project for running a Model Context Protocol (MCP) server on Cloudflare Workers with OAuth login. It enables developers to deploy remote MCP servers that can be connected to MCP clients like Claude Desktop or the MCP Inspector.

How to use Remote MCP Server on Cloudflare?

Clone the repository, install dependencies, and run locally with npx nx dev remote-mcp-server. Deploy to Cloudflare using npx wrangler kv namespace create OAUTH_KV and npm run deploy. Connect MCP clients by providing the SSE endpoint (e.g., http://localhost:8787/sse locally or the Workers URL).

Key features of Remote MCP Server on Cloudflare

  • OAuth-based user login for MCP server access
  • Local development with hot reload via nx dev
  • Seamless deployment to Cloudflare Workers
  • SSE (Server-Sent Events) transport for MCP communication
  • Works with MCP Inspector for testing tool calls
  • Ready-to-use configuration for Claude Desktop integration

Use cases of Remote MCP Server on Cloudflare

  • Hosting a remote MCP server for AI agents with authentication
  • Testing MCP tools locally with the MCP Inspector
  • Connecting Claude Desktop to a cloud-hosted MCP server via OAuth
  • Building and deploying custom MCP tool sets on Cloudflare’s edge

FAQ from Remote MCP Server on Cloudflare

What dependencies are required?

Node.js and npm are needed for local development. A Cloudflare account is required for deployment.

How is the MCP server accessed?

Clients connect via SSE at the /sse endpoint. The server uses OAuth for authentication during connection.

Where does user data (e.g., OAuth tokens) reside?

OAuth authentication state is stored in a Cloudflare KV namespace (OAUTH_KV) which must be created before deployment.

What transport does the server use?

It uses Server-Sent Events (SSE) as the MCP transport protocol.

Can I run this server only locally and not deploy?

Yes. The local development setup with npx nx dev remote-mcp-server runs a local server at http://localhost:8787/ for testing.

标签

来自「数据库」的更多内容