> cloudflare-mcp-server

Build MCP (Model Context Protocol) servers on Cloudflare Workers with tools, resources, and prompts.

fetch
$curl "https://skillshub.wtf/secondsky/claude-skills/cloudflare-mcp-server?format=md"
SKILL.mdcloudflare-mcp-server

Cloudflare MCP Server

Last Updated: 2025-11-21

Quick Start

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;

Core Concepts

  • Tools: Functions AI can call
  • Resources: Data AI can access
  • Prompts: Reusable templates
  • Transports: SSE, HTTP, WebSocket

Example Tool

server.tool('searchDocs', {
  description: 'Search documentation',
  parameters: {
    type: 'object',
    properties: {
      query: { type: 'string' }
    }
  },
  handler: async ({ query }) => {
    return { results: [...] };
  }
});

Resources

Core Documentation

  • references/quick-start-guide.md (704 lines) - Official Cloudflare templates, complete step-by-step workflow, 5-minute setup
  • references/core-concepts.md (66 lines) - MCP fundamentals: tools, resources, prompts, transports
  • references/worker-basics.md (326 lines) - Worker & Durable Objects basics, transport selection, HTTP fundamentals
  • references/stateful-servers.md (246 lines) - Durable Objects integration, WebSocket hibernation, cost optimization, common patterns
  • references/production-deployment.md (814 lines) - Deployment & testing, configuration reference, authentication patterns, 22 known errors with solutions

Templates

  • templates/basic-mcp.ts - Minimal MCP server
  • templates/tools-example.ts - Tool definitions
  • templates/durable-object-mcp.ts - Stateful MCP with DO
  • templates/websocket-mcp.ts - WebSocket transport

Official Docs: https://modelcontextprotocol.io | Cloudflare: https://developers.cloudflare.com/workers/runtime-apis/durable-objects/

> related_skills --same-repo

> zustand-state-management

--- name: zustand-state-management description: Zustand state management for React with TypeScript. Use for global state, Redux/Context API migration, localStorage persistence, slices pattern, devtools, Next.js SSR, or encountering hydration errors, TypeScript inference issues, persist middleware problems, infinite render loops. Keywords: zustand, state management, React state, TypeScript state, persist middleware, devtools, slices pattern, global state, React hooks, create store, useBoundS

> zod

TypeScript-first schema validation and type inference. Use for validating API requests/responses, form data, env vars, configs, defining type-safe schemas with runtime validation, transforming data, generating JSON Schema for OpenAPI/AI, or encountering missing validation errors, type inference issues, validation error handling problems. Zero dependencies (2kb gzipped).

> xss-prevention

--- name: xss-prevention description: XSS attack prevention with input sanitization, output encoding, Content Security Policy. Use for user-generated content, rich text editors, web application security, or encountering stored XSS, reflected XSS, DOM manipulation, script injection errors. Keywords: sanitization, HTML-encoding, DOMPurify, CSP, Content-Security-Policy, rich-text-editor, user-input, escaping, innerHTML, DOM-manipulation, stored-XSS, reflected-XSS, input-validation, output-encodi

> wordpress-plugin-core

--- name: wordpress-plugin-core description: WordPress plugin development with hooks, security, REST API, custom post types. Use for plugin creation, $wpdb queries, Settings API, or encountering SQL injection, XSS, CSRF, nonce errors. Keywords: wordpress plugin development, wordpress security, wordpress hooks, wordpress filters, wordpress database, wpdb prepare, sanitize_text_field, esc_html, wp_nonce, custom post type, register_post_type, settings api, rest api, admin-ajax, wordpress sql inj

┌ stats

installs/wk0
░░░░░░░░░░
github stars100
██████████
first seenApr 3, 2026
└────────────