Skip to content

[Feature]: request queueing / concurrency limit for multi-user deployments #955

Description

@zeeid

Problem / motivation

We run mcpproxy as a shared HTTP service (systemd, headless mode) accessed by multiple concurrent users/agents. mcp_config.json currently has no way to cap concurrent requests or queue excess ones - bursts of simultaneous tool calls go straight to upstream servers, including stateful ones (e.g. MySQL-backed MCP servers), risking overload on those upstream resources when usage scales beyond a single user.

Proposed solution

Add a config option (e.g. in mcp_config.json) to set:

  • max_concurrent_requests (global and/or per-upstream-server)
  • queue_size / queue_timeout for requests beyond the concurrency limit, so excess requests wait in a queue instead of failing or overwhelming the upstream

This would let a single mcpproxy instance safely serve multiple concurrent users without needing external infrastructure for basic overload protection.

Alternatives considered

Currently working around this with an nginx reverse proxy (limit_req/limit_conn) in front of mcpproxy, and separately capping max_user_connections at the database level for MySQL-backed MCP servers. This works for HTTP-facing setups, but native support would help stdio-based upstream servers too, where reverse-proxy-level limits don't apply.

Which edition?

Both / not sure

Pre-submission checklist

  • I searched existing issues and discussions for a similar request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions