AI agents are non-deterministic. Decide which tools they can call.
An AI agent decides at runtime which tool to call. Most of the time it picks the right one. Sometimes it doesn't, and the tool it picks is delete_repository.
You can't fix that by writing a better prompt. The agent is non-deterministic, so the reliable fix is to make sure the dangerous tool isn't there to call.
The permissions you hand over aren't always the ones you meant
How much damage an agent can do through an MCP server depends on how that server authorizes access. Roughly, there are three cases:
| How the server authorizes | What the agent can do | |
|---|---|---|
| (a) | API key tied to a user | Everything that user can do |
| (b) | Fine-grained API key | Only the permissions you selected when creating the key |
| (c) | OAuth | i) Everything the authenticated user can do ii) Or only the scopes offered on the consent screen, if the server offers any |
Case (b) and (c-ii) are fine. You choose the permissions up front, and the server enforces them.
The problem is the rest, (a) and (c-i): plain API keys and OAuth servers without meaningful scopes. There, the agent inherits your full permissions, and the server gives you no way to say "reading is fine, deleting is not." If you can delete a repository, a CRM record or an invoice, so can the agent acting on your behalf.
Every agent has its own answer
The individual clients do have controls. Claude Code has a deny list in its permission settings. Codex has disabled_tools. Other agents have something similar.
They work, but each one is configured separately, in its own file and syntax, on every machine. With a team using several AI tools, that's the same settings drift as the credential sprawl in MCP setup for a 15-person team: what breaks. Someone adds a new client, forgets the deny list, and the guardrail is gone. The restriction lives wherever each person happened to put it.
Draw the line at the gateway
If every agent connects through one MCP gateway, that's the natural place for the rule. The policy is set once, and every client sees the same tool list.
That's what Bloque's Enable or Disable Tools feature does. On each MCP server's Tools tab, you switch off the tools you don't want agents to use:
- A disabled tool is hidden from
tools/list, so the agent never learns it exists. - If a client calls it anyway, the call fails with
Tool not found. - The change takes effect within about a second, without restarting the downstream server.
- It applies to every client connected with the Hub's API keys, whether that's Claude, Codex, ChatGPT or something else.
So you keep the read tools and withhold the destructive ones, in one place, instead of in each client's config.
One thing to be clear about: this limits what the Hub's API keys can call. It doesn't change the permissions of the credentials stored for the server. If you can scope the underlying key or OAuth grant, do that too. The gateway is for the cases where you can't.
Seeing what happened
Restricting tools is half of it. The other half is knowing what the agents actually did. Bloque's Logs record tool calls, and every change to a tool's enabled state is logged too, with who made it. When you decide to disable something, you can look at what has been calling it. And when something does go wrong, you have a record to work from.
The short version
AI agents are non-deterministic. You can't promise they'll never reach for the wrong tool, but you can decide which capabilities they have in the first place, and you can keep a record of how those capabilities were used. Doing that once at the gateway is a lot easier than doing it in every client.
Bloque gives you both. To try it, open an MCP server in your Hub and go to the Tools tab.