booking-mcp.azeemsubhani.workers.dev
Booking MCP Server
A booking API and Model Context Protocol server that lets an AI assistant book appointments safely, live on Cloudflare's free tier.
- 9
- MCP tools, scoped per key
- $0
- running cost on free tiers
Web app screen: Session. 1 of 2
Transcript
hold_slot
id 7 · 6 ms · okProblem
Letting a language model take bookings goes wrong in predictable ways: it confirms before the customer agrees, invents cancellation rules, double-books under concurrent requests, and gets time zones wrong. I wanted a booking backend whose tools make those mistakes hard, for a fictional fitness studio called Northside Studio.
Solution
I built the booking domain once and served it two ways: a REST API and an MCP server, both on one Cloudflare Worker backed by Neon Postgres. The tools carry the rules, so the assistant quotes policies from the server and reads each hold back before confirming.
- Designed nine MCP tools around a two-step hold and confirm, so the model has to read the service, time, and price back to the customer before anything is final.
- Let Postgres prevent double-booking with an exclusion constraint, proven by deterministic two-session concurrency tests rather than application-level checks.
- Scoped every API key to one tenant and to read or write; a read key is never served write tools, because the MCP server is rebuilt per request from the caller's key.
- Added per-key rate limits with a daily cap, an audit log of every tool call with customer details redacted, and a nightly sandbox reset on a Cron Trigger.
- Converted all times in Postgres with the tenant's IANA zone, and ran the full suite on a real Postgres 18 in CI under a non-UTC session time zone to catch time zone bugs.
Watch it work
A real session against the live server, shown at 3x speed: Claude reads the policies, finds a slot, holds it, and confirms only after the customer says yes.
Try it from Claude Code
The live server takes a read-only demo key, limited to the four read tools and shared rate limits. Get in touch for a key, or run it locally from the repository.
claude mcp add --transport http booking https://booking-mcp.azeemsubhani.workers.dev/mcp --header "Authorization: Bearer <demo key>"Stack
Designed and built the API, MCP server, database, CI, and deployment independently.
- TypeScript
- MCP SDK
- Hono
- Zod
- PostgreSQL
- Cloudflare Workers
- Vitest
- GitHub Actions
Outcomes
- 9
- MCP tools, scoped per key
- $0
- running cost on free tiers
- Live on Cloudflare Workers and Neon free tiers at no running cost, usable from Claude Code over HTTP, or from Claude Desktop over stdio against your own database.
- Double-booking is rejected by the database however many requests or Worker instances race.
- Merging authentication and rate limiting into one query brought warm requests to 1 to 2 ms (REST) and 3 to 6 ms (MCP) of Worker CPU, inside the free plan's 10 ms limit.