mergegate-cli
The command line and MCP client of MergeGate — a GitHub check that fails when a value your docs state (a timeout, a limit, a price) stops matching the code.
The engine runs on the MergeGate server. This client names a pushed commit of your GitHub repository
(and, with --worktree, sends the files you changed since then), and prints the verdict: 🔴 a pinned
value is now false, 🟡 a human should look, ✅ holds. No LLM in the judgement.
You need an API token: install the MergeGate GitHub App, start the 14-day trial (no card) or a paid plan, and issue a token on your account page. Tokens reach only the repositories of their own account and stop working when the plan ends.
npx mergegate-cli login # paste the token (or set MERGEGATE_TOKEN in CI)
npx mergegate-cli check --base main # judge HEAD (pushed) against main; exit 1 on new 🔴
npx mergegate-cli check --base main --worktree # include your unpushed changes
npx mergegate-cli specs refund # list specs and how their claims stand
npx mergegate-cli mcp # stdio MCP server: search_specs · get_spec · list_drift
MCP client config (Claude Code, Cursor, any stdio client):
{ "mcpServers": { "mergegate": { "command": "npx", "args": ["-y", "mergegate-cli", "mcp"], "env": { "MERGEGATE_TOKEN": "mgt_…" } } } }
check --worktree and the MCP tools send the files changed since your last pushed commit to the
MergeGate server, which deletes them as soon as the verdict is made — the same as the GitHub App,
which reads your repository for every pull request.
Versions 0.1.x bundled the engine and ran offline; they were withdrawn when the engine moved to the server.