Developer docs menu

Building

MCP server

Give an AI assistant the same operations as tools.

The MCP server offers the API’s operations as tools an AI assistant can call. Each tool runs the same operation as the REST API, with the same rules, limits and refusals.

Connecting

SettingValue
Addresshttps://api.bookingmachine.io/v1/mcp
TransportStreamable HTTP. No sessions and no streams: each request gets its answer back as JSON.
AuthenticationNone is needed to read, quote and ask for a booking. To act for a business, send its API key as an Authorization: Bearer header.

A client is usually given the address and any headers to send, for example:

{
  "mcpServers": {
    "bookingmachine": {
      "type": "http",
      "url": "https://api.bookingmachine.io/v1/mcp",
      "headers": { "X-Agent": "Acme Receptionist" }
    }
  }
}

What the assistant is told

When it connects, the server gives the assistant the order of a booking and two rules: never state a price that did not come from calculate_quote, and never offer a time that did not come from check_availability.

Tools

The tools and their inputs are listed in MCP tools. Every tool that is about one business takes business: its slug, or its booking page address.

How a tool answers

A tool’s answer is the JSON the REST operation gives, as text and as structured content. When the operation refuses, the tool result is marked as an error and carries the same error sentence and code, so the assistant can act on it or tell its user.

  • check_availability answers for up to 7 days at a time.

  • Every answer is kept under 14,000 characters, the size some voice platforms cut off at.

  • What is held or booked through the server is recorded as coming from an AI assistant.

Booking

Without a key, create_booking asks for the booking and the customer is emailed a link to confirm, exactly as in How a booking is made. get_booking shows when that changes.