Skip to content

[FEATURE][RUST]: ADR-044 gRPC-over-UDS module communication boundary — POC #3730

@gandhipratik203

Description

@gandhipratik203

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    COULDP3: Nice-to-have features with minimal impact if left out; included if time permitsenhancementNew feature or requestmcp-protocolAlignment with MCP protocol or specificationrustRust programming

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions