Protect an MCP server's quota
Keep a looping agent from using up an MCP server's quota, with a budget for the server or for one of its tools
A looping agent can keep making tool calls to an MCP server until the server's quota runs out, or until it uses capacity other people need. A usage limit rule caps how many tool calls reach one MCP server, or one of its tools, so the server stays under its quota.
Protect one MCP server's quota
Scope the rule to the MCP server, and set a budget below the number of calls the server allows.
- On Policy Controls › Usage Limits, click Add usage limit.
- In the scope, pick the MCP server, such as Jira, or a policy tag that several servers carry.
- Set Calls and Window, such as 600 calls per 1 minute.
- Under When the budget runs out, leave Refuse the call off, the default, so the rule runs in log-only mode while you test it.
- Set the status to Active.
Give every MCP server its own budget
One rule can cover all MCP servers and give each one its own budget, so you don't need a rule per server. Leave the scope empty and set Counted per to MCP server. With 600 calls a minute, Jira and Slack each get their own 600.
Limit one expensive tool more tightly
Add a second rule scoped to that tool's name or policy tag, with a lower budget. Both rules apply to the tool's calls, as Every matching rule applies explains.
Enforce the limit
When the log-only results look right, edit the rule and turn on Refuse the call. Test a rule before you enforce it shows where to find those results in Agent Trail.
When the MCP server refuses calls itself
If Agent Trail often shows calls marked rate limited by upstream server, the MCP server is refusing calls because of its own limit. Lower the budget so it stays under that limit.
Next steps
The MCP server now has a limit that a looping agent can't go past. Next, check which other MCP servers get the most calls, and decide which one needs a limit next.
- MCP usage analytics – see which MCP servers and tools get the most calls
- Usage limits – how a rule works, what counts against a budget, and what happens when a call goes over a limit