Get the FREE Ultimate OpenClaw Setup Guide →

remote -demo

MCP server from elithrar/remote-mcp-server-demo

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio elithrar-remote-mcp-server-demo npx nx dev remote-mcp-server

How to use

This MCP server runs a remote instance of the MCP server in Cloudflare Workers and pairs it with OAuth login, exposing an API that you can connect to with the MCP Inspector or Claude Desktop. Once running locally, the server serves an SSE endpoint at /sse for tool discovery and invocation, and it authenticates users via OAuth so you can test login flows end-to-end. Use the MCP Inspector to explore available tools, invoke them, and observe responses. You can also connect Claude Desktop by pointing it to the server's SSE URL, enabling Claude to discover and call the server’s tools within your environment.

To connect from Claude, configure a local proxy (as demonstrated in the README) or point Claude directly to your running server. The MCP Inspector's recommended Transport Type is SSE, and you should enter the server URL http://localhost:8787/sse when developing locally. When deployed to Cloudflare, you’ll point your clients (including Claude) at your workers.dev URL with the appropriate /sse path, e.g. https://your-workers.dev/sse. Tools exposed by the server will appear in the inspector or Claude’s tool list, and you can invoke them by selecting a tool and providing the required inputs.

The repository’s demo emphasizes remote operation and OAuth login, enabling you to explore MCP capabilities such as tool invocation, session management, and integration with external identity providers. Expect to interact with a set of defined tools (e.g., math or utility tools) via a consistent MCP protocol surface, allowing inference and tool use through your client of choice.

How to install

Prerequisites:

  • Node.js (LTS version) and npm installed
  • Git installed
  • Optional: Wrangler CLI if you plan to deploy to Cloudflare Workers

Install and run locally:

  1. Clone the repository: git clone git@github.com:cloudflare/ai.git

  2. Install dependencies: cd ai npm install

  3. Start the local MCP server (develop mode for remote-mcp-server): npx nx dev remote-mcp-server

    This will boot the server and expose the MCP SSE endpoint at http://localhost:8787/sse

Optional: Deploy to Cloudflare Workers 4) Install Wrangler (if not already): npm i -g wrangler

  1. Create a KV namespace for OAuth if needed (as per instructions in the repo): wrangler kv namespace create OAUTH_KV

  2. Follow the Cloudflare deployment steps in the README (update wrangler.jsonc with the KV namespace, then run): npm run deploy

Notes:

  • Ensure that your environment variables for OAuth (client IDs, redirect URIs) are configured as required by the provider you’re using.
  • If you modify any environment-specific URLs, rebuild and redeploy to reflect changes.

Additional notes

Tips and common issues:

  • If the MCP server won’t connect from Claude Desktop, verify that your OAuth flow is reachable from your environment and that the redirect URIs match your deployment domain.
  • When testing locally, ensure port 8787 is not blocked and that you’re using the correct SSE URL (/sse).
  • If you encounter authentication issues, you may need to clear local auth data: rm -rf ~/.mcp-auth
  • For remote deployments, make sure your workers.dev URL is accessible and that the /sse path is correctly exposed by your Worker.
  • The README demonstrates an example Claude configuration using mcp-remote; adapt the server name and URL to your deployment when configuring clients.
  • If you upgrade dependencies, run npm install again to refresh the local node_modules and rebuild as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers