building-mcp-server-on-cloudflare
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
Skill by CommandCodeAI
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/commandcodeai-building-mcp-server-on-cloudflare
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, devops, cloud, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/building-mcp-server-on-cloudflare
What's inside
- Skill name
building-mcp-server-on-cloudflare- Description
- Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment. Generates server code, configures auth providers, and deploys to Workers. Use when: user wants to "build MCP server", "create MCP tools", "remote MCP", "deploy MCP", add "OAuth to MCP", or mentions Model Context Protocol on Cloudflare. Also triggers on "MCP authentication" or "MCP deployment".
- License
- MIT
- Instructions
- 255 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- files: referenced but missing: references/tool-patterns.md
Files (4)
- SKILL.md
- examples.md · references/
- oauth-setup.md · references/
- troubleshooting.md · references/
SKILL.md (first lines)
# Building MCP Servers on Cloudflare
Creates production-ready Model Context Protocol servers on Cloudflare Workers with tools, authentication, and deployment.
## When to Use
- User wants to build a remote MCP server
- User needs to expose tools via MCP
- User asks about MCP authentication or OAuth
- User wants to deploy MCP to Cloudflare Workers
## Prerequisites
- Cloudflare account with Workers enabled
- Node.js 18+ and npm/pnpm/yarn
- Wrangler CLI (`npm install -g wrangler`)
## Quick Start
### Option 1: Public Server (No Auth)
```bash
npm create cloudflare@latest -- my-mcp-server \
--template=cloudflare/ai/demos/remote-mcp-authless
cd my-mcp-server
npm start
```
Server runs at `http://localhost:8788/mcp`
### Option 2: Authenticated Server (OAuth)
```bash
npm create cloudflare@latest -- my-mcp-server \
--template=cloudflare/ai/demos/remote-mcp-github-oauth
cd my-mcp-server
```
Requires OAuth app setup. See [references/oauth-setup.md](references/oauth-setup.md).
## Core Workflow
### Step 1: Define Tools
Tools are functions MCP clients can call. Define them using `server.tool()`:
```typescript
import { McpAgent } from "agents/mcp";
import { z } from "zod";
export class MyMCP extends McpAgent {
server = new Server({ name: "my-mcp", version: "1.0.0" });
async init() {
// Simple tool with parameters
this.server.tool(
"add",
{ a: z.number(), b: z.number() },
async ({ a, b }) => ({
content: [{ type: "text", text: String(a + b) }],
})
);
// Tool that calls external API
this.server.tool(
"get_weather",
{ city: z.string() },
async ({ city }) => {
const response = await fetch(`https://api.weather.com/${city}`);
const data = await response.json();
return {
content: [{ type: "text", text: JSON.stringify(data) }],
};
}
);
}
}
```
### Step 2: Configure Entry Point
**Public server** (`src/index.ts`):
```typescript
import { MyMCP } from "./mcp";
export default {
fetch(request: Request, env: Env, ctx: ExecutionContext) {
const url = new URL(request.url);
if (url.pathname === "/mcp") {
return MyMCP.serveSSE("/mcp").fetch(request, env, ctx);
}
return new Response("MCP Server", { status: 200 });
},
};
export { MyMCP };
```
**Authenticated server** — See [references/oauth-setup.md](references/oauth-setup.md).
### Step 3: Test Locally
```bash
# Start server
npm start
# In another terminal, test with MCP Inspector
npx @modelcontextprotocol/inspector@latest
# Open http://localhost:5173, enter http://localhost:8788/mcp
```
### Step 4: Deploy
```bash
npx wrangler deploy
```
Server accessible at `https://[worker-name].[account].workers.dev/mcp`From CommandCodeAI/agent-skills, MIT.
More from CommandCodeAI/agent-skills
- 0.609score
building-ai-agent-on-cloudflare
CommandCodeAI
Builds AI agents on Cloudflare using the Agents SDK with state management, real-time WebSockets, scheduled tasks, tool integration, and chat capabilities.
SkillDFreshness: D★ 137Claude Code +9 - 0.606score
aws-cost-operations
CommandCodeAI
This skill provides AWS cost optimization, monitoring, and operational best practices with integrated MCP servers for billing analysis, cost estimation…
SkillDFreshness: D★ 137Claude Code +9 - 0.604score
playwright-skill
CommandCodeAI
Complete browser automation with Playwright.
SkillDFreshness: D★ 137Claude Code +9 - 0.604score
aws-agentic-ai
CommandCodeAI
AWS Bedrock AgentCore comprehensive expert for deploying and managing all AgentCore services.
SkillDFreshness: D★ 137Claude Code +9 - 0.522score
video-downloader
CommandCodeAI
Downloads videos from YouTube and other platforms for offline viewing, editing, or archival.
SkillDFreshness: D★ 137Claude Code +9 - 0.522score
invoice-organizer
CommandCodeAI
Automatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting…
SkillDFreshness: D★ 137Claude Code +9 - 0.522score
raffle-winner-picker
CommandCodeAI
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests.
SkillDFreshness: D★ 137Claude Code +9 - 0.519score
welcome-me
commandcodeai
Greet user with a specific message when they say they're new or ask for a welcome message.
SkillDFreshness: D★ 137Claude Code +9 - 0.505score
mcp-builder
CommandCodeAI
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools.
SkillDFreshness: D★ 137Claude Code +9 - 0.500score
canvas-design
CommandCodeAI
Create beautiful visual art in .png and .pdf documents using design philosophy.
SkillDFreshness: D★ 137Claude Code +9 - 0.500score
brand-guidelines
CommandCodeAI
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel.
SkillDFreshness: D★ 137Claude Code +9 - 0.499score
requesting-code-review
CommandCodeAI
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
SkillDFreshness: D★ 137Claude Code +9
Signals
- Stars
- 137
- Forks
- 42
- Open issues
- 4
- Last commit (this folder)
- Dec 24, 2025 (10 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/CommandCodeAI/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.399score
building-mcp-server-on-cloudflare
sharkrebel
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
SkillAFreshness: A★ 73Claude Code +9 - 0.315score
building-mcp-server-on-cloudflare
PrashamTrivedi
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
SkillBFreshness: BClaude Code +9 - 0.315score
building-mcp-server-on-cloudflare
Vidoxlabs
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
SkillBFreshness: BClaude Code +9 - 0.260score
building-mcp-server-on-cloudflare
involvex
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
SkillDFreshness: D★ 1Claude Code +9 - 0.243score
building-mcp-server-on-cloudflare
involvex
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
SkillDFreshness: DClaude Code +9
More from CommandCodeAI
- 0.663score
command-code
CommandCodeAI
Terminal coding agent that learns from accept, reject and edit decisions through its taste model.
AgentAFreshness: A★ 4.2K - 0.609score
building-ai-agent-on-cloudflare
CommandCodeAI
Builds AI agents on Cloudflare using the Agents SDK with state management, real-time WebSockets, scheduled tasks, tool integration, and chat capabilities.
SkillDFreshness: D★ 137Claude Code +9 - 0.606score
aws-cost-operations
CommandCodeAI
This skill provides AWS cost optimization, monitoring, and operational best practices with integrated MCP servers for billing analysis, cost estimation…
SkillDFreshness: D★ 137Claude Code +9 - 0.604score
aws-agentic-ai
CommandCodeAI
AWS Bedrock AgentCore comprehensive expert for deploying and managing all AgentCore services.
SkillDFreshness: D★ 137Claude Code +9 - 0.604score
playwright-skill
CommandCodeAI
Complete browser automation with Playwright.
SkillDFreshness: D★ 137Claude Code +9 - 0.522score
raffle-winner-picker
CommandCodeAI
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests.
SkillDFreshness: D★ 137Claude Code +9
Cite this page
building-mcp-server-on-cloudflare skill. Agent Mart. https://agentmart.dev/skills/commandcodeai-building-mcp-server-on-cloudflare (last updated 2026-10-24)