Context
The current Python→Rust sidecar boundary uses HTTP/JSON over a Unix Domain Socket — it works, but it is undocumented, untyped, and Python-to-Rust only. ADR-044 (docs/docs/architecture/adr/044-module-communication-protocol.md) proposes replacing it with a typed protobuf contract over a Unix Domain Socket that any language can implement.
Goal
Explore whether gRPC-over-UDS is a viable replacement for the HTTP/JSON IPC boundary, what the performance trade-offs look like in practice, and how much of ADR-044's intended value can be demonstrated with the current Rust sidecar architecture.
Scope
- Implement a
McpRuntime gRPC service (Invoke, InvokeStream, CloseSession, HealthCheck) with a Rust tonic server and Python grpc.aio client
- Gate everything behind a
grpc-uds Cargo feature flag — zero overhead when disabled
- Keep HTTP/JSON IPC as the default; gRPC-UDS opt-in via
MCP_RUST_GRPC_UDS
- Benchmark the new boundary against the existing HTTP/JSON IPC and Python baseline
Non-Goals
- Production-ready implementation
- Catalog change subscriptions or session broadcast streaming (mentioned in ADR-044, out of scope for this POC)
- Multi-language validation (Go/Java module plugging into the same contract)
- Merging as-is without team review
Outcome
- Document findings in the PRs
- Decide whether to invest further or keep HTTP/JSON IPC as the long-term default and revisit gRPC-UDS when a second language module joins the platform
Context
The current Python→Rust sidecar boundary uses HTTP/JSON over a Unix Domain Socket — it works, but it is undocumented, untyped, and Python-to-Rust only. ADR-044 (
docs/docs/architecture/adr/044-module-communication-protocol.md) proposes replacing it with a typed protobuf contract over a Unix Domain Socket that any language can implement.Goal
Explore whether gRPC-over-UDS is a viable replacement for the HTTP/JSON IPC boundary, what the performance trade-offs look like in practice, and how much of ADR-044's intended value can be demonstrated with the current Rust sidecar architecture.
Scope
McpRuntimegRPC service (Invoke,InvokeStream,CloseSession,HealthCheck) with a Rust tonic server and Python grpc.aio clientgrpc-udsCargo feature flag — zero overhead when disabledMCP_RUST_GRPC_UDSNon-Goals
Outcome