home / mcp / workers mcp demo mcp server
cloudflare workers MCP server
Configuration
View docs{
"mcpServers": {
"akazwz-workers-mcp-demo": {
"url": "https://your-worker-url.workers.dev"
}
}
}MCP (Model Context Protocol) lets you connect AI assistants to data sources and tools so they can perform actions and fetch context during conversations. This server enables you to host custom MCP tools on Cloudflare Workers, making them accessible to Claude, Cursor, and other MCP clients for practical, real-time interactions.
After you configure your MCP server, you can use your tools directly from your AI assistant. For example, in Claude Desktop you can invoke a tool by typing a command like @workers-mcp-demo getRandomNumber to generate a random number, or use generateImage to create an image from a text prompt. Your helpers can be called from any MCP-enabled client, and the assistant will pass the request to your server to compute results and return them in the chat.
Prerequisites you need before starting:
Concrete steps you will follow to set up and run the server.
Configure your Cloudflare Worker, enable MCP, and deploy. If you are using the free Cloudflare plan, remove the browser rendering binding from the configuration to avoid limitations. This does not affect most core functions, only screenshotURL and extractImagesFromURL.
To integrate the MCP server with clients like Claude Desktop or Cursor, use the commands shown in the setup steps. You’ll configure the client to point at your worker URL and provide the path to your local MCP tooling when appropriate.
Generates a random number for use in demos, tests, or simple simulations.
Creates an image based on a text prompt, useful for visual content generation.
Takes a screenshot of a specified URL. Requires a paid Cloudflare account.
Extracts all images from a given webpage. Requires a paid Cloudflare account.