impact-mcp-server

impact-mcp-server

3.3

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 instructions 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 defined tools through the MCP Inspector or Claude Desktop. This setup facilitates seamless interaction with the MCP server, allowing for efficient tool management and execution.

Features

  • Local Development: Instructions for setting up and running the MCP server locally using npm and nx.
  • MCP Inspector Connection: Steps to connect the MCP Inspector to the local MCP server for tool exploration.
  • Claude Desktop Integration: Configuration guidance for connecting Claude Desktop to the MCP server.
  • Cloudflare Deployment: Steps to deploy the MCP server to Cloudflare Workers for remote access.
  • Debugging Tips: Troubleshooting advice for common issues encountered during setup and connection.

Usage with Different Platforms

Develop Locally

bash
# clone the repository
git clone git@github.com:cloudflare/ai.git

# install dependencies
cd ai
npm install

# run locally
npx nx dev remote-mcp-server

Connect MCP Inspector

bash
npx @modelcontextprotocol/inspector

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 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"
      ]
    }
  }
}