Repository navigation
Description
Related: #2807 (the embedded gateway as its own deployment), #2422 (MCP broker cleanup), #2533, #2537
Depends on: #2728 (the MCP client reaches the gateway for calls and listing only through the gateway abstraction)
Problem
The code that builds the embedded gateway is part of the MCP client: the authorization server, AS-2, the vMCP, their handlers, and their lifecycle. So the client depends on ToolHive. Changes to the embedded gateway's configuration touch client code, and the embedded gateway can't become its own deployment without first being separated out.
Implements
- MCP gateway modes: Embedded mode: one protocol path for both modes; the embedded gateway later becomes its own deployment
- Threat model: what the split requires
Scope
- The embedded gateway is built and run outside the MCP client: the authorization server, AS-2, the vMCP, their handlers, and their lifecycle. The client receives a gateway, plus what workspace enrollment needs, and nothing else.
- Boundary rule: the MCP client imports no ToolHive code, and the ToolHive import boundary check enforces it.
- No behaviour change: the embedded gateway, workspace enrollment, and calls outside the gateway work as before.
- Not in scope: running the embedded gateway as a separate deployment ([Phase 3] Run the identity broker as its own service #2807), or the external gateway (External gateway: Gateway implementation, operator setup, and end-to-end test #2812).
Decide before starting
Workspace enrollment and AS-2 share one embedded authorization server and one issuer. The client's calls outside the gateway, and its query calls, also reach the vMCP at a URL derived from that issuer. Before starting, decide and write into this ticket's scope:
- where the embedded gateway's construction lives;
- whether calls outside the gateway and query calls move to the gateway abstraction here, or keep their issuer-derived endpoint until a later ticket names its remover.
Done when
- The MCP client builds with no ToolHive import, and the boundary check fails if one is added back.
- The existing embedded-gateway, enrollment, and call tests pass with the same assertions.
- With the identity broker flag off, nothing changes.
Activity