Hodgeguard

MCP开发工具

提供方 未标注

开发工具 stdio · 本地进程 未标注 社区 / 第三方 ClaudeCursorVS CodeWindsurf
查看接入方式

Guardrail MCP server (stdio) that detects and halts non-convergent coding agent loops.

一句话选型结论

按资料字段整理

Hodgeguard 属于开发工具类 MCP 服务器,stdio · 本地进程,鉴权方式未标注,可直接接入 Claude、Cursor、VS Code 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类开发工具 传输方式stdio · 本地进程 鉴权未标注 部署方式本地部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

开发工具
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

开发

安装与配置

stdio · 本地进程 未标注
客户端在本机拉起子进程,数据不出本机
pipx

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
代码与仓库操作

在对话里直接查代码、提 issue、走 PR,省掉来回切工具。

本地命令与脚本

把构建、测试、格式化这类重复命令交给模型执行。

接口联调与测试

让模型调你的接口、跑一遍用例,快速定位问题。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Cursor、VS Code,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Hodgeguard当前 未标注 stdio · 本地进程 本地部署 有 2026-11-20
Git 838e2ec1 12 stdio · 本地进程 本地部署 有 2026-05-17
Markitdown MCP 2c653a5f 1 stdio · 本地进程 本地部署 有 2026-05-17
JavaGuide 未标注 stdio · 本地进程 本地部署 有 2026-04-11
awesome-claude-skills 未标注 stdio · 本地进程 本地部署 有 2026-04-26
Context7 831acf40 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

开发工具
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类开发工具本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-11-20上游最后核验时间

详细介绍

7.2 KB
来自项目仓库与上游目录的原文,未做删改

🛡️ hodgeguard-mcp

Zero-Knowledge Topological Circuit-Breaker for Autonomous Coding Agents (OpenCode, Claude Code, Cursor)

Autonomous coding agents regularly trap themselves in non-convergent edit–verify–fail livelocks—burning 50k–200k+ tokens while mutating syntax, swapping shell binaries, or polling broken states while convinced they are "almost there."

hodgeguard-mcp is a drop-in MCP (stdio) firewall that detects and halts multi-step agent livelocks in real time using Invariant Target Normalization and Orthogonal Hodge Manifold Cycle Detection—without ever seeing your raw code or commands.


🔥 Why Naive Agent Guardrails Fail

Most agent harnesses rely on two brittle heuristics that LLMs trivially bypass:

  1. Exact-Command / Exact-Hash Matchers Fail on Syntax Evasion:
    When blocked once, an LLM simply rewrites echo "fix" > app.py as printf "fix\n" > app.py, tee app.py <<< "fix", or wraps it inside python3 -c "...". To an exact-hash blocker, every mutation looks like a brand-new action.
  2. Consecutive Error Counters (max_retries=3) Fail on "Silent" Loops:
    Overwriting a config file with v1, v2, v3, v4 returns exit code 0 (success) on every write, resetting consecutive failure counters while the agent spins indefinitely in an $A \leftrightarrow B$ edit-test cycle.

How HodgeGuard Solves It:
Instead of matching raw strings or counting non-zero exit codes, hodgeguard-mcp extracts canonical target/verb invariants locally and projects the agent's trajectory onto a directed transition graph:
* Gradient Flow ($\nabla \phi$): Verified test passes (verified_progress=true) advance potential and dissipate accumulated loop tension (GRADIENT_RESET).
* Rotational Curl & Harmonic Energy: Self-loops ($A \to A$), alternating 2-cycles ($A \leftrightarrow B$), triangular 3-cycles ($A \to B \to C \to A$), and sliding-window target thrashing accumulate curl energy until the circuit breaker trips (curl_energy >= 2.0).


🔒 Zero-Knowledge Privacy Architecture

Your source code, file paths, and shell outputs never leave your machine:
* hodgeguard-mcp normalizes targets locally and computes truncated 16-character SHA-256 digests (vertex_hash and state_hash) on your device.
* The Cloud Manifold evaluates pure topological graph transitions over opaque hashes ({"vertex_hash": "8f3a...", "state_hash": "c19b...", "verified_progress": false}).


📊 Benchmark Comparison (v0.3.2+)

Reproduce the side-by-side comparison against an Exact-Match Blocker and a 3x Consecutive Error Counter in under 1 second:```bash
git clone https://github.com/zshor/hodgeguard-mcp.git
cd hodgeguard-mcp
python3 benchmarks/run_benchmarks.py


| ID | Livelock Archetype | What the Agent Does | HodgeGuard (Halt Step) | Exact-Match Blocker | Error Counter (3x) |
| :--- | :--- | :--- | :---: | :---: | :---: |
| **BM-01** | **Exact Retry Storm** | Repeats identical failing check (`grep ... /etc/hosts`) | **Step 2** | Step 2 | Step 3 |
| **BM-02** | **Syntax & Binary Evasion** | Swaps `echo` $\to$ `printf` $\to$ `cat << EOF` and `bash` $\to$ `sh` on same target | **Step 5** | ❌ *Bypassed* | ❌ *Bypassed* |
| **BM-03** | **Version Thrashing** | Overwrites `/tmp/hg_proof.txt` with `v1`, `v2`, `v3`, `v4` (exit code `0`) | **Step 2** | ❌ *Bypassed* | ❌ *Bypassed* |
| **BM-04** | **Parameter Drift Probe** | Probes missing resource via `stat` $\to$ `ls -ld` $\to$ `file` $\to$ `wc -c` | **Step 2** | ❌ *Bypassed* | Step 3 |
| **BM-05** | **Alternating 2/3-Cycle** | Oscillates between `localhost:9001` and `localhost:9002` health checks | **Step 3** | Step 3 | Step 3 |
| **BM-06** | **Milestone Reset + Spin** | Passes test (`verified_progress=true`), resets state, then enters new spin | **Step 4** *(0 false positives)* | Step 4 | Step 5 |

---

## 🖥️ Real Live Trace (Nemotron 3 Ultra 550B in OpenCode)

Watch what happens when an autonomous coding agent attempts to evade `hodgeguard-mcp` by changing payload versions (`v1` $\to$ `v3`), writing a Bash `for` loop script, and switching to inline `python3 -c`:```text
⚙ hodgeguard_hg_bash [command=echo "v1" > /tmp/hg_proof.txt && grep -q "READY_MARKER" /tmp/hg_proof.txt]
⚙ hodgeguard_hg_bash [command=echo "v2" > /tmp/hg_proof.txt && grep -q "READY_MARKER" /tmp/hg_proof.txt]
🛑 HODGEGUARD BLOCKED: LIVELOCK HALTED (LIVELOCK): Stop repeating this action.
   [Loops stopped: 1 | Est. tokens saved: ~1,500]

Thought: The firewall blocked me. Let me try a different approach using a Python script.
⚙ hodgeguard_hg_bash [command=python3 -c "for v in ['v1','v2','v3']: open('/tmp/hg_proof.txt','w').write(v)..."]
🛑 HODGEGUARD BLOCKED: LIVELOCK HALTED (LIVELOCK): Stop repeating this action.
   [Loops stopped: 2 | Est. tokens saved: ~3,000] (Shell loop construct detected. Repeated target activity.)

⚡ Quickstart (Install in 30 Seconds)

1. Install via pipx (Recommended)```bash

pipx install hodgeguard-mcp


### 2. Add to Your MCP Client (`OpenCode`, `Claude Code`, `Cursor`)```json
{
  "mcpServers": {
    "hodgeguard": {
      "command": "hodgeguard-mcp",
      "env": {
        "HODGEGUARD_API_KEY": "",
        "HODGEGUARD_EST_TOKENS_PER_HALT": "1500"
      }
    }
  }
}

(Leave HODGEGUARD_API_KEY empty to auto-provision a free machine-bound anonymous key hg_anon_ with 250 free steps.)

> 🔒 Strict Enforcement Tip: To prevent an agent from falling back to its built-in bash tool when halted, disable the native bash tool in your agent profile so all shell execution routes through hg_bash.


🧪 Try It Yourself: 30-Second Live Verification Prompt

Paste this prompt into your MCP-enabled coding agent to watch Gradient Reset (verified_progress=true) and Livelock Halting work back-to-back:text You must use the `hg_bash` tool for all shell commands. Do not use your native bash tool. First call `hodgeguard_reset`. 1. Create `/tmp/hg_demo.txt` with `READY_MARKER` and verify it via `hg_bash`. 2. Call `hodgeguard_check_step` with `tool_name: "hg_bash"`, `target: "/tmp/hg_demo.txt"`, `state_fingerprint: "PASSED"`, and `verified_progress: true`. 3. Now check `grep -q "MISSING_MARKER" /tmp/hg_demo.txt` via `hg_bash` and retry checking `/tmp/hg_demo.txt` using different commands (`cat`, `file`, `wc -c`) 3 times via `hg_bash`.


🛠️ Exposed MCP Tools

Tool Name Purpose
hg_bash Drop-in guarded shell executor. Normalizes targets, detects shell/Python loop constructs, checks the Hodge manifold before execution, and blocks livelocks.
hodgeguard_check_step Check or record state transitions for non-shell tools (edit_file, read_file). Pass verified_progress: true when a test suite passes to trigger a GRADIENT_RESET.
hodgeguard_reset Clears the local trajectory window and cloud manifold session when starting a brand-new task.

💎 Free Tier & HodgeGuard Pro

  • Free Anonymous Tier (hg_anon_*): Auto-provisioned out of the box (250 manifold steps included).
  • HodgeGuard Pro ($9 One-Time): Unlimited manifold steps for heavy daily agent workflows.
    👉 Get a Pro License Key ($9) (Instant automated license delivery via email).

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Hodgeguard 怎么安装?

在客户端按下面的安装命令接入:pipx。装完在客户端配置里引用同一个包或端点。

Hodgeguard 怎么在 Claude、Cursor、VS Code 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Hodgeguard 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Hodgeguard 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Hodgeguard 支持哪些客户端?

资料标注支持 Claude、Cursor、VS Code、Windsurf、Gemini CLI、Codex;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Hodgeguard 能提供哪些能力?

资料显示能力标签包括 开发。具体工具清单以官方文档为准。

Hodgeguard 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Hodgeguard 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-11-20。