examples/MCP-tools Public
Architecture
From .rebasely/architecture/system.yaml at fcaf000: 5 components, 4 connections.
Select a component to see what it talks to.
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), mcp-sdk (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/**
- Talks to
- zod (import)
- 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)
- mcp-sdk External
The MCP TypeScript SDK. McpServer validates arguments and builds results; the Web-standard transport speaks Streamable HTTP.
- Package
- @modelcontextprotocol/sdk
- Used by
- mcp-server (import)
- zod External
Schema library for tool inputs and outputs. The SDK turns the schemas into JSON Schema for tools/list.
- Package
- zod
- Used by
- tools (import)