
ThumbGate — PreToolUse Agent Firewall
Turns thumbs-down feedback into executable prevention rules that block AI agents from repeating mistakes before the tool call executes. The PreToolUse hook intercepts risky actions like force-pushes, destructive file operations, or API calls that match patterns learned from prior sessions. One thumbs-down creates a rule, next session the agent gets blocked with zero tokens spent. Ships with a context brain generator that consolidates lessons, guardrails, and gates into a single agent-readable markdown file your repo can version in git. Free tier gives you unlimited feedback capture and five active rules. Works with Claude Code, Cursor, Gemini CLI, Cline, and any MCP-compatible agent. Designed for workflows where one repeated mistake is a liability event or a token bill you don't want to pay twice.
- GitHub stars
- 31
- tools
- 68
- transport
- STDIO
- last updated
- Nov 11, 2026
Tools
68 toolsPublic tool metadata for what this MCP can expose to an agent.
capture_feedbackCapture an up/down signal plus one line of why. Vague feedback is logged, then returned with a clarification prompt instead of memory promotion.13 params
Capture an up/down signal plus one line of why. Vague feedback is logged, then returned with a clarification prompt instead of memory promotion.
chatHistoryarraycontextstringconversationWindowarrayfailureTypestringdecision · executionguardrailsobjectrelatedFeedbackIdstringrubricScoresarraysignalstringup · downskillstringtagsarraywhatToChangestringwhatWentWrongstringwhatWorkedstringfeedback_summaryGet summary of recent feedback1 params
Get summary of recent feedback
recentnumbersearch_lessonsSearch promoted lessons and show the corrective actions, lifecycle state, prevention rules, gates, and next harness fixes linked to each result.4 params
Search promoted lessons and show the corrective actions, lifecycle state, prevention rules, gates, and next harness fixes linked to each result.
categorystringerror · learning · preferencelimitnumberquerystringtagsarrayretrieve_lessonsRetrieve the most relevant lessons for a given tool/action context. Use in PreToolUse hooks for per-action guidance.3 params
Retrieve the most relevant lessons for a given tool/action context. Use in PreToolUse hooks for per-action guidance.
actionContextstringmaxResultsnumbertoolNamestringsearch_thumbgateSearch raw ThumbGate state across feedback logs, ContextFS memory, prevention rules, and imported policy documents.4 params
Search raw ThumbGate state across feedback logs, ContextFS memory, prevention rules, and imported policy documents.
limitnumberquerystringsignalstringup · down · positive · negativesourcestringall · feedback · context · rules · documentsimport_documentImport a local policy or runbook document into ThumbGate, normalize it for search, and propose provenance-backed gate candidates.7 params
Import a local policy or runbook document into ThumbGate, normalize it for search, and propose provenance-backed gate candidates.
contentstringfilePathstringproposeGatesbooleansourceFormatstringmarkdown · text · yaml · json · htmlsourceUrlstringtagsarraytitlestringlist_imported_documentsList imported policy and runbook documents stored in local ThumbGate state.3 params
List imported policy and runbook documents stored in local ThumbGate state.
limitnumberquerystringtagstringget_imported_documentRead a previously imported document with its proposed gate candidates and provenance.1 params
Read a previously imported document with its proposed gate candidates and provenance.
documentIdstringfeedback_statsGet feedback stats and recommendations
Get feedback stats and recommendations
No parameter schema in public metadata yet.
diagnose_failureDiagnose a failed or suspect workflow step using MCP schema, workflow, gate, and approval constraints.13 params
Diagnose a failed or suspect workflow step using MCP schema, workflow, gate, and approval constraints.
approvedbooleancontextstringerrorstringexitCodenumberguardrailsobjectintentIdstringmcpProfilestringoutputstringrubricScoresarraystepstringtoolArgsobjecttoolNamestringverificationobjectinfer_lesson_from_historyPerform autonomous inference on chat history to identify why a failure occurred and what rule should be recorded.2 params
Perform autonomous inference on chat history to identify why a failure occurred and what rule should be recorded.
chatHistoryarraylastActionobjectlist_intentsList available intent plans and whether each requires human approval in the active profile3 params
List available intent plans and whether each requires human approval in the active profile
bundleIdstringmcpProfilestringpartnerProfilestringplan_intentGenerate an intent execution plan with policy checkpoints8 params
Generate an intent execution plan with policy checkpoints
approvedbooleanbundleIdstringcontextstringdelegationModestringoff · auto · sequentialintentIdstringmcpProfilestringpartnerProfilestringrepoPathstringstart_handoffStart a sequential delegation handoff from a delegation-eligible intent plan9 params
Start a sequential delegation handoff from a delegation-eligible intent plan
approvedbooleanbundleIdstringcontextstringdelegateProfilestringintentIdstringmcpProfilestringpartnerProfilestringplannedChecksarrayrepoPathstringcomplete_handoffComplete a sequential delegation handoff and record verification outcomes8 params
Complete a sequential delegation handoff and record verification outcomes
attemptsnumberhandoffIdstringlatencyMsnumberoutcomestringaccepted · rejected · abortedresultContextstringsummarystringtokenEstimatenumberviolationCountnumberdescribe_reliability_entityGet the definition and state of a business entity (Customer, Revenue, Funnel). Aliased to describe_semantic_entity.1 params
Get the definition and state of a business entity (Customer, Revenue, Funnel). Aliased to describe_semantic_entity.
typestringCustomer · Revenue · Funnelget_reliability_rulesRetrieve active prevention rules and success patterns. Aliased to prevention_rules.
Retrieve active prevention rules and success patterns. Aliased to prevention_rules.
No parameter schema in public metadata yet.
enforcement_matrixShow the full Enforcement Matrix: feedback pipeline stats, active pre-action gates, and rejection ledger with revival conditions.
Show the full Enforcement Matrix: feedback pipeline stats, active pre-action gates, and rejection ledger with revival conditions.
No parameter schema in public metadata yet.
security_scanScan code for OWASP vulnerabilities (injection, XSS, path traversal, SSRF, prototype pollution) and supply chain risks (typosquatting, install script abuse, wildcard versions). Returns findings with severity, category, and line numbers.3 params
Scan code for OWASP vulnerabilities (injection, XSS, path traversal, SSRF, prototype pollution) and supply chain risks (typosquatting, install script abuse, wildcard versions). Returns findings with severity, category, and line numbers.
contentstringdiffModebooleanfilePathstringcapture_memory_feedbackCapture success/failure feedback to harden future workflows. Aliased to capture_feedback.3 params
Capture success/failure feedback to harden future workflows. Aliased to capture_feedback.
contextstringsignalstringup · downtagsarraybootstrap_internal_agentNormalize a GitHub/Slack/Linear trigger into startup context, construct a recall pack, prepare a git worktree sandbox, and emit an execution plus reviewer-lane plan.15 params
Normalize a GitHub/Slack/Linear trigger into startup context, construct a recall pack, prepare a git worktree sandbox, and emit an execution plus reviewer-lane plan.
approvedbooleancommentsarraycontextstringdelegationModestringoff · auto · sequentialintentIdstringmcpProfilestringmessagesarraypartnerProfilestringprepareSandboxbooleanrepoPathstringsandboxRootstringsourcestringgithub · slack · linear · api · clitaskobjectthreadobjecttriggerobjectprevention_rulesGenerate prevention rules from repeated mistake patterns2 params
Generate prevention rules from repeated mistake patterns
minOccurrencesnumberoutputPathstringexport_dpo_pairsExport DPO preference pairs from local memory log1 params
Export DPO preference pairs from local memory log
memoryLogPathstringexport_hf_datasetExport ThumbGate agent traces and DPO preference pairs as a HuggingFace-compatible dataset. Produces traces.jsonl, preferences.jsonl, and dataset_info.json with PII-redacted paths. Ready for huggingface-cli upload.2 params
Export ThumbGate agent traces and DPO preference pairs as a HuggingFace-compatible dataset. Produces traces.jsonl, preferences.jsonl, and dataset_info.json with PII-redacted paths. Ready for huggingface-cli upload.
includeProvenancebooleanoutputDirstringexport_databricks_bundleExport ThumbGate logs and proof artifacts as a Databricks-ready analytics bundle1 params
Export ThumbGate logs and proof artifacts as a Databricks-ready analytics bundle
outputPathstringconstruct_context_packConstruct a bounded context pack from contextfs4 params
Construct a bounded context pack from contextfs
maxCharsnumbermaxItemsnumbernamespacesarrayquerystringevaluate_context_packRecord evaluation outcome for a context pack6 params
Record evaluation outcome for a context pack
guardrailsobjectnotesstringoutcomestringpackIdstringrubricScoresarraysignalstringcontext_provenanceGet recent context/provenance events1 params
Get recent context/provenance events
limitnumbergenerate_skillAuto-generate Claude skills from repeated feedback patterns. Clusters failure patterns by tags and produces SKILL.md files with DO/INSTEAD rules.2 params
Auto-generate Claude skills from repeated feedback patterns. Clusters failure patterns by tags and produces SKILL.md files with DO/INSTEAD rules.
minOccurrencesnumbertagsarrayrecallRecall relevant past feedback, memories, and prevention rules for the current task. Call this at the start of any task to inject past learnings into the conversation.3 params
Recall relevant past feedback, memories, and prevention rules for the current task. Call this at the start of any task to inject past learnings into the conversation.
limitnumberquerystringrepoPathstringunified_contextAssemble a complete, role-aware context object in one call. Combines session state, user profile, relevant lessons, prevention guards, context pack, and code-graph impact — with tiered graceful degradation (full → warm → cold). Replaces multiple recall/retrieve/session_primer...5 params
Assemble a complete, role-aware context object in one call. Combines session state, user profile, relevant lessons, prevention guards, context pack, and code-graph impact — with tiered graceful degradation (full → warm → cold). Replaces multiple recall/retrieve/session_primer...
agentTypestringclaude · cursor · forgecode · codexquerystringrepoPathstringtoolInputobjecttoolNamestringsatisfy_gateSatisfy a gate condition with optional structured reasoning. Evidence is stored with a 5-minute TTL. When structuredReasoning is provided, the premise/evidence/conclusion chain is stored in the audit trail.3 params
Satisfy a gate condition with optional structured reasoning. Evidence is stored with a 5-minute TTL. When structuredReasoning is provided, the premise/evidence/conclusion chain is stored in the audit trail.
evidencestringgatestringstructuredReasoningobjectset_task_scopeDeclare or clear the current task scope so ThumbGate can compare affected files and diffs against the approved path set.7 params
Declare or clear the current task scope so ThumbGate can compare affected files and diffs against the approved path set.
allowedPathsarrayclearbooleanlocalOnlybooleanprotectedPathsarrayrepoPathstringsummarystringtaskIdstringget_scope_stateReturn the active task scope and any unexpired protected-file approvals.
Return the active task scope and any unexpired protected-file approvals.
No parameter schema in public metadata yet.
set_branch_governanceDeclare or clear branch and release governance so PR, merge, release, and publish actions can be evaluated against explicit workflow state.11 params
Declare or clear branch and release governance so PR, merge, release, and publish actions can be evaluated against explicit workflow state.
baseBranchstringbranchNamestringclearbooleanlocalOnlybooleanprNumberstringprRequiredbooleanprUrlstringqueueRequiredbooleanreleaseEvidencestringreleaseSensitiveGlobsarrayreleaseVersionstringget_branch_governanceReturn the active branch and release governance state.
Return the active branch and release governance state.
No parameter schema in public metadata yet.
approve_protected_actionGrant a time-limited approval for edits or publish actions that touch protected files.5 params
Grant a time-limited approval for edits or publish actions that touch protected files.
evidencestringpathGlobsarrayreasonstringtaskIdstringttlMsnumbertrack_actionRecord a verification action in the current session (for example figma_verified or tests_passed). Session actions expire after one hour.2 params
Record a verification action in the current session (for example figma_verified or tests_passed). Session actions expire after one hour.
actionIdstringmetadataobjectverify_claimCheck whether a claim has enough tracked evidence before the agent asserts it.1 params
Check whether a claim has enough tracked evidence before the agent asserts it.
claimstringcheck_operational_integrityEvaluate whether the current repo state is safe for PR, merge, release, and publish operations.5 params
Evaluate whether the current repo state is safe for PR, merge, release, and publish operations.
baseBranchstringcommandstringrepoPathstringrequirePrForReleaseSensitivebooleanrequireVersionNotBehindBasebooleanworkflow_sentinelPredict pre-action workflow risk, blast radius, and remediations before a tool call executes.8 params
Predict pre-action workflow risk, blast radius, and remediations before a tool call executes.
baseBranchstringchangedFilesarraycommandstringfilePathstringrepoPathstringrequirePrForReleaseSensitivebooleanrequireVersionNotBehindBasebooleantoolNamestringregister_claim_gateRegister a custom claim verification rule in local runtime state without editing tracked repo config.3 params
Register a custom claim verification rule in local runtime state without editing tracked repo config.
claimPatternstringmessagestringrequiredActionsarraygate_statsGet gate enforcement statistics -- blocked count, warned count, top gates
Get gate enforcement statistics -- blocked count, warned count, top gates
No parameter schema in public metadata yet.
dashboardGet full ThumbGate dashboard -- Harness Score, gate stats, prevention impact, proof, and system health
Get full ThumbGate dashboard -- Harness Score, gate stats, prevention impact, proof, and system health
No parameter schema in public metadata yet.
org_dashboardOrg-wide multi-agent dashboard — shows all active agents, gate decisions, adherence rates, risk agents, and top blocked gates across the organization. Team rollout: full visibility. Free preview: limited to 3 agents.1 params
Org-wide multi-agent dashboard — shows all active agents, gate decisions, adherence rates, risk agents, and top blocked gates across the organization. Team rollout: full visibility. Free preview: limited to 3 agents.
windowHoursnumbersettings_statusResolve managed, user, project, and local ThumbGate settings with per-field origin metadata for policy visibility.
Resolve managed, user, project, and local ThumbGate settings with per-field origin metadata for policy visibility.
No parameter schema in public metadata yet.
commerce_recallRecall past feedback filtered by commerce categories (product_recommendation, brand_compliance, sizing, pricing, regulatory). Returns quality scores alongside memories for agentic commerce agents.3 params
Recall past feedback filtered by commerce categories (product_recommendation, brand_compliance, sizing, pricing, regulatory). Returns quality scores alongside memories for agentic commerce agents.
categoriesarraylimitnumberquerystringget_business_metricsRetrieve high-level business metrics (Revenue, Conversion, Customers) from the Semantic Layer.1 params
Retrieve high-level business metrics (Revenue, Conversion, Customers) from the Semantic Layer.
windowstringdescribe_semantic_entityGet the canonical definition and state of a business entity (Customer, Revenue, Funnel).1 params
Get the canonical definition and state of a business entity (Customer, Revenue, Funnel).
typestringCustomer · Revenue · Funnelestimate_uncertaintyEstimate Bayesian uncertainty for a set of tags based on past feedback.1 params
Estimate Bayesian uncertainty for a set of tags based on past feedback.
tagsarraysession_handoffWrite a session handoff primer that auto-captures git state (branch, last 5 commits, modified files), last completed task, next step, and blockers. The next session reads this automatically for seamless context continuity.6 params
Write a session handoff primer that auto-captures git state (branch, last 5 commits, modified files), last completed task, next step, and blockers. The next session reads this automatically for seamless context continuity.
blockersarraycustomContextstringlastTaskstringnextStepstringopenFilesarrayprojectstringsession_primerRead the most recent session handoff primer to restore context from the previous session. Call at session start.
Read the most recent session handoff primer to restore context from the previous session. Call at session start.
No parameter schema in public metadata yet.
list_harnessesList natural-language harness specs for portable workflow control, proof-backed verification, and GTM execution.1 params
List natural-language harness specs for portable workflow control, proof-backed verification, and GTM execution.
tagstringrun_harnessExecute a natural-language harness through the async job runner with checkpoints, verification, and proof-backed outcomes.3 params
Execute a natural-language harness through the async job runner with checkpoints, verification, and proof-backed outcomes.
harnessstringinputsobjectjobIdstringscheduleCreate, list, or delete scheduled tasks. Supports natural language scheduling like "daily 9:00", "weekly monday 8:30", "hourly". Installs as macOS LaunchAgent or Linux crontab.6 params
Create, list, or delete scheduled tasks. Supports natural language scheduling like "daily 9:00", "weekly monday 8:30", "hourly". Installs as macOS LaunchAgent or Linux crontab.
actionstringcreate · list · deletecommandstringdescriptionstringnamestringschedulestringworkingDirectorystringuser_profileManage persistent user profile — preferences, style, domain knowledge that persists across sessions. Actions: add, remove, replace, view.3 params
Manage persistent user profile — preferences, style, domain knowledge that persists across sessions. Actions: add, remove, replace, view.
actionstringadd · remove · replace · viewcontentstringold_textstringsession_searchSearch past session notes and conversations using full-text search. Returns relevant sessions from the SQLite FTS5 index for cross-session recall.2 params
Search past session notes and conversations using full-text search. Returns relevant sessions from the SQLite FTS5 index for cross-session recall.
limitnumberquerystringopen_feedback_sessionOpen a feedback session after thumbs up/down. Follow-up messages will be captured for 60s.3 params
Open a feedback session after thumbs up/down. Follow-up messages will be captured for 60s.
feedbackEventIdstringinitialContextstringsignalstringup · downappend_feedback_contextAppend a follow-up message to an open feedback session. Call this when the user types additional context after giving thumbs up/down.3 params
Append a follow-up message to an open feedback session. Call this when the user types additional context after giving thumbs up/down.
messagestringrolestringuser · assistantdefault: usersessionIdstringfinalize_feedback_sessionFinalize a feedback session and re-infer the lesson with all follow-up context.1 params
Finalize a feedback session and re-infer the lesson with all follow-up context.
sessionIdstringwebhook_deliverSend a message to Teams, Slack, or Discord via webhook. Use for status reports, alerts, and notifications.4 params
Send a message to Teams, Slack, or Discord via webhook. Use for status reports, alerts, and notifications.
messagestringplatformstringteams · slack · discordtitlestringwebhook_urlstringreflect_on_feedbackRun a post-mortem analysis on negative feedback. Returns a proposed rule and recurrence info.4 params
Run a post-mortem analysis on negative feedback. Returns a proposed rule and recurrence info.
contextstringconversationWindowarrayfeedbackEventIdstringwhatWentWrongstringreport_product_issueReport a bug, suggestion, or complaint about ThumbGate itself (not project feedback). Auto-files a GitHub issue with system context. Use when the user expresses frustration or requests a feature for the thumbgate tool.3 params
Report a bug, suggestion, or complaint about ThumbGate itself (not project feedback). Auto-files a GitHub issue with system context. Use when the user expresses frustration or requests a feature for the thumbgate tool.
bodystringcategorystringbug · feature · questiontitlestringrun_managed_lesson_agentRun the LLM-powered lesson inference and rule generation agent over accumulated feedback. Requires ANTHROPIC_API_KEY for LLM mode; falls back to heuristics if unavailable.3 params
Run the LLM-powered lesson inference and rule generation agent over accumulated feedback. Requires ANTHROPIC_API_KEY for LLM mode; falls back to heuristics if unavailable.
dryRunbooleanlimitnumbermodelstringmanaged_agent_statusShow status of the last managed lesson agent run: entries processed, lessons created, gates promoted, and total runs.
Show status of the last managed lesson agent run: entries processed, lessons created, gates promoted, and total runs.
No parameter schema in public metadata yet.
run_self_distillRun the self-distillation agent to auto-evaluate recent agent sessions and generate improvement lessons without human feedback. Reads conversation logs, detects success/failure signals, and persists lessons.3 params
Run the self-distillation agent to auto-evaluate recent agent sessions and generate improvement lessons without human feedback. Reads conversation logs, detects success/failure signals, and persists lessons.
dryRunbooleanlimitnumbermodelstringself_distill_statusShow status of the last self-distillation run: sessions analyzed, lessons generated, signals detected.
Show status of the last self-distillation run: sessions analyzed, lessons generated, signals detected.
No parameter schema in public metadata yet.
context_stuff_lessonsDump ALL prevention lessons into a single text block for context-window injection. Bypasses RAG/search — returns every lesson sorted by confidence. For most projects (20-200 lessons), fits in 1K-10K tokens.3 params
Dump ALL prevention lessons into a single text block for context-window injection. Bypasses RAG/search — returns every lesson sorted by confidence. For most projects (20-200 lessons), fits in 1K-10K tokens.
formatstringcompact · fullmaxTokenBudgetnumbersignalstringpositive · negativeSponsors
Readme
ThumbGate 👍 👎
ThumbGate Infrastructure Firewall with Thumbs Up and Thumbs Down
ThumbGate is the self-improving pre-action firewall for AI coding agents
AI coding agents repeat mistakes — and one wrong tool call can wipe a directory, leak a key, or push broken code.
Details
- Repository
- github.com/igorganapolsky/thumbgate
- Website
- thumbgate.ai
- Categories
- AI & LLM Tools, Security & Pentesting
- Package
thumbgate- Transport
- STDIO
- Registry
- MCP registry, active