drio
Open app

MCP Server with Cloudflare Workers

Source

MCP Server with Cloudflare Workers

Catalog onlyCatalog onlySTDIO

Overview

MCP Server with Cloudflare Workers is a framework that allows AI agents and assistants to interact with services through the Model Context Protocol (MCP). It enables the creation of scalable and efficient servers that can expose APIs for AI assistants to utilize.

To use the MCP Server, you need to set up a Cloudflare Worker by following these steps: 1) Create a new Cloudflare Worker project, 2) Configure the Wrangler CLI, 3) Install the workers-mcp package, and 4) Write your MCP server code. Finally, deploy your server using the Wrangler CLI.

  • Easy integration with Cloudflare Workers for serverless deployment. - Support for the Model Context Protocol (MCP) for AI interactions. - Ability to extend functionality by integrating with external APIs. - Secure deployment options using Wrangler Secrets.
  1. Building AI assistants that can fetch real-time data from APIs.
  2. Creating personalized interactions for users through AI-driven responses.
  3. Developing scalable server solutions for various AI applications.

Add to your AI client

Use these steps to connect MCP Server with Cloudflare Workers in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "my-mcp-worker-sivakumarl": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-my-mcp-worker-sivakumarl"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "my-mcp-worker-sivakumarl": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-my-mcp-worker-sivakumarl"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "my-mcp-worker-sivakumarl": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-my-mcp-worker-sivakumarl"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "my-mcp-worker-sivakumarl": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-my-mcp-worker-sivakumarl"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "my-mcp-worker-sivakumarl": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-my-mcp-worker-sivakumarl"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "my-mcp-worker-sivakumarl": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-my-mcp-worker-sivakumarl"
      ]
    }
  }
}

FAQ

Can I use MCP Server for any type of API?

Yes! MCP Server can be used to expose any API that you want AI assistants to access.

Is there a cost associated with using Cloudflare Workers?

Cloudflare Workers has a free tier, but usage beyond that may incur costs.

How secure is the MCP Server?

The MCP Server can be secured using shared-secret authentication and other security measures provided by Cloudflare.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3642,"uuid":"872d64fa-6882-4451-be68-624ebd7cd67b","name":"my-mcp-worker","title":"MCP Server with Cloudflare Workers","description":"MCP Server with Cloudflare Workers","avatar_url":"https://avatars.githubusercontent.com/u/24239452?v=4","created_at":"2025-03-20T18:35:17.567Z","updated_at":"2025-03-20T19:00:27.953Z","status":"created","author_name":"sivakumarl","author_avatar_url":"https://avatars.githubusercontent.com/u/24239452?v=4","tags":"mcp,cloudflare,server,api,ai-assistant","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/sivakumarl/my-mcp-worker","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-20 14:27:23\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]