The Proxy Model
Key Components
Transport Layer
Ultra supports all MCP transport types:- stdio — Standard input/output (default for local clients like Claude Desktop)
- HTTP/SSE — Server-sent events over HTTP
- Streamable HTTP — Modern HTTP streaming transport
Pipeline
Every MCP request passes through a chain of interceptors before reaching the upstream server, and the response passes through the same chain in reverse order:| Interceptor | Priority | Purpose | Failure Mode |
|---|---|---|---|
| Trace | 0 (first) | Creates OpenTelemetry spans, stores trace records | Fail open |
| Logging | 75 | Structured request/response logging | Fail open |
| Audit | 75 | Records security audit events | Fail closed on response |
| Metrics | 100 (last) | Counters, histograms, latency tracking | Fail open |
BeforeRequest phase blocks the request entirely (fail closed by default).
Auth and Policy interceptors are planned but not yet implemented. See Roadmap: Policy Engine.
Aggregator
The aggregator manages connections to multiple upstream MCP servers and presents them as one:- Tool namespacing — Tools from different servers are namespaced to avoid conflicts (e.g.,
upstream__toolname) - Routing — Calls are routed to the correct upstream based on the tool/resource name
- Connection management — Handles stdio process lifecycle and HTTP connections
- OAuth — Supports OAuth2 authentication for upstream servers that require it
Storage
Ultra stores all observability data locally:- Default: SQLite at
~/.config/ultra/ultra.db - Cloud: PostgreSQL for Ultra Hub deployments
- Test: In-memory storage for development
Hub Sync
When connected to Ultra Hub, your gateway periodically syncs traces and audit events to the cloud. The sync runs in the background with configurable intervals, and supports offline operation — data is stored locally and synced when connectivity is restored.What Gets Recorded
For every MCP operation, Ultra records:- Trace records — Operation type, upstream server, tool/resource name, request/response payloads, duration, status, and OpenTelemetry trace/span IDs
- Audit events — Event type, severity, principal (client identity), outcome (allow/deny/error), and detailed context
- Metrics — Request counts, latency histograms, error rates, per-server breakdowns