agentgate — Claude Code MCP server: what it does, how to install
Audits MCP tools run by agents, collects scanner evidence, and validates setups against safety policies in CI or runtime environments.
claude mcp add agentgate -- npx -y @zhiliangtech/agentgateWhat agentgate does
The server keeps an exact inventory of tools executed by coding agents. It inspects local configuration files like .codex/config.toml while stripping credentials, headers, and tokens from addresses. Four separate modules handle package discovery, record compilation, policy verification, and external claim matching.
Its core logic treats unchecked items strictly. The system issues a clean verdict solely if every scanner finishes. Any failed or unmeasured step marks the build as incomplete. This design stops broken security steps from producing fake passing results.
Running the tool locally requires Node.js 20 or newer without extra dependencies. Do not use release 0.5.0: that build permitted missing evidence to pass gates silently. Version 0.6.0 fixes this behavior.
What it helps with
- inventory configured agent tools without exposing environment variables or auth tokens
- block unverified or disallowed tools during continuous integration checks
- generate standalone HTML reports showing scanner coverage and missing audits
- catch crashed or incomplete security scans before deploying agent configurations
Example prompts for the agent
- Inspect local MCP configurations using
agentgate discoverto extract installed tools - Run policy checks in the repo using
npx --yes --ignore-scripts @zhiliangtech/[email protected] check --root . - Build a tool inventory report from
tools.jsoninto a standalone HTML file
How to install agentgate
Platform CLI
claude mcp add agentgate -- npx -y @zhiliangtech/agentgatePlatform CLI
codex mcp add agentgate -- npx -y @zhiliangtech/agentgateConfig file
{
"mcpServers": {
"agentgate": {
"command": "npx",
"args": [
"-y",
"@zhiliangtech/agentgate"
]
}
}
}Config file
{
"servers": {
"agentgate": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zhiliangtech/agentgate"
]
}
}
}Platform CLI
gemini mcp add agentgate npx -y @zhiliangtech/agentgateStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agentgate
How to install agentgate in Claude Code?
Add the server by running claude mcp add agentgate -- npx -y @zhiliangtech/agentgate.
What does agentgate do?
It audits the MCP tools that coding agents can invoke. It verifies configurations against policies and records evidence for every check without storing private secrets.
What are the prerequisites to run it?
You need Node.js 20 or later. The package has zero runtime dependencies, and Docker Compose is also supported.