Skip to content

Quick start

Terminal window
npm install -g agentgate
# or run without installing
npx agentgate scan

Requires Node.js 22+.

AgentGate auto-discovers MCP server configurations from common client config paths (Claude Desktop, Claude Code, Cursor, VS Code, Codex, OpenCode):

Terminal window
agentgate scan

Static analysis inspects configs and packages. Add --live to also connect to each server over stdio and inspect the actual tool surface it exposes:

Terminal window
agentgate scan --live

Each finding is categorized (tool-poisoning, credential-leak, overprivileged, auth-missing, ssrf, rce-vectors, supply-chain) and cross-checked against the advisory database. Output as a terminal table by default, or:

Terminal window
agentgate scan --format json > report.json # for the report viewer
agentgate scan --format sarif > report.sarif # for GitHub code scanning

Drop report.json into the report viewer for a shareable visual report.

Once you’ve reviewed the scan, pin what your agent is allowed to see:

Terminal window
agentgate lock

This writes agentgate.lock — SHA-256 hashes over each server’s tool names, descriptions, and input schemas. Commit it:

Terminal window
git add agentgate.lock && git commit -m "Lock MCP tool surface"
Terminal window
agentgate ci

Exits non-zero if the current tool surface drifts from agentgate.lock — a renamed tool, a changed description (prompt-injection vector), a widened input schema. Review the diff, then re-approve deliberate changes with agentgate lock.

.github/workflows/agentgate.yml
name: agentgate
on: [push, pull_request]
jobs:
gate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npx agentgate ci