I built a booking API for AI agents — here's the MCP endpoint
For the past year I've been watching AI assistants fail at a simple task: booking an appointment.
Not because they can't have a conversation about it. They can. The problem is what happens after the conversation — when the agent actually tries to reserve a time slot.
Two agents grab the same slot simultaneously. The business gets a booking it can't verify. The agent that "confirmed" the meeting has no proof it happened. The whole thing falls apart.
So I built LeapCal — a trust infrastructure layer specifically designed for AI-to-business bookings.
The three problems
1. Double-booking
Imagine two AI assistants, working for different users, both searching for a haircut slot on Friday at 2pm. The slot is available. Both agents see it. Both agents book it. The business now has two clients showing up at the same time.
This is a distributed systems problem. It needs distributed locking.
My solution: LeapLock
A 90-second atomic hold using Redlock across 3 independent Redis nodes. The first agent to call reserve() owns the slot. The second gets SLOT_LOCKED. Lock expires automatically — no leaked locks, no orphaned reservations.
// Agent 1 gets the lock await leap.reserve('slot_abc123'); // ✅ Lock acquired — 90 seconds // Agent 2 tries simultaneously await leap.reserve('slot_abc123'); // ❌ LeapCalError: SLOT_LOCKED 2. Trust
If I'm a business owner and an AI agent books a slot on behalf of a client, how do I know if this agent is legitimate? A spam agent that books and never shows up costs me real money.
My solution: LeapID + LeapRank
Every agent gets a LeapID — an Ed25519 keypair, W3C DID-compatible (did:leap:...). Every booking is recorded. No-shows and cancellations tank the score. Reliable bookings increase it.
const agent = await leap.verifyAgent('0x1234...abcd'); // { // leapRank: 750, // tier: 'Elite', // completionRate: 0.98, // totalBookings: 847, // } A LeapRank of 500+ is "Trusted". Businesses can set minimum LeapRank requirements. Low-trust agents get rejected before they waste anyone's time.
3. Proof
An AI agent says "I booked your appointment." Did it? Can you prove it? Can the business dispute a no-show? Can you share a verifiable receipt with your client?
My solution: LeapLedger
Every booking writes an immutable entry to a tamper-proof append-only log (immudb). Every entry is chained. Every booking gets a cryptographically signed receipt.
const result = await leap.verifyReceipt('0xabc123...'); // { // valid: true, // ledgerHistory: [ // { type: 'BOOKING_CONFIRMED', timestamp: '2026-11-05T13:00:00Z', hash: '0x...' }, // ] // } If a receipt says valid: false, the booking never happened on LeapCal. Full stop.
The MCP endpoint
For Claude, Cursor, Windsurf, and any other MCP-compatible assistant:
{ "mcpServers": { "leapcal": { "url": "https://leapcal.com/mcp", "headers": { "Authorization": "Bearer YOUR_LEAPCAL_KEY" } } } } Add this to your claude_desktop_config.json or mcp.json, restart, and your AI assistant can now:
- Search businesses by service and location
- List available time slots
- Lock a slot (LeapLock — no double-booking)
- Book with a signed receipt
- Verify any booking against the public ledger
Try it right now — no API key needed to search:
"Find me a dentist in Sofia available next Tuesday"
The assistant calls search_businesses, gets back a list sorted by LeapRank (trust score), and you're one book_slot call away from a confirmed appointment with a verifiable receipt.
npm package
npm install @leapcal/sdk import { LeapCal } from '@leapcal/sdk'; const leap = new LeapCal({ apiKey: process.env.LEAPCAL_KEY }); // Find → Lock → Book in 3 calls const businesses = await leap.search({ q: 'haircut', location: 'Cambridge, UK' }); const slots = await leap.listSlots({ businessSlug: businesses[0].slug }); await leap.reserve(slots[0].id); // LeapLock const booking = await leap.book({ slotId: slots[0].id, clientName: 'John Smith', clientEmail: 'john@example.com', }); console.log(booking.confirmationCode); // LPC-847-XK9M Full TypeScript types included. Works with OpenAI function calling, LangChain tools, any agent framework.
The bigger picture
Right now there's no standard for AI-to-business bookings. Every booking platform (Calendly, Cal.com, Acuity) has its own API, its own auth, its own concept of a "slot." There's no trust layer, no distributed locking, no tamper-proof records.
LeapCal is the attempt to build that layer — neutral, open to any business, designed from day one for agents rather than humans.
If you're building AI agents that need to interact with the physical world — book appointments, reserve resources, coordinate schedules — this is the infrastructure layer you'd otherwise have to build yourself.
Links:
- MCP endpoint: https://leapcal.com/mcp
- npm:
@leapcal/sdk - OpenAPI spec: https://leapcal.com/openapi.json
- Dashboard: https://leapcal.com/dashboard
Happy to answer questions about the distributed locking, the trust score algorithm, or anything else in the comments.