Cloudflare Workers AI MCP Server

Cloudflare Workers AI MCP Server

Enables AI agents to access Cloudflare Workers AI for serverless LLM chat completions, text embeddings, and image generation via MCP tools.

Category
Visit Server

README

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_models List supported chat, embedding, and image models
chat_completion LLM chat completion (Llama 3.3 70B, Llama 3.1 8B, Llama 4 Scout, Qwen Coder 32B, DeepSeek R1 Distill)
embed_text Text embeddings (BGE small/base)
generate_image Image generation (Flux 1 Schnell) → base64 image (PNG/JPEG)

Setup

  1. Create a Cloudflare API token with the Workers AI permission: https://dash.cloudflare.com/profile/api-tokens
  2. Get your Account ID (right sidebar of the Cloudflare dashboard, or the /accounts/{id} segment of any dashboard URL)
  3. 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 server

Claude 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-instruct was deprecated by Cloudflare (2026-05-30) — use @cf/meta/infire-llama-3.1-8b-instruct.

Test

npm test   # unit tests (mocked fetch) + protocol test

License

MIT — built by puspoaditya.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured