Open source, and it runs on your own machine

Permission control for AI agents

Your agent reaches your notes, your inbox and your database through MCP. hardened-mcp sits in between and checks every action first: reads go through, anything that changes or deletes waits for you.

Checks on every action
5
Tests behind it
500+
Network calls to decide
0

What your agent can do on its own

Connecting an agent to a tool server takes one line of config. From that moment it can call every tool the server offers, including the ones that delete. Four things nobody checks:

  • It can delete as easily as it can read

    Every tool is callable, and the agent picks which.

  • The server tells your agent what to do

    Its description is written by whoever wrote the server, and your agent reads it as instructions.

  • A server can call its own delete tool safe

    It labels its own tools, and the label is believed.

  • Afterwards there is nothing to read

    No record of what was asked, what ran, or why it was allowed.

A check in front of every action

Point your agent at hardened-mcp instead of at the servers. It speaks the same protocol to both sides, so nothing else changes.

  • Reads go through

    Looking something up does not need you. Your agent stays as useful as it was.

  • Changes wait for you

    Writing, sending or deleting is held until you approve that call, with those exact values.

  • Everything is written down

    Allowed, refused or held, each one recorded with the rule that decided it.

Watch it refuse a delete and hold a write.

Open the demo

What your agent is allowed to call

One screen for every tool, with what it may do right now and what decided that. Pick one to see what its server said, what your agent was handed instead, and which check refused it.

Five checks, and each can only say no

Every call passes them in this order. A later check can never undo an earlier refusal, and none of them can widen what the one before it allowed.

1Is the tool switched off?

An operator can disable one on a running gateway.

2Does the call name someone else?

The account comes from the token, never from the agent.

3Is it known what this tool does?

If nobody has classified it, it cannot run.

4Does a rule cover it?

First match wins, and the argument bounds are checked first.

5What is the default here?

Read-only, hold every write, or locked.

Allowed, or held for a human. Either way a record is written.

One approval, one gateway call

When a call is held for a human, the grant is bound to sha256(tool + canonical arguments), single-use, and time-limited.

An approval issued for a 10-unit transfer cannot release a 10,000-unit one. The hash does not match, so the second call is a different request and goes back to a human.

Argument bounds are checked before a rule's decision is honoured, so a rule that approves transfers under 50,000 refuses one above it rather than asking someone who might wave it through.

Approve or deny the call beside this text. The hashes are computed in your browser.

Ten scanner rules for a server surface

They run against what a server advertises, before or independently of any traffic. A high finding exits non-zero, and SARIF output feeds code scanning.

HMCP001highA write or destructive tool reachable with decision: allow
HMCP002highA tenant boundary left agent-settable
HMCP003mediumA collection read with no pagination ceiling
HMCP004highA credential in a description, an example or a base URL
HMCP005highInstructions, roles, secrecy or exfiltration in tool text
HMCP006mediumA schema loose enough to forward whatever the model invents
HMCP007highAn upstream the policy does not permit, or a private address
HMCP008mediumAn exposed operation declares no authentication
HMCP009mediumOver budget, or two tools a model cannot tell apart
HMCP010highAuditing off, the chain off, or approvals that can never be given

A tool’s description cannot change what your agent is allowed to do, because the part that decides never reads it.

Text like this is caught by pattern, so a new phrasing will get past. It still cannot widen what your agent may do. At most it talks the agent into asking for something, and that request is judged on its own terms.

What the gateway does not do

Stated plainly, because a security product that overstates itself is worse than one that does less.

The audit chain is tamper-evident, not tamper-proof. Anyone who can write the file can rewrite the chain from a chosen point.
Injection detection is pattern-based. It catches known shapes and will miss novel phrasings, which is why it sits behind the structural controls.
Replacing a description is lossy. A false positive costs the model what it needs, so it misuses the tool rather than failing cleanly.
A stdio upstream is a child process. The egress allowlist does not reach it. Only HTTP upstreams pass the guard.
A standing grant trades the argument binding for silence. Within its bounds and its use cap, calls run without a human seeing them.

Questions about the gateway

What has to change on either side?

Nothing. The agent speaks ordinary MCP to the gateway, and the gateway speaks ordinary MCP to the servers behind it. You point the agent at the gateway.

What does adopting it cost?

Point the gateway at the MCP servers your client already has configured and swap the client over. It is reversible.

What happens when a server adds a tool later?

It is unreachable until a human classifies it. The gateway reports the new tool and generates a policy stub for it. Silence is not consent.

Does it detect attacks?

No. It denies by default and requires classification, and it arranges things so a server's claims about itself cannot widen what is permitted.