- ~70REST endpoints in FAFOHive's API, beside its MCP transport
- 19,000lines in that API module
- 1,900lines in Helix's WebSocket endpoint for media frames
- 2 mintimeout for the code-path explainer, one of the per-tool limits
Replacing a transport that died on restart
FAFOHive is one Rust process that every managed agent seat in my estate connects to, and Axum is its HTTP layer. It serves the MCP transport and a REST API.
The MCP transport started on the rmcp SDK's streaming server-sent-events service, and that service broke whenever a container restarted. Container restarts are routine in my estate, so I replaced it with a per-request, TLS-terminated POST handler in Axum.
One long-lived stream. The restart ends it, and the client's session goes with it.
Each call stands alone. The next request after the restart simply lands.
Long-running tools get their own timeouts, sized to what each tool does, so one slow tool cannot hold a connection open indefinitely.
A gateway whose routes are generated
FAFO Core and Function Forge needed a gateway that turns any generated function into an agent-callable tool without someone editing a router by hand. The gateway is an Axum server implementing MCP as JSON-RPC 2.0 over HTTP: POST and GET on the MCP route, the well-known MCP configuration, OAuth protected-resource metadata and session ids.
Tool routing is generated at build time from YAML, so a function minted by Function Forge becomes a tool after a rebuild and the router stays out of the edit path.
The API integration platform I built beside Core uses a stateless POST MCP transport on the same framework. The generator is described in Tools that build tools, under governance.
Endpoints for media, state and model access
Helix joins a Windows media service to a Linux voice engine, and the Linux end of that bridge is an Axum endpoint; the bridge is told in A self-hosted colleague in a Teams call. Agent Swarm's persona launcher exposes its HTTP surfaces through Axum too.
I use Axum and Tower as published and have not patched the framework.
My work with Axum is in transport choice, routing and middleware structure.