MCP-Enabled Cloudflare Worker for Claude
An MCP server on Cloudflare Workers
Overview
This project is a Cloudflare Worker that implements the Model Context Protocol (MCP), enabling Claude to access various external services and APIs directly during conversations.
To use this worker, deploy it on Cloudflare and interact with Claude by asking it to perform tasks like fetching weather data or making web searches.
- Fetch current weather data for any city. - Look up detailed information about any IP address. - Perform Google searches with customizable result counts. - Make custom HTTP requests with full control over headers, methods, and body data.
- Getting real-time weather updates.
- Retrieving geolocation information for IP addresses.
- Conducting web searches for specific queries.
- Making custom API requests for various applications.
Add to your AI client
Use these steps to connect MCP-Enabled Cloudflare Worker for Claude 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": {
"cf-mcp-server-anishgowda21": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-cf-mcp-server-anishgowda21"
]
}
}
}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": {
"cf-mcp-server-anishgowda21": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-cf-mcp-server-anishgowda21"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"cf-mcp-server-anishgowda21": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-cf-mcp-server-anishgowda21"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"cf-mcp-server-anishgowda21": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-cf-mcp-server-anishgowda21"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"cf-mcp-server-anishgowda21": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-cf-mcp-server-anishgowda21"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"cf-mcp-server-anishgowda21": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-cf-mcp-server-anishgowda21"
]
}
}
}FAQ
What are the prerequisites for using this worker?
You need Node.js, npm, and a Cloudflare account.
How do I deploy the worker?
Follow the setup instructions in the repository to deploy the worker to Cloudflare.
Can I customize the worker?
Yes! You can modify the worker by editing the source code and redeploying it.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2225,"uuid":"5226e5a0-ae21-4570-a66a-c58d1939aedf","name":"cf-mcp-server","title":"MCP-Enabled Cloudflare Worker for Claude","description":"An MCP server on Cloudflare Workers","avatar_url":"https://avatars.githubusercontent.com/u/54987116?v=4","created_at":"2025-03-09T04:25:26.026Z","updated_at":"2025-03-12T10:20:29.609Z","status":"created","author_name":"anishgowda21","author_avatar_url":"https://avatars.githubusercontent.com/u/54987116?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/anishgowda21/cf-mcp-server","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-07 13:42:08\"}","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"}]]}]