mcp-tools is a small MCP server on Cloudflare Workers. Three read-only tools (convert_units, time_in_zone, text_stats) answer from their input alone; the Worker serves them over Streamable HTTP at /mcp and counts calls in KV.
How it works
- Tool design: what every tool has (name, description for the model, schemas, structured output) and how failures reach the model.
- The HTTP transport: how a POST to
/mcpbecomes an MCP response, and what the Worker does around it. - Usage counts: what
/statscounts, where, and how far to trust it.
Why it is this way
- 0001 Stateless Streamable HTTP: a fresh server per request, no sessions.
- 0002 Tool errors are results: failures come back as tool results the model can read.
- 0003 Usage counts in KV: approximate counters in KV rather than a Durable Object.
How to
- Adding a tool: from a new file in
src/tools/to a passing test. - Connecting a client: Claude Desktop, the MCP Inspector, or curl.