Cloudflare Workers AI MCP Server
Provides access to Cloudflare Workers AI for serverless LLM inference, text embeddings, and image generation using Cloudflare's API.
Enables AI agents to interact with Cloudflare Workers AI, offering tools for chat completions, embeddings, and image generation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudflare Workers AI MCP ServerGenerate an image of a red fox in a snowstorm"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudflare Workers AI MCP Server
Model Context Protocol (MCP) server that gives AI agents access to Cloudflare Workers AI — serverless LLM inference, embeddings, and image generation with a generous free tier.
Tools
Tool | Description |
| List supported chat, embedding, and image models |
| LLM chat completion (Llama 3.3 70B, Llama 3.1 8B, Llama 4 Scout, Qwen Coder 32B, DeepSeek R1 Distill) |
| Text embeddings (BGE small/base) |
| Image generation (Flux 1 Schnell) → base64 image (PNG/JPEG) |
Related MCP server: Remote MCP Server Authless
Setup
Create a Cloudflare API token with the Workers AI permission: https://dash.cloudflare.com/profile/api-tokens
Get your Account ID (right sidebar of the Cloudflare dashboard, or the
/accounts/{id}segment of any dashboard URL)Export the env vars:
export CLOUDFLARE_ACCOUNT_ID="your-account-id"
export CLOUDFLARE_API_TOKEN="your-api-token"Run
npm install && npm run build
npm start # stdio MCP serverClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"cloudflare-workers-ai": {
"command": "node",
"args": ["/absolute/path/to/cloudflare-workers-ai-mcp/dist/index.js"],
"env": {
"CLOUDFLARE_ACCOUNT_ID": "your-account-id",
"CLOUDFLARE_API_TOKEN": "your-api-token"
}
}
}
}Cursor / VS Code / other MCP clients
Point the client at the same command (node dist/index.js with the two env vars).
OpenClaw
OpenClaw supports MCP servers — add the same command to its MCP configuration.
Example prompts
"Summarize this text using the Llama 3.3 70B model on Cloudflare Workers AI"
"Generate an image of a red fox in a snowstorm"
"Embed these 3 sentences for a similarity search"
Models (verified live)
Chat: POST /ai/v1/chat/completions (OpenAI-compatible) · Embeddings & images: POST /ai/run/{model} (native)
Models — chat: @cf/meta/llama-3.3-70b-instruct-fp8-fast · @cf/meta/infire-llama-3.1-8b-instruct · @cf/meta/llama-4-scout-17b-16e-instruct · @cf/qwen/qwen2.5-coder-32b-instruct · @cf/deepseek-ai/deepseek-r1-distill-qwen-32b
Embeddings: @cf/baai/bge-small-en-v1.5 · @cf/baai/bge-base-en-v1.5
Images: @cf/black-forest-labs/flux-1-schnell
Note:
@cf/meta/llama-3.1-8b-instructwas deprecated by Cloudflare (2026-05-30) — use@cf/meta/infire-llama-3.1-8b-instruct.
Test
npm test # unit tests (mocked fetch) + protocol testLicense
MIT — built by puspoaditya.
Maintenance
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables the creation and deployment of API-based MCP tools for Cursor Agent using Cloudflare Workers, streamlining development and integration of custom functionalities.4349
- FlicenseNot gradedqualityCmaintenanceA serverless MCP implementation on Cloudflare Workers that allows connecting AI models to custom tools without authentication requirements.
- FlicenseNot gradedqualityCmaintenanceA serverless MCP implementation on Cloudflare Workers that allows connecting AI models to custom tools without requiring authentication.
- FlicenseNot gradedqualityDmaintenanceEnables deployment of a remote MCP server on Cloudflare Workers without authentication. Supports custom tools and connections to Cloudflare AI Playground and Claude Desktop.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/puspoaditya/cloudflare-workers-ai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server