cf-mcp-server
by anishgowda21
This Cloudflare Worker implements the Model Context Protocol (MCP), allowing Claude to access external services and APIs directly from conversations. It provides tools for weather information, IP geolocation, web search, and HTTP request proxy.
Last updated: N/A
What is cf-mcp-server?
This is a Cloudflare Worker that acts as an MCP (Model Context Protocol) server, enabling Claude to interact with external services like weather APIs, IP geolocation services, and web search engines. It also allows Claude to make custom HTTP requests.
How to use cf-mcp-server?
Deploy the worker to Cloudflare following the installation and configuration instructions. Then, ask Claude to use the worker for tasks like getting weather information, looking up IP addresses, performing web searches, or making HTTP requests. Claude will automatically use the appropriate function.
Key features of cf-mcp-server
Weather Information
IP Geolocation
Web Search
HTTP Request Proxy
Use cases of cf-mcp-server
Fetching current weather data for a city
Retrieving geolocation information for an IP address
Performing Google searches
Making custom HTTP requests to external APIs
FAQ from cf-mcp-server
How do I set up the API keys?
How do I set up the API keys?
Set the OPENWEATHERMAP_API_KEY, IPINFO_API_KEY, GOOGLE_API_KEY, and GOOGLE_CX environment variables in the Cloudflare Dashboard under your worker's settings.
What happens if I don't set an API key?
What happens if I don't set an API key?
If you don't set an API key for a particular service, the corresponding function will return an error when called, but the rest of the worker will continue to function.
How do I deploy the worker?
How do I deploy the worker?
Run the command npm run deploy
to deploy your worker to Cloudflare.
How do I modify the worker or add new functions?
How do I modify the worker or add new functions?
Edit src/index.ts
, add new methods to the MyWorker
class with JSDoc comments, and deploy using npm run deploy
.
What do I do if I encounter issues with API responses?
What do I do if I encounter issues with API responses?
Check that you've set up the appropriate environment variables in the Cloudflare Dashboard. If a specific function isn't working, you might need to obtain the corresponding API key.