Remote MCP Server on Cloudflare

by MCP-Mirror

110 downloads Not rated yet
GitHub

About

A template for deploying a remote MCP (Model Context Protocol) server on Cloudflare Workers with OAuth login. It provides a ready-to-run MCP server using SSE transport, intended for developers who want to run MCP servers remotely.

Explore

- Deploys to Cloudflare Workers for remote access.
- Includes OAuth login out of the box.
- Supports local development with npx nx dev.
- Integrates with the MCP Inspector for testing.
- Uses SSE (Server-Sent Events) transport.
- Provides a getToken tool to inspect the Authorization header.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Remote MCP Server on Cloudflare
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

cd ai
npm install

npm run deploy

Just like you did above in "Develop locally", run the MCP inspector:

npx @modelcontextprotocol/inspector@latest

Then enter the workers.dev URL (ex: worker-name.account-name.workers.dev/sse) of your Worker in the inspector as the URL of the MCP server to connect to, and click "Connect".

You've now connected to your MCP server from a remote MCP client. You can pass in a bearer token like mentioned above

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "remote mcp server on cloudflare": {
            "huanshenyi_mcp-server-bearer-auth": {
                "command": "npx",
                "args": [
                    "nx",
                    "dev",
                    "remote-mcp-server-bearer-auth"
                ]
            }
        }
    }
}

McpServers

{
    "huanshenyi_mcp-server-bearer-auth": {
        "command": "npx",
        "args": [
            "nx",
            "dev",
            "remote-mcp-server-bearer-auth"
        ]
    }
}

Let's get a remote MCP server up-and-running on Cloudflare Workers complete with OAuth login!

Develop locally

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.