The booking API your Cursor agent can read, type-check and call
For engineers adding booking to an existing codebase. A typed SDK, docs the agent can follow and MCP tools replace the availability, pricing and locking code you would otherwise review line by line.
Entities.
Your domain, synced. Doctors, rooms, courts, cars — anything.
Availability.
Ask when something can be booked. Get the real answer.
Rules.
Pricing and eligibility that follow your business logic.
Quotes.
Know the price before the booking exists, with reasons.
Lifecycle.
Create, confirm, reschedule, cancel. One API, safe by default.
No double-booking.
Locks and slot holds, so every slot has exactly one owner.
Booking search.
Your entities, indexed. Search by price, distance and real availability.
AI recommendations.
Suggests the best booking using your rules, prices and availability.
Prompt it. Your marketplace books for real. Search, availability, payments and a console, wired in by your AI builder.
Works with Lovable, Bolt, v0 and Cursor through the Slotr SDK and MCP. Your builder writes the UI, Slotr runs the booking engine.
Add booking to the codebase you have. Without a scheduling module to maintain.
- 1
Describe your booking model
Write it where the agent will see it on every task, such as a project rules file: vehicles are bookables, renters are participants, rentals have a pickup and return time at a location.
- 2
Connect the Slotr MCP server
Register the Slotr MCP server in Cursor's MCP settings. The agent can then check availability, upsert test entities and create rules in your development project while it writes code.
- 3
Sync entities from your models
Have the agent add an upsert wherever a vehicle is created or changed. Your tables stay the source of truth; Slotr indexes the attributes that affect search, availability and price.
await slotr.entities.upsert({ type: "vehicle", id: car.id, attributes: { transmission: "automatic", year: 2025, pickup: "Rotterdam Centraal" } }); - 4
Replace the booking code path
Swap hand-written overlap queries and row locks for quote and booking calls. The SDK types tell the agent what each call accepts, so the diff stays small and reviewable.
const quote = await slotr.quotes.create({ bookable: car.id, days: 4 }); await slotr.bookings.create({ bookable: car.id, participant: renter.id, start }); - 5
Test the race, then go live
Add a test that fires two bookings for the same car and window in parallel and asserts exactly one succeeds. When it passes, ship the change like any other pull request.
What your Cursor agent doesn't have to build. And what you don't have to review.
- 01
Overlap queries with every edge case
The agent can write a range overlap query in seconds. Turnaround buffers between rentals, pickup windows, branch opening hours and daylight saving changes are what turn it into a module nobody wants to touch.
- 02
Locks that span payment
A row lock protects the insert, not the three minutes a renter spends on the payment page. You need holds with an expiry and a clean release on failure, across the checkout and admin paths.
- 03
A pricing file that only grows
Daily and hourly rates, weekend multipliers, young-driver fees and deposits accumulate as conditions in one pricing module. Every new rule is a pull request, and every quote is hard to explain to support.
- 04
Search that joins two systems
"Automatic, 2025 or newer, free this weekend" needs vehicle attributes and live availability in one query. Building that usually means a search index plus a sync job plus a second availability pass.
- 05
Context the agent has to reconstruct
A large in-house scheduling module is expensive context. A small typed SDK with readable docs gives the agent less to infer, so its changes are easier to check and less likely to drift.
- 06
Webhook plumbing for the lifecycle
Confirmations, reminders, reschedules and expired holds each need an event and a consumer. Slotr emits them, so your services subscribe instead of running their own schedulers.
MCP while you build. The typed SDK when it runs.
Drop it into your product. No per-provider accounts, no iframes — your database stays the source of truth.
const cars = await slotr.search({
type: "vehicle",
query: "automatic, 2025 or newer, this weekend",
filters: { daily: { lte: 70 } }
});slotr_create_rule({
appliesTo: { type: "vehicle" },
when: [{ days: { gte: 7 } }],
then: { price: "-15%" }
})await slotr.bookings.reschedule(rental.id, {
start: "2026-11-07T09:00:00Z"
});Need a frontend too? Use the Booking Kit or stay headless.
If your team owns the design system, call the API directly. If not, the Booking Kit calendar and search inputs are fully customizable React components wired to the same endpoints.
<SlotrBooking
bookable="therapist_42"
accent="#8E99FF"
radius="soft"
theme="light"
/>How to build a booking system with Cursor
Give the agent a small surface
A booking API for Cursor is useful when it narrows what the agent has to write. Asked to "add bookings", an agent will generate tables, overlap queries and a pricing function, all plausible and all yours to review and maintain. Asked to integrate a typed SDK with a handful of calls, it produces a diff you can read in one sitting.
Point the agent at the Slotr docs and keep the booking model in your project rules. That way every task, from a new endpoint to a refactor, starts from the same definitions of bookable, participant and booking.
Sync entities, don't migrate them
Your existing database keeps owning vehicles, renters and branches. Add an upsert to the code paths that create or edit a vehicle, and send only what booking needs: transmission, model year, pickup location, daily rate. Insurance documents and damage reports never leave your systems.
Backfill once with a script the agent writes against your ORM, then rely on the upserts. If search ever returns a stale attribute, the fix is a missing upsert, which is easy to find.
Know where the race actually happens
Most double bookings don't happen at the database insert. They happen between showing a price and taking payment. Slotr holds the vehicle when a renter starts checkout, releases it with a hold.expired event if payment never completes, and gives a second renter a clear unavailable answer with the reason.
Write the parallel-booking test anyway. It documents the behavior for the next engineer and catches any code path that bypasses the SDK.
Watch the admin tools too. Back-office screens that let staff extend a rental or swap a car are the usual place where someone writes directly to the bookings table. Route those through bookings.reschedule as well, so a staff change gets the same conflict check and quote breakdown as a renter's.
Use MCP for setup, the SDK at runtime
The MCP tools, such as slotr_availability, slotr_quote and slotr_create_rule, are for the agent while it works: checking what a test vehicle's availability looks like, or creating a weekly discount in a development project. Production code should call the SDK, where types, error handling and your test suite apply.
Review rules in the Console before you ship. Every quote shows which rules fired, so a reviewer can confirm a 7-day rental got 15% off without reading the rule definitions.
Questions about building booking in Cursor
Does Slotr have a typed SDK Cursor can autocomplete?
Yes. The SDK is typed, so Cursor's autocomplete and agent see what each call accepts and returns, from entity upserts to quotes and bookings. Type errors surface in the editor instead of at runtime, which keeps agent-written changes easier to review.
Can Cursor's agent use the Slotr MCP server?
Yes. Cursor can connect to MCP servers, and Slotr exposes tools such as slotr_search, slotr_availability, slotr_quote, slotr_book, slotr_create_rule and slotr_upsert_entity. Use them to explore data and create rules while building, and the SDK in application code.
How do I build a booking system with Cursor without writing availability code?
Model your bookables in Slotr, sync them from your existing tables with upserts, and have the agent replace overlap queries and locks with SDK calls for availability, quotes and bookings. Slotr handles buffers, holds and conflicts on every call.
Do I have to move my existing database to Slotr?
No. Your database stays the source of truth for your domain. You sync the attributes that affect search, availability and price, and keep everything else, such as documents or internal notes, in your own systems.
How does Slotr prevent double bookings during checkout?
It places a hold on the slot when checkout starts. If payment completes, the booking is confirmed. If not, the hold expires and a hold.expired event fires. Concurrent requests for the same slot get a clear unavailable response with the reason.
Should pricing rules live in my code or in Slotr?
In Slotr, if they change price or availability. Rules in the Rules Engine apply per bookable, can be created over MCP or the SDK, and every quote returns its breakdown. Your code stays focused on your product instead of on an ever-growing pricing module.
Can I try the Slotr SDK yet?
Slotr is pre-launch, so the SDK isn't publicly available yet. Join the waitlist for early access to the SDK, the docs and the MCP server, and tell us about the codebase you plan to add booking to.
Review a small diff. Not a scheduling module.
Join the waitlist for early access to the Slotr SDK and MCP server.