Cloudflare Workers AI MCP logo

Cloudflare Workers AI MCP

by puspoaditya

Cloudflare Workers AI inference for AI agents: LLM chat completions (Llama 3.3 70B, Llama 3.1 8B, Llama 4 Scout, Qwen Coder 32B, DeepSeek R1 Distill), text embeddings (BGE small/base), and image generation (Flux 1 Schnell) — generous free tier, no infrastructure to run. npx -y @puspoaditya/cloudflare-workers-ai-mcp.

Install Cloudflare Workers AI MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "puspoaditya-cloudflare-workers-ai-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@puspoaditya/cloudflare-workers-ai-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 4 tools correctly (3d ago).

Overview

Tools4

What Cloudflare Workers AI MCP lets your agent do. Expand a tool for its parameters.

Verified live~1.1k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

7/7 checks healthy over the last 44d

What it can do

From the 4 tools this server returned when we ran it.

Handles credentials · 1Makes network requests · 1Read-only tools · 4
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age59 days
Maintainers1

Observed 2026-10-19 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · @puspoaditya/cloudflare-workers-ai-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads38Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed4Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

From the project 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

ToolDescription
list_modelsList supported chat, embedding, and image models
chat_completionLLM chat completion (Llama 3.3 70B, Llama 3.1 8B, Llama 4 Scout, Qwen Coder 32B, DeepSeek R1 Distill)
embed_textText embeddings (BGE small/base)
generate_imageImage 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:
server.ts
export CLOUDFLARE_ACCOUNT_ID="your-account-id"
export CLOUDFLARE_API_TOKEN="your-api-token"

Run

Terminal
npm install && npm run build
npm start   # stdio MCP server

Claude Desktop

Add to claude_desktop_config.json:

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

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

License

MIT — built by puspoaditya.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cloudflare Workers AI MCP

puspoaditya/cloudflare-workers-ai-mcp is an MCP server that gives AI agents access to Cloudflare Workers AI for serverless chat completions, text embeddings, and image generation. It provides list_models, chat_completion, embed_text, and generate_image tools, supports the listed Llama, Qwen, DeepSeek, BGE, and Flux models, and runs without infrastructure using Cloudflare’s service.

Configure it by creating a Cloudflare API token with Workers AI permission, setting CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN, and running the server with npx -y @puspoaditya/cloudflare-workers-ai-mcp or the built Node.js entrypoint. MCP clients can launch it over stdio.

The server supports list_models, chat_completion, embed_text, and generate_image. Chat models include Llama 3.3 70B, Llama 3.1 8B, Llama 4 Scout, Qwen Coder 32B, and DeepSeek R1 Distill; embeddings use BGE small or base, and image generation uses Flux 1 Schnell.

You can use it with Claude Desktop, Cursor, VS Code, and other MCP clients by configuring the client to run the server command with your Cloudflare account ID and API token. OpenClaw also supports the same MCP server configuration.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCloudflare Workers AI MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/puspoaditya-cloudflare-workers-ai-mcp?style=directory)](https://allmcps.com/mcp/puspoaditya-cloudflare-workers-ai-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/puspoaditya-cloudflare-workers-ai-mcp"><img src="https://allmcps.com/api/badge/puspoaditya-cloudflare-workers-ai-mcp?style=directory" alt="Cloudflare Workers AI MCP on AllMCPs" /></a>