Quick start
1. Install
Section titled “1. Install”npm install -g agentgate# or run without installingnpx agentgate scanRequires Node.js 22+.
2. Scan your MCP servers
Section titled “2. Scan your MCP servers”AgentGate auto-discovers MCP server configurations from common client config paths (Claude Desktop, Claude Code, Cursor, VS Code, Codex, OpenCode):
agentgate scanStatic analysis inspects configs and packages. Add --live to also connect to each server over stdio and inspect the actual tool surface it exposes:
agentgate scan --liveEach 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:
agentgate scan --format json > report.json # for the report vieweragentgate scan --format sarif > report.sarif # for GitHub code scanningDrop report.json into the report viewer for a shareable visual report.
3. Lock the approved tool surface
Section titled “3. Lock the approved tool surface”Once you’ve reviewed the scan, pin what your agent is allowed to see:
agentgate lockThis writes agentgate.lock — SHA-256 hashes over each server’s tool names, descriptions, and input schemas. Commit it:
git add agentgate.lock && git commit -m "Lock MCP tool surface"4. Gate CI on drift
Section titled “4. Gate CI on drift”agentgate ciExits 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.
name: agentgateon: [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 ciNext steps
Section titled “Next steps”- CLI reference for all flags.
- Threat model for what each rule category defends against.
- Advisory API to query the advisory database programmatically.