examples/MCP-tools Public
Architecture
From .rebasely/architecture/system.yaml at fcaf000: 3 components, 2 connections in this view.
What runs on Cloudflare and the storage it touches, without the libraries.
Select a component to see what it talks to.
usage
KV namespaceClear
Calls and errors per tool per UTC day, kept 90 days. Approximate by design.
- Binding
- USAGE
- Used by
- mcp-server (kv)
Components
- mcp-server Worker
The Worker. Serves MCP over Streamable HTTP at /mcp, statelessly: each POST gets a fresh McpServer with every tool registered. Also counts tool calls and serves them at /stats.
- Owns
- src/index.ts, src/worker.ts, src/server.ts, src/usage.ts
- Talks to
- tools (import), usage (kv)
- tools Library
The tools themselves: a name, a description written for models, zod input and output schemas and a pure run function each. No MCP, HTTP or bindings in here.
- Owns
- src/tools/**
- Used by
- mcp-server (import)
- usage KV namespace
Calls and errors per tool per UTC day, kept 90 days. Approximate by design.
- Binding
- USAGE
- Used by
- mcp-server (kv)