SuperAPI AI Directory

mcp-memory-gateway

Pre-action gates that prevent coding agents from repeating known mistakes by turning captured feedback and failures into rules enforced via hooks.

Open website

About this tool

Purpose

ThumbGate is a local-first Pre-Action Checks engine for AI coding agents, also known as a self-improving pre-action firewall. AI coding agents tend to repeat mistakes, and a single wrong tool call can wipe a directory, leak a secret, or push problematic code. ThumbGate runs in the PreToolUse hook, evaluating a proposed tool call before it executes, aiming to catch costly mistakes before they happen.

Key Capabilities

  • Pre-action checks: Evaluate tool calls before execution and make an allow, warn, or deny decision.
  • Feedback and lesson distillation: Capture 👍/👎 feedback and promote specific lessons into preventive rules through history-aware lesson distillation.
  • Self-improvement: Generate preventive rules from adopted feedback and repeated failures; rules can be promoted from warnings to blocking gates; no model retraining required.
  • Default hard blocks: By default, hard-block detected secret leaks and two types of direct self-disable commands—commands that terminate the ThumbGate gate process, or commands that enable its bypass environment override.
  • Other high-risk categories:rm -rf, force push, download and run, direct guardrail editing, etc. are warned and logged by default. Setting THUMBGATE_STRICT_ENFORCEMENT=1 enables strict mode, where warnings become hard denials.
  • Action evaluation and reporting:npx thumbgate eval turns adopted feedback into reusable evaluation cases and local proof reports.
  • MCP tools: Provides gate_check(read/evaluate proposed tool calls), feedback capture and session tools (write), and dashboard/stats (read).
  • Slash commands:npx thumbgate init can install related commands into the agent command palette.

Usage

  • MCP / Glama / registry install (stdio): Directories and clients that install ThumbGate as an MCP server must launch the stdio MCP, not the HTTP API. Equivalent command:npx -y thumbgate mcp. Do not use npm startfor MCP, as that launches the hosted HTTP API (src/api/server.js), not the agent-facing stdio server.
  • Initialization:npx thumbgate init。
  • GitHub Marketplace Action:uses: IgorGanapolsky/ThumbGate@v1(ThumbGate Agent Governance).
  • Workflow: Capture 👍/👎 feedback (CLI, MCP, linked feedback session flow / open_feedback_session, or ThumbGate GPT) → promote specific lessons into preventive rules through history-aware lesson distillation → evaluate the next proposed tool call with active rules (literal/AST + local vectors) → allow/warn/deny before the tool runs.
  • Install scope: Machine-wide and per-project. Both scopes write mcpServers.thumbgate as well as PreToolUse / UserPromptSubmit / PostToolUse / SessionStart hooks. Most developers are fine with the machine-wide default. Cross-repo blocking is not automatic: a lesson learned in one project applies elsewhere only if you share storage (machine-wide) or export/import lessons.
  • Pro operations: Can be invoked via MCP search_lessons, and in the CLI using npx thumbgate lessons. History-aware feedback sessions and lesson search are Pro capabilities; the free version does not include recall or search.
  • Progressive wiring: Prove the pipeline before enabling matching; an empty dashboard is success. Numbered configuration is located in config/progressive/.

Applicable Scenarios

Suitable for operator scenarios where AI coding agents may leak secrets or damage the checkout directory before a human sees the tool call, covering Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, OpenCode, and other MCP agents. It is also a guardrail layer for spec-driven agents (such as GSD, GitHub Spec Kit): located at the boundary between the plan and the generated tool calls and their execution, running in parallel with GSD / Spec Kit rather than replacing them. Suitable for the agent development loop Guide → Generate → Verify → Solve, as a pre-action gate between generated intent and executed action.

Limitations

  • ThumbGate does not update model weights, but intercepts tool calls at runtime.
  • Local-first — no cloud is required for the execution path.
  • Not a fine-tuner; unlike CLAUDE.md / .cursorrules, which are context, ThumbGate is an external allow/warn/deny layer before tools run.
  • Destructive agent operations are still blocked/warned by PreToolUse; ThumbGate will not execute user shell commands on your behalf.
  • The free version can capture 2 pieces of feedback per day (10 total), and can activate up to 3 auto-promoted prevention rules.
  • Hosted team lesson sync and hosted organization dashboards are not yet generally available.
  • Cross-repository blocking is not automatic and requires shared storage or exporting/importing lessons.

Pricing

  • Free: 2 feedback captures per day (10 total), up to 3 active auto-promoted prevention rules.
  • Pro: $19 per month or $149 per year, individual edition, unlimited rules, history-aware lessons, linked feedback session flows, personal dashboard, DPO export.
  • Enterprise: custom, scoped after intake; the Workflow Hardening Sprint defines one recurring failure before broader rollout commitments.

Other

The project uses the MIT license.