Skip to content

Wire Redis session storage from RunConfig into MCPServer proxy runner transports #4531

Closed

Description

@jerm-dro

Description

The operator correctly populates RunConfig.ScalingConfig.SessionRedis from the MCPServer CRD's spec.sessionStorage field, but the proxy runner (thv run) never reads this config. Sessions always use in-memory LocalStorage, making cross-replica MCPServer deployments non-functional for stateful MCP protocols (streamable-http, SSE).

Context

The vMCP equivalent is being addressed by #4479. This issue covers the MCPServer proxy runner path, which uses a different transport layer (pkg/transport/ vs pkg/vmcp/).

When an MCPServer is deployed with replicas > 1 and sessionStorage.provider: redis, the proxy runner pods each maintain independent in-memory session stores. A session created via Initialize on pod A is invisible to pod B, so subsequent requests routed to pod B fail with Session not found (-32001).

Acceptance Criteria

  • When MCPServer.spec.sessionStorage.provider is redis, the proxy runner creates a RedisStorage and injects it into the transport
  • Sessions created on one proxy replica are accessible from any other replica via Redis
  • When sessionStorage is not configured, behavior is unchanged (in-memory LocalStorage)
  • E2E test verifies cross-replica session routing: Initialize on pod A, ListTools on pod B with the same session ID

Activity

  1. added
    enhancement
    scalability
    on Apr 3, 2026
  2. added
    go
    kubernetes
    on Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgokubernetesoperatorscalability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions