This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm run devornpm start- Start development server with Wranglernpm run format- Format code using Biomenpm run lint:fix- Lint and auto-fix issues using Biomenpm run type-check- Run TypeScript type checkingnpm run deploy- Deploy to Cloudflare Workers
npm run cf-typegen- Generate Cloudflare Worker types
This is an MCP (Model Context Protocol) server workshop repository containing three example use cases:
use-cases/travel-planner/- Real-time travel planning with calendar integration, flight and hotel search/bookinguse-cases/meeting-summary/- AI-powered meeting summarization and task creation from Google Docsuse-cases/restaurant-reservation/- Restaurant booking platform integration
Each use case is a complete MCP server built with:
- Cloudflare Workers for serverless deployment
- @modelcontextprotocol/sdk for MCP server implementation
- agents library for MCP agent creation
- Zod for schema validation
- TypeScript for type safety
- Biome for linting and formatting
MCP servers extend McpAgent class and define:
- Server Configuration - Name, version in
McpServerconstructor - Tool Registration - Using
this.server.tool()with Zod schemas for validation - Request Routing - Handler functions for
/sse,/mcpendpoints
Tools are defined with:
- Name and description
- Zod input schema for parameter validation
- Async handler function returning MCP content format
- Uses Cloudflare Durable Objects for state management
- SSE (Server-Sent Events) endpoint for real-time communication
- Standard MCP endpoint for protocol compliance
@modelcontextprotocol/sdk- Core MCP functionalityagents- MCP agent frameworkzod- Runtime type validationgoogleapis- Google APIs integration (travel-planner only)
wrangler.jsonc- Cloudflare Workers configuration with Durable Objects bindingsbiome.json- Code formatting/linting rules (4-space indentation, 100 char line width)tsconfig.json- TypeScript configuration
Travel planner requires Google OAuth credentials:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETGOOGLE_REDIRECT_URI
Store sensitive values as Cloudflare Workers secrets, not in wrangler.jsonc vars section.