Skip to content

Configure rate limits on VirtualMCPServer #4552

Closed
Closed

Description

@jerm-dro

User Story

As a cluster admin,
I want to configure per-user and global rate limits on VirtualMCPServer,
so that aggregated backends are protected from abuse.

Context

See THV-0057: Rate Limiting for MCP Servers for full design details.

Acceptance Criteria

  • VirtualMCPServerSpec includes rateLimiting at spec.rateLimiting (not spec.config)
  • CRD admission validation: perUser requires auth enabled
  • Unit: Per-user limits shared across all backends (single bucket per user for the vMCP, not per-backend)
  • Unit: Per-tool limits use post-aggregation names (underscore separator by default)
  • Unit: With optimizer enabled, per-tool limit extracts inner tool_name from call_tool arguments
  • Unit: Per-user and global limits both enforced on tools/call
  • E2E: Deploy VirtualMCPServer with per-user rate limit, send traffic, verify rejection after limit exceeded

Dependencies

  • STORY-001 and STORY-002 (core rate limit middleware and CRD types)

Out of Scope

  • Observability (STORY-004)
  • prompts/get and resources/read (deferred, STORY-005)

Activity

  1. added
    enhancement
    go
    kubernetes
    api
    on Apr 4, 2026
  2. Sanskarzz commented on Apr 13, 2026

    @Sanskarzz
    Collaborator

    @jerm-dro please assign me this issue.

  3. Sanskarzz commented on May 13, 2026

    @Sanskarzz
    Collaborator

    Hey @jerm-dro
    It looks like this issue was closed after merging PR A. Could you please reopen it? The vMCP rate-limiting middleware wiring PR B is still pending, and I think it needs to be completed before this issue can be fully closed.
    Or do we have a separate issue to track the wiring work?

  4. jerm-dro commented on May 13, 2026

    @jerm-dro
    CollaboratorAuthor

    @Sanskarzz reopened!

  5. Sanskarzz commented on Jun 11, 2026

    @Sanskarzz
    Collaborator

    @jerm-dro If possible, please reopen the issue.
    Soon, I will start working and add a new PR for optimizer support as PR B 2

  6. added
    needs-triage
    on Jun 11, 2026
  7. removed
    needs-triage
    on Jun 29, 2026
  8. added a commit that references this issue on Jun 30, 2026
    d5092b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apidemoenhancementgokubernetesoperator

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions