Skip to main content
Requires Gateway v2.18.0+ and Backend v1.24.0+.
Rate limits control the volume of MCP tool calls across your organization. You can limit by request count or token consumption, scoped to specific servers, tools, or API keys. MCP rate limits use the same policy engine as LLM rate limits, with a new target field set to mcp_tools. This keeps MCP and LLM policies separate — existing LLM rate limits are unaffected.

How It Works

MCP rate limit policies are workspace-scoped. When a tool call comes through the MCP Gateway, Portkey checks all active mcp_tools rate limit policies for that workspace. If any policy’s limit has been reached, the request is rejected with a rate limit error. Policies support two limit types:
  • Requests — Limit the number of tool calls (per minute, hour, or day)
  • Tokens — Limit token consumption (per minute, hour, or day)

Supported Condition and Group-By Keys

Conditions determine which requests a policy applies to. Group-by keys determine how limits are bucketed — each unique combination gets its own counter.
api_key is not available in OAuth-based MCP flows, since those requests are authenticated via identity provider tokens and do not carry an API key. Use mcp_server, mcp_tool, or metadata.* keys instead.

Conditions

Conditions filter which requests a policy applies to. All conditions must match (AND logic). Each condition supports:

Group-By

Group-by keys determine how limits are tracked independently. For example, grouping by api_key means each API key gets its own counter — one key hitting the limit doesn’t affect others.

Rate Limit Units


Use Cases

Use Case 1: Global MCP Rate Limit

Limit all MCP tool calls in a workspace to 500 requests per minute.

Use Case 2: Per-User MCP Rate Limit

Limit each user (identified by _user metadata) to 50 MCP tool calls per minute.

Use Case 3: Per-Server Rate Limit

Cap total throughput to the Slack MCP server to 1000 requests per hour.

Use Case 4: Limit a Specific Tool

Throttle the send_message tool to 100 calls per minute, regardless of which server it’s on.

Use Case 5: Per-Server Token Limit

Limit token consumption on the GitHub MCP server to 500,000 tokens per day.

Use Case 6: Per-API-Key Limits Grouped by Server

Give each API key its own rate limit, tracked independently per MCP server.

Use Case 7: Per-Team Rate Limit by Server

Track and limit MCP usage separately for each team and server combination.

Use Case 8: Exclude Specific Tools from a Server Limit

Apply rate limit to all Slack tools except list_channels.

Creating a Policy

You can create MCP rate limit policies from the Portkey UI or via the Admin API.
Create MCP Rate Limit Policy
Use the Admin API to create a rate limit policy with target set to mcp_tools.
cURL

Key Considerations

  • Target is immutable. A policy’s target cannot be changed after creation. To switch between llm and mcp_tools, archive the existing policy and create a new one.
  • Existing policies are unaffected. All existing rate limit policies default to target: llm. No migration is needed.
  • OAuth flows and api_key. The api_key condition and group-by key is not available in OAuth-based MCP flows. Use mcp_server, mcp_tool, workspace_id, or metadata.* instead.
  • Workspace-scoped only. MCP rate limit policies are scoped to the workspace level. Org-wide MCP policies are not supported in this release.

Exceeding Rate Limits

When a rate limit is exceeded, Portkey returns a 429 Too Many Requests HTTP status code.
  • The error message indicates which limit was exceeded
  • The limit resets automatically after the configured time interval

Next Steps

Usage & Rate Limit Policies

Full policy reference with conditions, group-by, and validation rules.

Rate Limits API

API reference for creating and managing rate limit policies.

Observability

Monitor MCP tool call logs and usage analytics.

Access Control

Control which workspaces and users can access MCP servers.

Portkey is now PRISMA AIRS AI Gateway. See it in action.

Contact Us
Last modified on August 17, 2026