Operations

MCP Rate Limits, Quotas, and Cost Control

Control MCP cost and abuse — official tools rate-limiting requirements, agent-loop risks, compute sizing, and progressive discovery to reduce token waste.

10 min read Published July 14, 2026 Updated July 14, 2026

MCP cost is not only host CPU. It is compute + upstream APIs + model tokens + human incident time.

Cost surfaces

SurfaceWhat burns money
MCP runtimeAlways-on or scaled containers/functions
Upstream APIsSaaS/DB calls from tools
LLM tokensTool definitions + tool results in context (client best practices)
IncidentsRunaway agents, auth outages

Protocol-mandated server controls

From Tools — Security Considerations, servers MUST:

  1. Validate all tool inputs
  2. Implement access controls
  3. Rate limit tool invocations
  4. Sanitize tool outputs

Clients SHOULD implement timeouts for tool calls and log usage for audit.

Also apply scope minimization so stolen tokens cannot invoke every high-privilege tool.

Agent-loop failure modes

PatternSymptomMitigation
Retry stormSame failing tools/call thousands of timesRate limits; circuit break on error rate; fix isError messages
Definition floodHuge prompt before user messageProgressive discovery (client best practices)
Result floodMulti‑MB tool payloadsSummarize in server; resources instead of blobs; code-mode composition
Over-scoped OAuthOne token does everythingLeast privilege scopes

Tool execution errors should use isError: true with actionable text so models can self-correct instead of thrashing (tools error handling).

Quotas that work in practice

QuotaExample
Per-token / per-user RPSProtect shared remotes
Per-tool daily capsExpensive upstream APIs
Max concurrent sessionsStreamable HTTP multi-client
Max payload sizePrevent context/memory bombs
Separate staging vs prod budgetsAvoid demo traffic killing prod

Multi-tenant: isolate quotas per tenant (multi-tenant guide).

Compute right-sizing

Start small; raise profile only with evidence (OOM, sustained high p95). See server profiles and product profiles docs.

Observability for cost

Track:

  • Calls per tool
  • Error rate (loops)
  • Latency p95
  • Auth failures
  • Upstream 429s

MCPLambda: tool analytics. Protocol debugging: Inspector.

Controls checklist

  • Server-side rate limits on tools/call
  • Timeouts client-side
  • Circuit breaker on elevated error rate
  • Staging keys cannot hit prod upstream
  • Destructive tools disabled on shared prod
  • Progressive discovery if tool catalog is large
  • Alerts on cost/error spikes

Worked scenario: The weekend retry storm

A flaky upstream returns 500s. Your tool surfaces a vague error. Agents retry dozens of times per user. Overnight you burn the SaaS API quota and the MCP host scales on useless load.

You add: server-side rate limits on tools/call (required by the tools security guidance), clearer isError text (“upstream unavailable; retry after 60s”), a circuit breaker after N failures per minute, and an alert on identical failing tool signatures.

Separately, a host loads 200 tool definitions every turn. You split servers and push progressive discovery so token cost drops even though MCP CPU was never high.

Checklist for this topic

  • Server-side rate limits on tools/call
  • Client timeouts on tool calls
  • Actionable isError messages (not empty failures)
  • Circuit break on elevated error rate
  • Per-tenant/per-key quotas for shared remotes
  • Alert on retry storms and upstream 429s

Topic-specific failure modes

FailureLikely causeFix
Quota exhaustionRetry loopsRate limit + clearer errors
Huge LLM billsTool definition floodProgressive discovery / fewer servers
One tenant starves othersNo isolation of quotasPer-tenant limits
Cost spike after deployNew chatty toolDiff tool call volume post-release

Observability · Tools & primitives · Multi-tenant

In practice: default limits

Start conservative on shared remotes:

  • Per-token: e.g. N tools/call / minute
  • Per-tool: stricter caps on expensive upstream tools
  • Global: burst ceiling to protect the process

Tune up with evidence. Defaults that are “unlimited because internal” become external-facing faster than you expect.

Cost review ritual

Monthly, review:

  1. Top tools by call volume
  2. Top tools by error rate (wasted retries)
  3. Top tools by upstream spend
  4. Hosts with the largest tool catalogs attached

Kill or split noisy tools. Progressive discovery and result truncation often save more money than shrinking a compute profile.

Takeaways

For MCP Rate Limits, Quotas, and Cost Control, remember three things:

  1. Be specific to this problem — the worked scenario “The weekend retry storm” is the failure mode you should design against, not a generic outage narrative.
  2. Bound retries and payload size at the server; agents will otherwise amplify cost in loops.
  3. Publish quotas per key/tenant and fail with actionable errors before upstream bills spike.

If you only remember one habit: treat weekend retry storms as a design bug, not only an ops event.

Sources

Next steps

Observability · Debugging

FAQs

Frequently Asked Questions

  • Does the MCP specification require rate limiting?

    Yes for tool servers: the Tools specification security considerations state that servers MUST rate limit tool invocations (along with validating inputs, access control, and sanitizing outputs).

  • Why did cost spike without traffic on our website?

    Often agent loops retrying failing tools, oversized compute profiles, or upstream API usage triggered by tools — plus LLM token spend from dumping large tool definitions or results into context. Official client best practices warn about tool-definition and intermediate-result token waste.