api-workers

Deploy Cloudflare Workers entry points with a per-request MCP server factory.

148|28|Updated Mar 20, 2025
One-click install
npx skills add https://github.com/cyanheads/mcp-ts-core --skill api-workers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-workers
Source: https://github.com/cyanheads/mcp-ts-core/tree/main/skills/api-workers
Command: npx skills add https://github.com/cyanheads/mcp-ts-core --skill api-workers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cloudflare Workers deployment entry point binding tool/resource/prompt registries into a per-request MCP server factory to enable edge-based MCP deployments.

Core Features & Use Cases

  • Per-request MCP server factory: a new server instance is created for each request to ensure isolation and security.
  • Env and object bindings support: dynamic Cloudflare bindings (env, KV, R2, D1, etc.) are wired per request for correctness and rotation safety.
  • Runtime compatibility and guidance: includes runtime capability checks and wrangler.toml requirements to align with Cloudflare Workers.
  • Use cases: deployment of MCP-based tooling in edge environments, such as API endpoints, automation tasks, and serverless workflows.

Quick Start

Initialize your edge MCP server by wiring tools, resources, and prompts with createWorkerHandler in a Cloudflare Worker.

Frequently Asked Questions about api-workers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Cloudflare Workers MCP server with per-request isolation?

To deploy a Cloudflare Workers MCP server, wrap tool, resource, and prompt registries into a per-request server factory using createWorkerHandler, ensuring a new isolated server instance is created for each request for security.

What is a per-request MCP server factory in Cloudflare Workers?

A per-request MCP server factory instantiates a new isolated MCP server instance for every incoming request, dynamically wiring Cloudflare bindings like KV, R2, and D1 for correctness and rotation safety.

Can I use dynamic Cloudflare bindings like KV and R2 with an edge MCP deployment?

Yes, you can use dynamic Cloudflare bindings with edge MCP deployments. The server factory supports both env and object bindings, wiring KV, R2, and D1 resources per request to ensure rotation safety.

Do I need a specific wrangler.toml configuration for Cloudflare Workers MCP handlers?

Yes, a specific wrangler.toml configuration is required for Cloudflare Workers MCP handlers. The Skill enforces runtime compatibility checks and provides wrangler.toml guidance to align with the Cloudflare environment.

What are the limitations of using serverless MCP deployments on Cloudflare Workers?

Limitations of serverless MCP deployments on Cloudflare Workers include per-request initialization overhead and strict runtime compatibility checks. You must configure extensible CloudflareBindings and manage dynamic binding rotations correctly to avoid errors.