← Back to all products

MCP Server Starter

$49

Production-shaped remote MCP server starter — Streamable HTTP on Cloudflare Workers, stateless + stateful patterns, typed tools, discovery, rate limiting, and Vitest tests.

📁 11 files🏷 v1.0.0 (updated 2026-08-02)
Production-ready
✓ Instant download✓ Lifetime updates✓ MIT licensed✓ MIT license✓ Secure checkout (Stripe)

📋 What's Inside 11 files

  • LICENSE
  • README.md
  • package.json
  • src/descriptor.ts
  • src/ratelimit.ts
  • src/server.ts
  • src/transport.ts
  • src/worker.ts
  • test/server.test.ts
  • wrangler.toml
  • manifest.json

📁 File Structure 11 files

mcp-server-starter/
├── LICENSE
├── README.md
├── package.json
├── src/
│ ├── descriptor.ts
│ ├── ratelimit.ts
│ ├── server.ts
│ ├── transport.ts
│ ├── worker.ts
├── test/
│ ├── server.test.ts
├── wrangler.toml
├── manifest.json

📖 Documentation Preview README excerpt

MCP Server Starter — Remote Streamable HTTP on Cloudflare Workers

A production-shaped starter for building a **remote Model Context Protocol (MCP)

server** that any MCP client (Claude Desktop, Cursor, Cline, OpenCode, or your own

agent) can connect to over the network. It uses the Streamable HTTP transport

and runs on Cloudflare Workers (or any Web-standard runtime: Deno, Bun, Node 18+).

This is the exact shape used to ship a live, registry-listed commerce MCP server —

generalized, anonymized, and reduced to a clean starting point you can extend.

Why this exists

Most MCP tutorials show a local stdio server. Real agents increasingly connect

to remote servers over HTTP. Remote servers are harder: you have to handle the

Streamable HTTP transport correctly, decide between stateless and session modes,

run inside a serverless runtime with no Node built-ins, and expose a discovery

surface so clients can find you. This starter solves all of that.

Features

  • **Streamable HTTP transport** — Web-standard `Request`/`Response`, works on
  • Workers/Deno/Bun with no Node-only APIs.

  • **Stateless mode by default** — a fresh server per request, no Durable Objects
  • required; ideal for read-heavy public tools. A documented path to stateful

    sessions is included.

  • **Typed tools with zod schemas** — two worked example tools (`echo`, `add`) show
  • input validation, structured content, and error contracts.

  • **Friendly discovery** — a plain `GET /mcp` returns a JSON descriptor instead of
  • an opaque 406, plus a /.well-known/mcp.json manifest.

  • **Rate limiting** — a token-bucket limiter (in-memory, with a KV upgrade note).
  • **Tests** — a Vitest suite that drives the server through the transport end to
  • end (initialize, tools/list, tools/call).

    Requirements

  • Node.js 18+ (for local dev and tests)
  • A Cloudflare account (free tier is fine) for deployment
  • `npm`
  • Quick start

    
    

    npm install

    npm test # runs the Vitest suite against the in-process server

    npm run dev # wrangler dev — serves /mcp locally

    
    
    

    Point an MCP client at http://localhost:8787/mcp (Streamable HTTP). Or smoke-test

    with curl:

    
    

    curl http://localhost:8787/mcp \

    -H 'Content-Type: application/json' \

    -H 'Accept: application/json, text/event-stream' \

    -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

    
    
    

    File tree


    ... preview truncated, see full README in product download.

    📄 Code Sample .ts preview

    src/descriptor.ts/** * descriptor.ts — machine-discovery for the server. * * A plain GET to /mcp (from a browser or a crawler) should not return an opaque * 406. Return a small JSON descriptor instead, and mirror it at * /.well-known/mcp.json so clients and registries can discover the endpoint. */ import { SERVER_INFO, TOOL_NAMES } from './server.js'; export function descriptor(baseUrl: string): Record<string, unknown> { return { name: SERVER_INFO.name, version: SERVER_INFO.version, protocol: 'mcp', protocol_version: '2025-06-18', transport: 'streamable-http', endpoint: `${baseUrl}/mcp`, tools: [...TOOL_NAMES], usage: 'POST JSON-RPC 2.0 with Accept: application/json, text/event-stream. Example: {"jsonrpc":"2.0","id":1,"method":"tools/list"}', }; } /** True when the request is a real MCP protocol call (vs a discovery GET). */ export function isMcpCall(req: Request): boolean { if (req.method === 'POST') return true; return (req.headers.get('accept') ?? '').includes('text/event-stream'); }

    📅 Changelog

    v1.0.0 — Initial release. Last updated 2026-08-02.

    Purchases include lifetime updates. Check the product page for the latest version.

    📄 Product Preview

    Try the interactive reader and demo tools below, or get the full product with all content unlocked.

    📖 Interactive Reader (Free Preview)⚙ Try Demo Tools📦 Download Free Sample

    ❓ Frequently Asked Questions

    What license is this under?

    How do I download after purchase?

    Do I get updates?

    What if it doesn't work for me?

    Can I get a refund?

    Is there support?

    Buy Now — $49 Back to Products