jackspace/claudeskillz/typescript-mcp
- community
Checking that the SKILL.md file is still in the repository.
Building MCP (Model Context Protocol) servers in TypeScript on Cloudflare Workers with the official @modelcontextprotocol/sdk: registering tools, resources, and prompts, Hono HTTP routing, StreamableHTTPServerTransport setup, authentication (API keys, OAuth, Zero Trust), Cloudflare D1/KV/R2/Vectorize integration, wrangler deployment, and testing. Prevents common failures including export syntax errors, Zod schema validation failures, memory leaks from unclosed transports, CORS misconfiguration, and missing rate limiting. Use when exposing APIs, tools, or data to LLMs as a stateless serverless MCP server on the edge. Not for Python MCP servers (see FastMCP), stateful WebSocket agents (Cloudflare Agents SDK), or local stdio CLI tools.
Install
npx vskill@latest install jackspace/claudeskillz/typescript-mcpSKILL.md
TypeScript MCP Server on Cloudflare Workers
Build production-ready Model Context Protocol (MCP) servers using TypeScript and deploy them on Cloudflare Workers. This skill covers the official @modelcontextprotocol/sdk, HTTP transport setup, authentication patterns, Cloudflare service integrations, and comprehensive error prevention.
When to Use This Skill
Use this skill when:
- Building MCP servers to expose APIs, tools, or data to LLMs
- Deploying serverless MCP endpoints on Cloudflare Workers
- Integrating external APIs as MCP tools (REST, GraphQL, databases)
- Creating stateless MCP servers for edge deployment
- Exposing Cloudflare services (D1, KV, R2, Vectorize) via MCP protocol
- Implementing authenticated MCP servers with API keys, OAuth, or Zero Trust
- Building multi-tool MCP servers with resources and prompts
- Needing production-ready templates that prevent common MCP errors
Do NOT use this skill when:
- Building Python MCP servers (use FastMCP skill instead)
- Needing stateful agents with WebSockets (use Cloudflare Agents SDK)
- Wanting long-running persistent agents with SQLite storage (use Durable Objects)
- Building local CLI tools (use stdio transport, not HTTP)
Core Concepts
MCP Protocol Components
1. Tools - Functions LLMs can invoke
- Input/output schemas defined with Zod
- Async handlers return structured content
- Can call external APIs, databases, or computations
2. Resources - Static or dynamic data exposure
- URI-based addressing (e.g.,
config://app/settings) - Templates support parameters (e.g.,
user://{userId}) - Return text, JSON, or binary data
3. Prompts - Pre-configured prompt templates
- Provide reusable conversation starters
- Can include placeholders and dynamic content
- Help standardize LLM interactions
4. Completions (Optional) - Argument auto-complete
- Suggest valid values for tool arguments
- Improve developer experience
Quick Start
1. Basic MCP Server Template
Use the basic-mcp-server.ts template for a minimal working server:
Install dependencies:
Deploy:
2. Tool-Server Template
Use tool-server.ts for exposing multiple tools (API integrations, calculations):
3. Resource-Server Template
Use resource-server.ts for exposing data:
4. Authenticated Server Template
Use authenticated-server.ts for production security:
Authentication Patterns
Pattern 1: API Key (Recommended for Most Cases)
Setup:
- Create KV namespace:
wrangler kv namespace create MCP_API_KEYS - Add to
wrangler.jsonc:
Implementation:
Manage keys:
Pattern 2: Cloudflare Zero Trust Access
Pattern 3: OAuth 2.0
See references/authentication-guide.md for complete OAuth implementation.
Cloudflare Service Integration
D1 Database Tool Example
Wrangler config:
KV Storage Tool Example
R2 Object Storage Tool Example
Vectorize Search Tool Example
Testing Strategies
1. Unit Testing with Vitest
Install:
Run:
2. Integration Testing with MCP Inspector
3. E2E Testing with Claude Agent SDK
See references/testing-guide.md for comprehensive testing patterns.
Known Issues Prevention
This skill prevents 10+ production issues documented in official MCP SDK and Cloudflare repos:
Issue #1: Export Syntax Issues (CRITICAL)
Error: "Cannot read properties of undefined (reading 'map')" Source: honojs/hono#3955, honojs/vite-plugins#237 Why It Happens: Incorrect export format with Vite build causes cryptic errors Prevention:
Issue #2: Unclosed Transport Connections
Error: Memory leaks, hanging connections Source: Best practice from SDK maintainers Why It Happens: Not closing StreamableHTTPServerTransport on request end Prevention:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/typescript-mcp/SKILL.md
Popularity
- Repository stars
- 10
- Repository forks
- 4
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jackspace/claudeskillz/typescript-mcp)