Listed from the MCP registry; nobody on Odel publishes it.
Sub-ms PreToolUse firewall, feedback memory, and single-use permits for AI coding agents.
Runs on your machine from its package; the steps are below.

At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y thumbgate
MCP client config
{
"mcpServers": {
"thumbgate-pretooluse-agent-firewall": {
"command": "npx",
"args": [
"-y",
"thumbgate"
]
}
}
}
ThumbGate checks AI coding actions before they run: allow, warn or deny
It checks every tool call your agent is about to make and stops the dangerous ones before they run.
AI coding agents repeat mistakes — and one wrong tool call can wipe a directory, leak a key, or push broken code.
ThumbGate is the local-first Pre-Action Checks engine for AI coding agents. It runs in the PreToolUse hook to evaluate the proposed tool call before execution — so costly mistakes can be caught before they happen.
git reset --hard, rm -rf on home or root, DROP TABLE.Works with Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, OpenCode, and other MCP agents. ▶ 90-second demo · GIF walkthrough
You need Node.js 18 or newer. Run these two commands in the project where your agent works:
npx thumbgate init # finds your agent (Claude Code, Cursor, Codex, ...) and installs the hooks
npx thumbgate doctor # checks that the hooks are really wired
What success looks like: doctor prints Overall: READY and exits with code 0. If it says something is missing, it lists what to fix; run init again or pick your agent from the table below.
That's it. The built-in checks are now active. Your agent can keep working as usual; ThumbGate only speaks up when a tool call matches a check.
See a block without risking anything. This hands ThumbGate the same input your agent's hook would, without running the command:
echo '{"tool_name":"Bash","tool_input":{"command":"git push --force"}}' | npx thumbgate gate-check
You get "permissionDecision":"deny" and [GATE:force-push] Force push blocked. In a real session, the agent gets that answer and the push never runs.
When your agent does something you never want repeated, give it a thumbs-down:
In Claude Code you can also install it as a plugin:
/plugin install thumbgate --marketplace IgorGanapolsky/ThumbGate
npx thumbgate capture --feedback=down --context="Never run DROP on production tables" --what-went-wrong="agent proposed DROP" --what-to-change="require review for DROP"
From then on the agent sees that lesson before a matching action. After three matching thumbs-downs it becomes a check that warns, or blocks with THUMBGATE_STRICT_ENFORCEMENT=1. (DROP TABLE itself is already denied by default.)
To see your rules and what was caught, run npx thumbgate dashboard --open. An empty dashboard on day one is normal; it means nothing has fired yet.
Want a phased walkthrough with a verify step at every stage? Follow the Progressive Setup Guide (Progressive wiring online; numbered configs in config/progressive/).
| Agent | Command | Enforcement |
|---|---|---|
| Claude Code | npx thumbgate init --agent claude-code | 🛡️ Hard — PreToolUse |
| Codex | npx thumbgate init --agent codex | 🛡️ Hard — pre_tool_use |
| Gemini CLI | npx thumbgate init --agent gemini | 🛡️ Hard — PreToolUse |
| ForgeCode | npx thumbgate init --agent forge | 🛡️ Hard — pre_tool_use |
| Cursor | npx thumbgate init --agent cursor | 🛡️ Hard for shell commands — beforeShellExecution hook denies them. 💬 Advisory for every other Cursor tool (file edits, MCP calls) — MCP gate_check. If the hook errors, the command is denied (fails closed; see Cursor adapter). |
| Cline | npx thumbgate init --agent cline | 💬 Advisory — MCP + .clinerules |
| OpenCode | npx thumbgate init --agent opencode | 💬 Advisory — MCP gate_check |
| Any MCP agent | npx thumbgate serve | 💬 Advisory — MCP gate_check |
| Amp | npx thumbgate init --agent amp | 📝 Feedback capture |
| GitHub Actions | uses: IgorGanapolsky/ThumbGate@v1 | 🩺 Marketplace Action — doctor / AI inventory in CI |
Per-agent guides: Claude/Codex bridge · Codex profile · Cursor · MCP setup
| Scope | Command | Claude Code hooks | MCP entry | Lessons and dashboard data |
|---|---|---|---|---|
| Machine-wide (default) | npx thumbgate init | ~/.claude/settings.json, so they run in every repo on this machine | <repo>/.mcp.json | <repo>/.thumbgate/ |
| Per-project | npx thumbgate init --project | <repo>/.claude/settings.json, so they run only in this repo | <repo>/.mcp.json | <repo>/.thumbgate/ |
Lessons stay per repo in both scopes: a 👎 in repo-A does not flag anything in repo-B. Cross-repo blocking is not automatic. Versions before 1.31 kept lessons in <repo>/.claude/memory/feedback/ or ~/.thumbgate/projects/<name>/. ThumbGate reads <repo>/.thumbgate/ first once it exists, and init creates it, so copy the old files into <repo>/.thumbgate/ to keep those lessons. Keep .thumbgate/ out of git. Inits before 1.44.0 wrote hooks to ~/.claude/settings.local.json, which Claude Code does not read. From 1.44.0 the ThumbGate MCP server moves them to ~/.claude/settings.json the next time it starts (set THUMBGATE_DISABLE_CLAUDE_SELF_HEAL=1 to stop that), npx thumbgate init moves them right away, and npx thumbgate doctor tells you if they are still in the old file. <repo>/.claude/settings.json is the file teams usually commit, so check the hook paths in it before you commit it.
For an MCP-only install, npx thumbgate install-mcp adds mcpServers.thumbgate to ~/.claude/settings.json, and npx thumbgate install-mcp --project adds it to <repo>/.claude/settings.json instead. Neither writes hooks.
MCP tools (surface): gate_check (read/evaluate proposed tool call), feedback capture + session tools (write), dashboard/stats (read). Destructive agent actions stay blocked/warned by PreToolUse — ThumbGate does not execute user shell commands for you.
Directories and clients that install ThumbGate as an MCP server must start stdio MCP, not the HTTP API:
npx -y thumbgate serve
npx -y thumbgate mcpnpm start for MCP — that launches the hosted HTTP API (src/api/server.js), not the agent-facing stdio server.| You give | What ThumbGate does |
|---|---|
| 👎 typed in the agent session right after a command | Turns that command into a check. The first one warns on the next run. A second 👎 from you on the same command blocks it, with or without strict mode. |
| 👎 from the CLI with only a sentence of context (no command attached) | Saves a lesson the agent sees before a matching action. On the third matching 👎, a check fires: a warning by default, a block with THUMBGATE_STRICT_ENFORCEMENT=1. |
| 👍 with one sentence of context | Saves a success lesson and counts it in your stats. It does not create, loosen or lift a check. |
| 👍 or 👎 with no context and no command | Logged only. Nothing is stored or promoted. |
Example: the agent runs npm run deploy:staging and you type "thumbs down: that pushed to the wrong environment". The next npm run deploy:staging gets a warning before it runs. You thumbs-down it a second time, and the next run is denied. A later 👍 on the same command is saved as a success lesson, and the block stays in place.
A hold is a pause. When you type a 👎 right after the agent ran something, ThumbGate refuses that same action (the same tool; for a shell command, the same first three words) until you say to go on. After a chat post, new posts are refused until the last message is edited in place. It exists so the agent cannot repeat what you just marked wrong. A hold lasts up to 24 hours, and several 👎 on the same action count as one hold.
Three ways out:
npx thumbgate holds release in the project folder. npx thumbgate holds lists what is held.npx thumbgate holds off. It takes effect in the session that is already running, and npx thumbgate holds on brings it back. Setting THUMBGATE_THUMBS_DOWN_HOLD=0 before you start a session does the same for that session.Turning the hold off keeps every other gate: the denied-by-default commands (force-push, secrets sent out, rm -rf on home and the like) and the chat send rules stay on. THUMBGATE_SEND_GATE=0 is the switch for the whole chat send gate, holds included. npx thumbgate break-glass does not lift a hold.
Limits: a hold matches the same tool or the same first three words, so a reworded command is not held, and ThumbGate is not a sandbox.
open_feedback_session, or ThumbGate GPT)npx thumbgate brain --write # → .thumbgate/BRAIN.md (lessons + gates in one artifact)
Pro operators can invoke search_lessons through MCP and use npx thumbgate lessons from the CLI. History-aware feedback sessions and lesson search are Pro capabilities; Free does not include recall or search.
It hard-blocks detected secret leaks and two direct self-disable command classes by default — commands that terminate the ThumbGate gate process or enable its bypass environment override. It also denies catastrophic commands by default: force-push, git reset --hard, git clean -f, rm -rf on home or root, and DROP TABLE. Other high-risk classes (fetch-and-run, direct guardrail edits, other matching rules) warn and log by default. Set THUMBGATE_STRICT_ENFORCEMENT=1 for strict enforcement (warnings become hard denies).
| Verdict | Default behavior |
|---|---|
| ⛔ Hard-block | Detected secret leaks; process-kill/environment-override self-disable; catastrophic commands (force-push, git reset --hard, git clean -f, rm -rf on home or root, DROP TABLE) |
| 👎 Warn + log | fetch-and-run, direct guardrail edits, other matching rules (become hard denies with THUMBGATE_STRICT_ENFORCEMENT=1) |
| 👍 Allow | Everything else |
Accepted feedback is stored as local lessons. Repeated concrete failures can become prevention rules that promote from warnings to blocking gates. The firewall improves from operations without retraining the model. Prompt evaluation (npx thumbgate eval) turns accepted feedback into reusable eval cases and local proof reports.
Honest disclaimer: ThumbGate does not update model weights. It intercepts tool calls at runtime. Local-first — no cloud required for the enforcement path.
Agent tries: rm -rf tests/
ThumbGate: 👎 WARN + LOG — "Never delete test directories"
Pattern matched: rm.*-rf.*tests
Source: your thumbs-down from last Tuesday
Strict mode: ⛔ DENY before tool execution
flowchart LR
A["Agent tool call"] --> B{"Rule match?"}
B -- exact --> D["On-device gate"]
B -- semantic --> C["Local LanceDB"]
C --> D
D -- secret/kill --> E["⛔ Hard-block"]
D -- known-bad --> G["👎 Warn + log"]
D -- safe --> F["👍 Allow"]
⛔ secret-exfiltration → hard-block (default)
⛔ self-protect-kill → hard-block (default)
⛔ self-protect-env → hard-block (default)
⛔ force-push → hard-block (default)
⛔ git-reset-hard → hard-block (default)
⛔ git-clean-force → hard-block (default)
⛔ rm-rf-home-or-root → hard-block (default)
⚠️ protected-branch → warn; hard-block under strict
⚠️ unresolved-threads → warn; hard-block under strict
⚠️ package-lock-reset → warn; hard-block under strict
npx thumbgate init
npx thumbgate doctor
npx thumbgate capture up|down "<text>"
npx thumbgate lessons
npx thumbgate brain --write
npx thumbgate dashboard --open
npx thumbgate break-glass --reason="ThumbGate over-fired" # 5-min recovery
# Portable lessons
curl -X POST http://localhost:3456/v1/lessons/export \
-H "Authorization: Bearer $THUMBGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"outputPath": "./lessons-export.json"}'
# DPO pairs for fine-tuning
curl -X POST http://localhost:3456/v1/dpo/export \
-H "Authorization: Bearer $THUMBGATE_API_KEY" \
-o dpo-pairs.jsonl
Agentic development is becoming a loop: Guide → Generate → Verify → Solve. ThumbGate is the pre-action gate / pre-action boundary between generated intent and executed action.
Spec-driven agent frameworks like GSD (get-shit-done) and GitHub Spec Kit plan and generate work. ThumbGate is the guardrail layer for spec-driven agents: it sits after the plan, on the boundary between a generated tool call and its execution — alongside GSD / Spec-Kit, not instead of them.
npx thumbgate init installs these into your agent palette:
| Command | What it does |
|---|---|
/thumbgate-dashboard | Open local project dashboard |
/thumbgate-guard | Turn last mistake into a hard prevention rule |
/thumbgate-rules | List active rules & lessons |
/thumbgate-blocked | Gate stats + enforcement matrix |
/thumbgate-protect | Branch governance + scoped approval |
/thumbgate-doctor | Health-check hooks, MCP, readiness |
| Surface | Start here |
|---|---|
| Open ThumbGate GPT | thumbgate.ai/go/gpt — ThumbGate GPT: start here. Paste agent actions, get advice + checkpointing. No, users do not have to keep chatting inside the ThumbGate GPT to use ThumbGate — the hard enforcement layer still runs where the work happens. |
| Install Codex Plugin | Open the Codex plugin install page: thumbgate.ai/codex-plugin · zip: thumbgate-codex-plugin.zip · plugins/codex-profile/INSTALL.md |
Claude Desktop .mcpb | latest release |
| VS Code / Open VSX | plugins/vscode-extension/README.md |
| Antigravity-compatible | plugins/antigravity-extension/INSTALL.md |
| JetBrains | plugins/jetbrains-plugin/README.md · JetBrains Marketplace path for the same runtime |
| ChatGPT App / GPT Action | thumbgate.ai/chatgpt-app |
| ThumbGate-Core (staging) | https://github.com/IgorGanapolsky/ThumbGate-Core — pre-release staging + a few internal cache scripts; not the product moat |
Which gates were actually denied on which host. Generated by npm run compat:matrix from real runs through each host's hook path; nothing here is typed by hand. "enforced" means a test ran that gate's denial through that host in this checkout. "not enforced" means the command ran and was allowed. "untested" means no run exists. Details and the exact check per host: docs/host-compatibility.md.
| Gate | Claude Code | Cursor | Codex | Gemini CLI |
|---|---|---|---|---|
force-push | enforced | enforced | untested | untested |
git-reset-hard | enforced | enforced | untested | untested |
git-clean-force | enforced | enforced | untested | untested |
rm-rf-home-or-root | enforced | enforced | untested | untested |
cloud-bulk-delete | enforced | enforced | untested | untested |
terraform-destroy | enforced | enforced | untested | untested |
kubectl-bulk-delete | enforced | enforced | untested | untested |
docker-system-prune-all | enforced | enforced | untested | untested |
iam-policy-change | enforced | enforced | untested | untested |
| Held after one thumbs-down, gate after two | enforced | enforced | untested | untested |
| Text typed in a chat window or web page | out of scope | out of scope | out of scope | out of scope |
| Host | Hard-stops a bad call | Fails open or closed | Evidence |
|---|---|---|---|
| Claude Code | yes (9 of 9 gates denied) | Fails open | docs/host-compatibility.md |
| Cursor | yes (9 of 9 gates denied) | Fails closed | tests/cursor-fail-closed.test.js |
| Codex | untested | untested | docs/host-compatibility.md |
| Gemini CLI | untested | untested | docs/host-compatibility.md |
| Cline | no, warns only | no hook, so not applicable | tests/advisory-hosts-honesty.test.js |
| OpenCode | no, warns only | no hook, so not applicable | tests/advisory-hosts-honesty.test.js |
| Amp | no, warns only | no hook, so not applicable | tests/advisory-hosts-honesty.test.js |
Free tier: 2 feedback captures/day (10 total) and up to 3 active auto-promoted prevention rules. Pro ($19/mo or $149/yr) is the individual tier for unlimited rules, history-aware lessons, linked feedback session flow, personal dashboard, and DPO export. Enterprise is custom and scoped after intake; hosted team lesson sync and a hosted org dashboard are not general availability.
| Free | Pro ($19/mo or $149/yr) | Enterprise | |
|---|---|---|---|
| Local CLI + PreToolUse | ✅ | ✅ | Scoped after intake |
| Feedback captures | 2 feedback captures/day (10 total) | Unlimited | Scoped after intake |
| Active auto-promoted rules | up to 3 active auto-promoted prevention rules | Unlimited | Scoped after intake |
| Personal dashboard + DPO export | — | ✅ | Reviewed during intake |
| Hosted team lesson sync | — | — | Not general availability |
| Hosted org dashboard | — | — | Not general availability |
Team path: request a 30-day team pilot. Tell us your team size and coding agent, and a person replies by email with how the pilot would run. There is no self-serve team checkout. Request a team pilot →
Local technical path: install the CLI and use init plus the documented setup so Pre-Action Checks evaluate tool calls where the agent actually runs.
First-dollar activation path: open the ThumbGate GPT, paste the risky action, capture typed feedback (thumbs down: / thumbs up:). Native ChatGPT rating buttons are not the ThumbGate capture path. Ask: what repeated AI mistake would be worth catching before the tool executes?
Paid path for individual operators: ThumbGate Pro is the self-serve side lane for a personal dashboard and export-ready evidence.
Start free · Pro $19/mo · Live Dashboard · 30-day team pilot · First Dollar Playbook
Popular buyer questions: AI search topical presence · Relational knowledge and AI recommendations · AI Mode ads for agent governance · MCP tool governance · AI agent pre-action approval gates · Background agent governance · GPT-5.5 model evaluation · Stop repeated AI agent mistakes · Browser automation safety · Native messaging host security · Autoresearch agent safety · Cursor guardrails · Codex CLI guardrails · Gemini CLI memory + enforcement · Google Cloud MCP guardrails · Roo Code alternative: migrate to Cline
| Layer | Tech |
|---|---|
| Runtime | Node.js ≥18 |
| Interfaces | MCP stdio, HTTP API, CLI |
| Storage | SQLite + FTS5, LanceDB vectors, JSONL logs |
| Intelligence | MemAlign dual recall, Thompson Sampling, local embeddings |
| Billing / host | Stripe, Railway |
| Execution | Railway, Cloudflare Workers, Docker Sandboxes |
| Governance | Workflow Sentinel, control plane, Docker Sandboxes |
Every Changeset is tied to the exact main merge commit and generates Verification Evidence for Release Confidence.
0.5ms local PreToolUse enforcement (npx thumbgate init) across Claude Code, Cursor, Codex, and Gemini CLI; TencentDB Agent Memory record normalization into blocking SQL safety candidates is covered in tests/memory-provider-enforcement-bridge.test.js, and outer-harness context-budget checks inspired by Tencent Hunyuan Hy-Memory-30B-A3B research are validated in scripts/rrsi-doctor.js.SA5 / SA9 AMD Turin-Dense 3.4 GHz all-core turbo in ap-hongkong & ap-singapore) and the Hy-Memory-30B-A3B surgical state-patching pattern is published in our companion hermes-eval benchmark repository (docs/TENCENT-CLOUD-SA9-HUNYUAN-CASE-STUDY.md and scripts/tencent_sa9_hunyuan_benchmark.py).Full index: docs/INDEX.md
| Need | Link |
|---|---|
| Free video course (41 min) | Claude Code + ThumbGate on Udemy |
| Agent workflow contract | WORKFLOW.md |
| Ready-for-agent intake | .github/ISSUE_TEMPLATE/ready-for-agent.yml |
| Cloud-to-Mac dispatch loop | docs/guides/mac-dispatch-loop.md |
| Verification Evidence | docs/VERIFICATION_EVIDENCE.md |
| Release Confidence | docs/RELEASE_CONFIDENCE.md |
| Changeset strategy | docs/CHANGESET_STRATEGY.md |
| First Dollar Playbook | docs/FIRST_DOLLAR_PLAYBOOK.md |
| Security policy | SECURITY.md |
| Threat model | THREAT_MODEL.md |
| Federal / regulated | docs/FEDERAL.md |
| Commercial Truth | docs/COMMERCIAL_TRUTH.md |
| Issues / PRs | GitHub Issues · PR template |
FAQ (one-liners): Not a fine-tuner (runtime intercept only). Different from CLAUDE.md / .cursorrules (those are context; ThumbGate is an external allow/warn/deny before tools run).
ThumbGate GitHub star growth is measured with GitHub's privacy-safe GET /repos/{owner}/{repo}/stargazers/history endpoint (weekly counts, no stargazer identities). Run npm run stars:history -- --fixture tests/fixtures/github-star-history.json --json for the local proof. Stars are not npm installs and not revenue. The live GitHub Marketplace Action is ThumbGate Agent Governance (uses: IgorGanapolsky/ThumbGate@v1).
Usage over star count. Evaluate ThumbGate from the install path and live usage badges above (npx thumbgate init, Marketplace uses:, npm weekly downloads, GitHub clones), not from whether the repo has twenty stars or twenty thousand. No pitch deck is required. We do not farm GitHub profile badges (no YOLO-merge of protected main, no 5-minute Issue close theater, no fake Co-authored-by). Galaxy Brain needs real accepted answers in Discussions Q&A. npm run github:achievements -- --fixture tests/fixtures/github-achievements.json --json inventories what is already earned vs what we refuse to farm.
ThumbGate is for operators whose AI coding agents can leak a secret or destroy a checkout before a human sees the tool call (Claude Code, Cursor, Codex, Gemini CLI, MCP). Discovery should reach those operators — not a star campaign.
ThumbGate is not a GitHub star package, not fake engagement, and not a substitute for npm installs or merged PRs. Real engagement is npx thumbgate init and a PreToolUse hook that actually fires.
Lightweight visuals for how agents fail without a pre-action gate:
| Meme | Meaning |
|---|---|
| Unchecked tool calls ship destructive commands. | |
| A prompt is advice; a PreToolUse hook is enforcement. |
Also available: ThumbGate GPT · ThumbGate Pro ($19/mo)
Igor Ganapolsky — payments (Stripe/Connect), AI agent guardrails/MCP, Android + backends. Small number of contract slots: $120–150/hr, 1099, remote US. LinkedIn · thumbgate.ai
If ThumbGate saves you from a repeated agent mistake, you can buy me a coffee.
MIT — see LICENSE. Project policy: SECURITY.md · THREAT_MODEL.md.