ThumbGate
The MCP Memory Gateway is a context engineering server that captures agent feedback, enforces pre-action gates to block known mistakes, and injects relevant past context into AI coding agent sessions for improved reliability and continuity.
Feedback & Memory
Capture feedback (
capture_feedback,capture_memory_feedback): Record up/down signals with context, reasoning, and rubric scores; vague feedback is rejected with a clarification promptRecall past context (
recall,commerce_recall): Vector-search relevant past feedback, memories, and prevention rules for the current taskView summaries & analytics (
feedback_summary,feedback_stats,dashboard): Approval rate trends, gate enforcement stats, and prevention impact overviewsGenerate prevention rules (
prevention_rules,get_reliability_rules): Auto-generate blocking rules from repeated failure patterns
Pre-Action Gates & Safety
Satisfy gates (
satisfy_gate): Record evidence that a gate condition is met (e.g., PR threads checked) with a 5-minute TTLGate statistics (
gate_stats): See blocked/warned counts and top triggered gates
Session Continuity
Session handoff (
session_handoff): Write a primer capturing git state, last task, next step, and blockersSession primer (
session_primer): Restore context at session start from the most recent handoff
Workflow Planning & Diagnosis
List & plan intents (
list_intents,plan_intent): View available workflows and generate checkpointed execution plans with policy gatesDiagnose failures (
diagnose_failure): Root-cause analysis for failed or suspect workflow stepsBootstrap agents (
bootstrap_internal_agent): Normalize GitHub/Slack/Linear triggers into startup context with recall packs and worktree sandboxesDelegation handoffs (
start_handoff,complete_handoff): Manage sequential agent delegation with verification outcomes
Context Engineering
Context packs (
construct_context_pack,evaluate_context_pack): Build and evaluate bounded context packs for large projects, closing the retrieval learning loopContext provenance (
context_provenance): Audit trail of recent context and retrieval decisionsEstimate uncertainty (
estimate_uncertainty): Bayesian uncertainty estimates for risky tags before acting
Business Metrics
Business metrics (
get_business_metrics): Retrieve Revenue, Conversion, and Customer metrics from the Semantic LayerSemantic entity descriptions (
describe_semantic_entity,describe_reliability_entity): Canonical definitions and state of Customer, Revenue, or Funnel entities
Export & Fine-Tuning
Export DPO pairs (
export_dpo_pairs): Build preference pairs from promoted memories for model fine-tuningExport Databricks bundle (
export_databricks_bundle): Export RLHF logs and proof artifacts as a Databricks-ready analytics bundleGenerate skills (
generate_skill): Auto-generate Claude skill files (SKILL.md) from clustered failure patterns
ThumbGate ๐ ๐
What it does
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.
Tech memes (shareable)
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. |
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. Other high-risk classes (rm -rf, force-push, fetch-and-run, direct guardrail edits) 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 |
๐ Warn + log |
|
๐ 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.
Works with Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, OpenCode, and other MCP agents.
![]()
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 executionAgentic development cycle fit
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.
Related MCP server: memory-engine-mcp
Quick Start
npx thumbgate init # wire PreToolUse hooks
npx thumbgate capture down "Never run DROP on production tables" # ๐ lesson
npx thumbgate doctor # health checkLater DROP attempts in the same scope surface the check:
โ ๏ธ Check fired: "Never run DROP on production tables"
Pattern: DROP.*production
Verdict: ๐ WARN + LOG (โ BLOCK when THUMBGATE_STRICT_ENFORCEMENT=1)MCP / Glama / registry install (stdio)
Directories and clients that install ThumbGate as an MCP server must start stdio MCP, not the HTTP API:
npx -y thumbgate serveEquivalent:
npx -y thumbgate mcpDo not use
npm startfor MCP โ that launches the hosted HTTP API (src/api/server.js), not the agent-facing stdio server.
โถ 90-second demo ยท GIF walkthrough
Install for your agent
Agent | Command | Enforcement |
Claude Code |
| ๐ก๏ธ Hard โ PreToolUse |
Codex |
| ๐ก๏ธ Hard โ |
Gemini CLI |
| ๐ก๏ธ Hard โ PreToolUse |
ForgeCode |
| ๐ก๏ธ Hard โ |
Cursor |
| ๐ฌ Advisory โ MCP |
Cline |
| ๐ฌ Advisory โ MCP + |
OpenCode |
| ๐ฌ Advisory โ MCP |
Any MCP agent |
| ๐ฌ Advisory โ MCP |
Amp |
| ๐ Feedback capture |
Per-agent guides: Claude/Codex bridge ยท Codex profile ยท Cursor ยท MCP setup
Install scope: machine-wide vs per-project
Scope | Command | Settings | Lessons | Best for |
Machine-wide (default) |
|
|
| Solo operators โ same machine-local feedback store across repos |
Per-project |
|
|
| Client / compliance โ separate dashboard / isolated lessons per repo |
Both scopes write mcpServers.thumbgate plus PreToolUse / UserPromptSubmit / PostToolUse / SessionStart hooks. Machine-wide is the right default for most developers. Cross-repo blocking is not automatic: a lesson learned in one project only applies elsewhere when you share the store (machine-wide) or export/import lessons.
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.
Discoverable slash-commands โ the guardrail layer for spec-driven agents
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 |
| Open local project dashboard |
| Turn last mistake into a hard prevention rule |
| List active rules & lessons |
| Gate stats + enforcement matrix |
| Branch governance + scoped approval |
| Health-check hooks, MCP, readiness |
Pricing & buyer paths
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 |
Enterprise intake path: the Workflow Hardening Sprint scopes one repeated failure before any broader rollout commitment. Start intake โ
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 ยท Team Sprint intake ยท Workflow Hardening Sprint ยท 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
How it works (short)
Capture ๐/๐ feedback (CLI, MCP, linked feedback session flow /
open_feedback_session, or ThumbGate GPT)Promote concrete lessons via history-aware lesson distillation into prevention rules
Evaluate the next proposed tool call against active rules (literal/AST + local vectors)
Allow / warn / deny before the tool runs
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.
![]()
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 โ warn; hard-block under strict
โ ๏ธ protected-branch โ warn; hard-block under strict
โ ๏ธ unresolved-threads โ warn; hard-block under strict
โ ๏ธ package-lock-reset โ warn; hard-block under strictnpx 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.jsonlTech Stack
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.
Integrations (compact)
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 | |
VS Code / Open VSX | |
Antigravity-compatible | |
JetBrains | plugins/jetbrains-plugin/README.md ยท JetBrains Marketplace path for the same runtime |
ChatGPT App / GPT Action | |
ThumbGate-Core (staging) | https://github.com/IgorGanapolsky/ThumbGate-Core โ pre-release staging + a few internal cache scripts; not the product moat |
Docs
Full index: docs/INDEX.md
Need | Link |
Agent workflow contract | |
Ready-for-agent intake | |
Verification Evidence | |
Release Confidence | |
Changeset strategy | |
First Dollar Playbook | |
Security policy | |
Threat model | |
Federal / regulated | |
Commercial Truth | |
Issues / PRs |
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).
Who builds this
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
License
MIT โ see LICENSE. Project policy: SECURITY.md ยท THREAT_MODEL.md.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -license-quality-maintenanceAn MCP server enabling AI assistants to store, retrieve, and manage contextual information across conversations with features like persistent memory, advanced search, tagging, and privacy controls.
- Flicense-qualityDmaintenanceAn MCP server that provides persistent memory for AI agents by storing session snapshots, factual memories, and conversation summaries. It enables seamless continuity between interactions by allowing agents to restore previous emotional states and recall relevant past experiences.
- Flicense-qualityDmaintenanceA MCP server that provides persistent memory for AI assistants, storing personal information, relationships, and observations to enable personalized and contextual conversations.4
- AlicenseAqualityAmaintenanceMCP server providing persistent memory and context for AI tools, including semantic memory, knowledge graph, and session history to avoid starting from scratch in every conversation.3414MIT
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/IgorGanapolsky/ThumbGate'
If you have feedback or need assistance with the MCP directory API, please join our Discord server