building-mcp-server-on-cloudflare
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
Skill by PrashamTrivedi
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/prashamtrivedi-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: not checked yet.
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 PrashamTrivedi/CursorPlugin, MIT.
More from PrashamTrivedi/CursorPlugin
- 0.529score
cf-analytics-engine
PrashamTrivedi
Query Cloudflare Workers Analytics Engine datasets using SQL.
SkillBFreshness: BClaude Code - 0.524score
cloudflare-tunnel
PrashamTrivedi
Expose localhost to the internet via Cloudflare Tunnel.
SkillBFreshness: BClaude Code +9 - 0.524score
code-review
PrashamTrivedi
Automatic code review before commits and pushes.
SkillBFreshness: BClaude Code - 0.524score
cheap-browsing
PrashamTrivedi
Token-efficient browser automation — read pages as text, fill forms by ref, extract form structure from saved HTML, and screenshot only when a visual…
SkillBFreshness: BClaude Code +9 - 0.518score
docs
PrashamTrivedi
Update documentation and changelog to reflect codebase changes
SkillBFreshness: BClaude Code +9 - 0.518score
codeplanner-gemini
PrashamTrivedi
Plan and analyze code tasks with comprehensive project understanding with help of Gemini CLI coding agent
SkillBFreshness: BClaude Code +9 - 0.518score
completework
PrashamTrivedi
Complete and finalize task work with validation and documentation updates
SkillBFreshness: BClaude Code +9 - 0.518score
codeplanner
PrashamTrivedi
Plan and analyze code tasks with comprehensive project understanding
SkillBFreshness: BClaude Code +9 - 0.515score
brainstorm
PrashamTrivedi
Brainstorm the requirement to finalize requirements.
SkillBFreshness: BClaude Code +9 - 0.515score
background
PrashamTrivedi
Fires off a full Claude Code instance in the background
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 1, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/PrashamTrivedi/CursorPlugin
- 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.605score
building-mcp-server-on-cloudflare
CommandCodeAI
Builds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment.
SkillDFreshness: D★ 137Claude Code +9 - 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
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 PrashamTrivedi
- 0.529score
cf-analytics-engine
PrashamTrivedi
Query Cloudflare Workers Analytics Engine datasets using SQL.
SkillBFreshness: BClaude Code - 0.524score
cloudflare-tunnel
PrashamTrivedi
Expose localhost to the internet via Cloudflare Tunnel.
SkillBFreshness: BClaude Code +9 - 0.524score
code-review
PrashamTrivedi
Automatic code review before commits and pushes.
SkillBFreshness: BClaude Code - 0.524score
cheap-browsing
PrashamTrivedi
Token-efficient browser automation — read pages as text, fill forms by ref, extract form structure from saved HTML, and screenshot only when a visual…
SkillBFreshness: BClaude Code +9 - 0.518score
docs
PrashamTrivedi
Update documentation and changelog to reflect codebase changes
SkillBFreshness: BClaude Code +9 - 0.518score
codeplanner-gemini
PrashamTrivedi
Plan and analyze code tasks with comprehensive project understanding with help of Gemini CLI coding agent
SkillBFreshness: BClaude Code +9
Cite this page
building-mcp-server-on-cloudflare skill. Agent Mart. https://agentmart.dev/skills/prashamtrivedi-building-mcp-server-on-cloudflare (last updated 2026-10-24)