← Back to directory
T

ThumbGate MCP Server

Community
Self-improving firewall for AI coding agents that gates tool calls before they run
GitHub source repository ↗
★ 25 Stars Category · Dev Tools Popular
61FMRS · C

A thoughtfully engineered local-first gating layer: no LLM on the enforcement path, auditable decisions, break-glass recovery, and honest disclosure of limits. Its value hinges on hook interception — hard enforcement only on PreToolUse-capable agents — and the docs candidly note advisory-mode limits, estimate-based savings, and unshipped roadmap items. Well suited to teams wanting a cross-agent, learning rule store; overkill for simple static denylists.

Reliability
8/20
Security and permissions
13/20
Maintenance
13/20
Documentation
14/20
Setup experience
13/20
Read the FMRS scoring method →

ThumbGate is a local-first Pre-Action Checks engine that runs as a stdio MCP server and via PreToolUse hooks to evaluate proposed AI agent tool calls before execution. It captures thumbs-up/down feedback as local lessons, promotes repeated failures into prevention rules, and hard-blocks detected secret leaks plus direct self-disable commands (process kill, env bypass) by default. Other high-risk classes (rm -rf, force-push, fetch-and-run) warn and log by default; THUMBGATE_STRICT_ENFORCEMENT=1 preserves deny decisions for every matched blocking rule. Gate decisions are deterministic (literal/AST matching with local bge-small embeddings via LanceDB) — no LLM runs on the enforcement path. Claude Code, Codex, and Gemini CLI get hard interception; Cursor, Cline, OpenCode, and Amp get advisory gate_check only. Free tier: 2 feedback captures/day (10 total), 3 active auto-promoted prevention rules; Pro at $19/mo adds unlimited rules, lesson recall/search, and a personal dashboard. MIT-licensed.

Tools

gate_check
Evaluates a proposed tool call before execution and returns an allow/warn/deny verdict
capture_feedback
Captures thumbs-up/down feedback as a structured local lesson
open_feedback_session
Opens a feedback session to add context beyond a thumbs-down
append_feedback_context
Appends concrete context to an open feedback session
finalize_feedback_session
Finalizes the session and infers a lesson from the full conversation
record_task_outcome
Records a task-level receipt marked working only with completion, verification, and evidence
search_lessons
Searches the local lesson corpus (Pro capability)
prevention_rules
Lists active prevention rules
get_reliability_rules
Retrieves the reliability rules list
gate_stats
Shows gate blocking statistics
enforcement_matrix
Shows the enforcement matrix of what has actually been blocked
get_branch_governance
Shows branch/release governance status
approve_protected_action
Grants a scoped, expiring approval for a protected action

Setup

Run npx thumbgate init to auto-detect and wire your agent's integration, or run it as a stdio MCP server directly: npx -y thumbgate serve. Optional THUMBGATE_MCP_PROFILE (essential | default | readonly | locked) overrides the tool profile; THUMBGATE_STRICT_ENFORCEMENT=1 enables strict blocking. Do not use npm start for MCP — that launches the HTTP API, not the stdio server.

claude_desktop_config.json
{"mcpServers":{"thumbgate":{"command":"npx","args":["-y","thumbgate","serve"]}}}

Fit and risk

Best for

  • Developers running AI coding agents in production or high-blast-radius workflows who need an external enforcement boundary
  • Engineering/security/platform teams wanting auditable, inspectable gate decisions
  • Teams converting repeated corrections into reusable rules instead of relying on model memory

Not for

  • Small teams happy with a small static hand-written denylist (native hooks suffice)
  • Those expecting gating to improve model generation quality (it intercepts execution only)
  • Cursor/Cline/OpenCode users handling irreversible actions, since advisory verdicts can be ignored

Required permissions

  • Runs locally over stdio; reads/writes ~/.claude or in-repo .claude config, hooks, and lesson stores
  • Writes local state (.thumbgate/), JSONL logs, and task-outcome receipts
  • Requires modifying the agent's MCP and PreToolUse hook configuration files
  • Task-outcome decisions need THUMBGATE_HUMAN_REVIEWER_ID and an independently revocable human reviewer key

Risks and side effects

  • Advisory integrations (Cursor, Cline, OpenCode, Amp) can be ignored by the agent — no true blocking of irreversible actions
  • In strict mode, false positives from stale or noisy rules can block legitimate work; recovery relies on break-glass
  • Ships warn-by-default: most high-risk commands are not blocked unless strict enforcement is on
  • Dashboard token/dollar savings are estimates, not measured provider usage
  • Lesson DBs contain sensitive engineering context and must stay gitignored in per-project installs
  • Regulated-industry templates are roadmap directions, not shipped compliance capabilities

Troubleshooting

  1. Run npx thumbgate doctor to check hooks, MCP wiring, and agent readiness
  2. Ensure you use npx thumbgate serve (stdio), not npm start which starts the HTTP API
  3. Restart the agent session after changing MCP or hook settings so configs reload
  4. If a gate over-fires, use npx thumbgate break-glass --reason=... to open a short recovery window
  5. Verify THUMBGATE_STRICT_ENFORCEMENT and THUMBGATE_MCP_PROFILE environment variables match expectations
  6. For per-project installs, confirm .claude/memory/feedback/ is gitignored

Use cases

Flag or block git push --force to protected branches before it runs
Turn recurring failures (deleted test dirs, production DROPs) into prevention rules
Hard-block detected secret exfiltration by default
Share one local lesson and rule store across multiple agents
Use a 5-minute break-glass window to recover when a gate over-fires

Supported clients

Claude CodeFull support
Claude DesktopPartial support
CursorPartial support
CodexFull support
Gemini CLIFull support
ClinePartial support
OpenCodePartial support
AmpPartial support