Booking hosts a public MCP endpoint for link-holder personas
- Deciders: Julian Bäume
- Date: 2026-07-26
Status
Accepted
Context
Exposing booking to AI agents over the Model Context Protocol serves two personas with opposite authentication realities:
- The booker or poll voter is anonymous by design. The appointment-type id, poll id, or manage token in a link is the credential (see Security). Such a caller may have no App Suite account, and may belong to no App Suite installation.
- The owner is an App Suite user, resolved from a middleware session and gated by the
bookingcapability.
Our stack already has an MCP server: the ai-service exposes App Suite tools over MCP and holds a real per-user middleware session. Its conventions (small composable tools, output schemas, domain errors as tool results, per-tool metrics) are the house style to follow here.
The public persona can be served with no authentication work at all. The owner persona cannot be served anywhere without a middleware session, and which of the two servers should host those tools is a conversation with the ai-service maintainers that has not happened yet. This decision covers the public half and leaves the owner half open.
Decision
Ship the public half. Leave owner-tool placement open.
- Booking hosts an unauthenticated MCP endpoint for the link-holder personas, at
POST /booking/mcp, beside/booking/v1rather than under it, because MCP is a protocol surface and not a REST version. Capability ids and tokens travel as tool parameters. The tool set covers Appointment Booking's public flow; the wire contract is in MCP endpoint and the behaviour in Agent access. - Tool handlers call
src/services/*in process, reusing the route serializers so both surfaces return identical shapes. Booking never calls a language model. - The transport is stateless. Each request builds a server instance and connects a streamable HTTP transport with no session id: no session store, no replica affinity, no SSE.
- The endpoint is off by default, behind an
mcp.enabledflag checked per request, since route registration is not hot-reloadable (ADR-0007). - Booking builds no authenticated MCP surface for now. Owner-authority tools are out of scope here, and nothing in this decision commits them to a home.
Alternatives rejected
The public tools in the ai-service. Rejected on identity. The primary persona has no App Suite login and no path to being issued a credential by a server whose auth model starts from one. Hosting unauthenticated tools inside a server whose credentials reach mailboxes and calendars would also widen its blast radius for no gain.
No MCP, just agent-readable API documentation. The baseline this had to beat, and worth doing regardless: publishing the public subset of openapi.yaml plus a short page for agents costs almost nothing and adds no attack surface. MCP wins because it gives the owner a connector to advertise, typed tools with output schemas instead of schema-guessing, and a catalog discovered in one call. Documentation remains the fallback for clients without MCP support.
Left open: where owner-authority tools live
The ai-service and booking are both viable homes, and the choice waits on a conversation with the ai-service maintainers. The options, their costs, and what decides between them stay in Placement of owner tools until a successor ADR records the outcome. Should that surface end up being booking's, ADR-0006 keeps the OIDC seam for it open.
Consequences
Positive
- The public half has no external dependencies: no auth design, no cross-team coordination, no API contract change. In-process tools are not
/v1consumers, so ADR-0005 is untouched. - ADR-0010's iMIP integration is why the public persona needs no middleware, which is what makes this endpoint self-contained.
- Agent-triggered mail reuses the outbox from ADR-0011; agents add no new mail path.
- No new workload, no session affinity, and an operator off switch that needs no restart.
- Deferring the owner half costs nothing here. An authenticated surface added later, in either home, leaves this endpoint and its tools unchanged.
Negative / constraints
- The receptionist deployment is half served: an owner-operated agent books callers in, but cancelling or moving a caller's appointment runs through that booking's manage capability until owner tools exist somewhere.
- Tool names and parameter schemas become a public contract the moment third parties configure agents against them, with the stability expectations of a public API.
- The endpoint is booking's first read-side rate limit, and per-IP limiting behaves poorly under AI-provider NAT: the mitigation is a second per-capability layer plus an honestly documented shared-fate caveat.
- Prompt injection through end-user content that tools relay cannot be closed server-side. The design caps and marks such fields and says the rest plainly.
References
- MCP endpoint (wire contract), Agent access (behaviour), Privacy, trust & limits (threat model as product documentation)
- ADR-0005, ADR-0006, ADR-0007, ADR-0010, ADR-0011
- The owner half and the deferred poll tools remain a design proposal under MCP: Overview
- ai-service MCP documentation (the conventions this follows)

