Build MCP (Model Context Protocol) servers on Cloudflare Workers with tools, resources, and prompts.
Last Updated: 2025-11-21
import { McpServer } from '@modelcontextprotocol/sdk';
const server = new McpServer({
name: 'my-server',
version: '1.0.0'
});
server.tool('getTodo', async ({ id }) => ({
id,
title: 'Task',
completed: false
}));
export default server;
server.tool('searchDocs', {
description: 'Search documentation',
parameters: {
type: 'object',
properties: {
query: { type: 'string' }
}
},
handler: async ({ query }) => {
return { results: [...] };
}
});
references/quick-start-guide.md (704 lines) - Official Cloudflare templates, complete step-by-step workflow, 5-minute setupreferences/core-concepts.md (66 lines) - MCP fundamentals: tools, resources, prompts, transportsreferences/worker-basics.md (326 lines) - Worker & Durable Objects basics, transport selection, HTTP fundamentalsreferences/stateful-servers.md (246 lines) - Durable Objects integration, WebSocket hibernation, cost optimization, common patternsreferences/production-deployment.md (814 lines) - Deployment & testing, configuration reference, authentication patterns, 22 known errors with solutionstemplates/basic-mcp.ts - Minimal MCP servertemplates/tools-example.ts - Tool definitionstemplates/durable-object-mcp.ts - Stateful MCP with DOtemplates/websocket-mcp.ts - WebSocket transportOfficial Docs: https://modelcontextprotocol.io | Cloudflare: https://developers.cloudflare.com/workers/runtime-apis/durable-objects/
npx skills add secondsky/cloudflare-mcp-server下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer