Skip to content

MCP: Placement of owner tools

Part of the MCP integration design. Design proposal, not shipped behaviour.

Booking hosts its public MCP tools itself; that placement is decided and recorded in ADR-0012, together with the alternatives it rejected. Tools that act with an owner's App Suite identity are the open half. Two homes are viable, and this page records both, what decides between them, and the one option that would change the picture.

Option: the ai-service hosts them

The ai-service registers booking tools next to its existing calendar and contact tools. Each tool call uses the caller's redeemed middleware session to call /booking/v1 over HTTP; booking's session plugin accepts the session credential and enforces ownership and the booking capability server-side, exactly as it does for the App Suite UI plugin. The catalog is in Tools & scenarios.

Finalization works in this placement because the middleware session is already present: the chronos event is created as the owner, with the same best-effort semantics the UI has.

The cost is two MCP endpoints to document and owner tools living in another team's repository, so booking's API evolution and the ai-service's tool schemas can drift unless the consumed subset is frozen explicitly. It also makes the ai-service the first consumer of /booking/v1 outside this repository, the condition ADR-0005 says forces its own revisit. An external consumer is expected eventually and the surface is stable enough to carry one, so that revisit records the consumer rather than gating the work.

Option: booking hosts them

Booking needs an App Suite identity on every call, which today means owning the auth plumbing: MCP-native OAuth at the endpoint with a token-to-session exchange behind it, or a copy of the acquire/redeem flow (see Authentication & threat model). Org-wide JWT propagation ("Edge Auth") removes the session-holding half of that, leaving protected-resource metadata and client registration with the identity provider, and would allow a single endpoint whose catalog varies by whether the caller presents a token.

The argument for this home is coherence. Tools call src/services/* in process, as the public tools do, so tool output cannot drift from what the booking page does, and finalization uses the same code path as the UI once a session is present.

What decides it

  1. The ai-service maintainers. The tools would live in their repository, follow their conventions, and ship on their cadence, so that placement needs their agreement.
  2. How many connectors a user should configure. One App Suite connector is a better story for users and admins than one per service.
  3. Drift versus a hop. In-process handlers cannot drift from page behaviour; an HTTP hop plus a frozen subset can, and needs a deprecation window and a notification channel.
  4. Whether Edge Auth lands first. It removes most of the cost of the booking-hosted variant.

A shared org-level MCP gateway

Deferred, not dismissed. No such component exists. Its strongest argument is authentication: a gateway terminates client auth once (MCP-native OAuth against the org's identity provider, or API keys) and forwards verified identity to per-service MCP backends, which then host only their domain tools. Under a gateway, booking could serve owner tools itself without owning any auth plumbing; the token-to-session exchange would live in the gateway, or remain in the ai-service behind it. The public endpoint would pass through unauthenticated, unchanged. Edge Auth weakens this option rather than strengthening it, since terminating auth once is most of what it buys.

It stays out of this design because one new consumer does not justify a platform component. The shipped stack has one authenticated MCP model (the ai-service's session exchange) plus booking's public one, each small enough to carry alone; GLAM's OAuth variant lives in internal tooling. The option gets revisited once more microservices grow MCP surfaces and the per-service duplication becomes real. Nothing here blocks that move: booking's tools are built on the stateless per-request pattern, which relocates behind a gateway without change.

Relationship to existing decisions

  • ADR-0012: records the public endpoint and leaves this placement open, with the inputs as they stood when it was written.
  • ADR-0005: the public tools do not touch it, since in-process tools are not API consumers. Owner tools in the ai-service trigger the revisit it announces.
  • ADR-0006: the OIDC seam on /booking/v1 is one building block of the booking-hosted variant (OAuth at the endpoint, a token-to-session exchange behind it); see Authentication & threat model.