Server data from the Official MCP Registry
Guardrail for AI coding agents: catches loops, regressions, and test-tampering.
Guardrail for AI coding agents: catches loops, regressions, and test-tampering.
Valid MCP server (1 strong, 2 medium validity signals). 4 known CVEs in dependencies (0 critical, 3 high severity) Package registry verified. Imported from the Official MCP Registry.
3 files analyzed · 5 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-zengxzh-buer": {
"args": [
"buer"
],
"command": "uvx"
}
}
}From the project's GitHub README.
One intent, undivided. BUER.
BUER is a local reliability and bidirectional guardrail layer for AI coding agents.
Unlike traditional LLM observability tools that monitor what the agent says (traces, tokens, prompts), BUER cold-heartedly monitors what the agent actually does to your code (AST modifications, dependency graphs, git states, and test outcomes).
BUER acts as a local structure monitor that works via a two-way loop:
Everything is 100% auto-derived. BUER reads off objective code facts from what the agent already produces (file modifications, git state, test output). The agent is never asked to declare its intent or cooperate. It works perfectly even with chaotic agents and vibe coders.
When an AI agent gets stuck or starts breaking things, traditional MLOps tools (Langfuse, Braintrust, Phoenix) only see a series of "successful 200ms LLM API responses." They are blind to the code layer.
BUER bridges this gap by operating directly on a local Directed Acyclic Graph ($\mathcal{G}_D$) maintained via tree-sitter.
| The AI Agent Blindspots | How BUER Solves It (100% Auto-Derived) |
|---|---|
| P1: Infinite Loops & Churn | stuck_region / define_loop / token_waste — detects when code state fails to structurally converge |
| P2: "Fix one, break ten" | regression — instantly links test failures back to the exact structural edits via call graph |
| P3: Cheating / Faking Success | test_tampering — escalates immediately to humans if the agent mutates test assertions to bypass failures |
| P4: Scope Drift / Running Amok | boundary_breach + task_scope_breach — rigid local guardrails |
| P5: Lost Context on Resume | BUER Recap — plain-language summary of the previous session's changes and unresolved issues |
| P6: Blind to Collateral Damage | influence cone — injects pre-edit blast radius previews into the agent's context |
| P7: Unprotected Codebase | safety-net warning / add-tests assist / commit assist — flags risk and offers concrete next steps |
Every signal above is built on an objective code-fact anchor (version chain, test outcome, file path, call graph). BUER does not infer intent and does not score the agent's output — it reports what is observably true in the code.
BUER takes its name from 不二法门 (bù èr fǎ mén), a core teaching from the Vimalakīrti Sūtra. 不二 ("not-two") represents non-duality — transcending the split of reality into opposing contradictions (broken/working, this/that). When the bodhisattvas attempt to define this non-dual gateway with words, Vimalakīrti answers with absolute silence. The truest gateway is the one that no longer divides.
BUER brings this philosophy to AI software engineering. It is grounded in Structural Determination Theory (SDT). The dependency graph BUER maintains — $\mathcal{G}_D$ — is a directed acyclic graph whose nodes are determinations (the current structural state of each definition) and whose edges map producers to consumers.
By analyzing this objective graph and its history, BUER keeps the agent anchored to a single, coherent, undivided intent instead of spinning into self-contradiction.
Reference: Zeng, Xiaozhou (2026). Structural Determination Theory: A Single-Axiom Framework for Reality, Time, Irreversibility, and Space. PhilArchive. https://philpapers.org/rec/ZENSDT
BUER runs as a local background server alongside execution environments like Claude Code. It hooks into the workflow via lightweight POST endpoints triggered after relevant agent actions:
┌──────────────────────────────┐
│ AI Agent (Claude Code) │
└──────────────┬───────────────┘
│
1. Hooks (post-edit, etc.) │ 2. Proactive Context
Triggered Automatically │ (Blast Radius, Briefings)
▼
┌──────────────────────────────┐
│ BUER Server │
│ (AST / Git / Test Monitor) │
└──────────────────────────────┘
/buer/session-start — fired upon session initialization or resumption/buer/post-edit — intercepts file deltas after an Edit, Write, or MultiEdit/buer/post-read — captures read activity to track context usage/buer/post-bash — captures terminal execution, parsing test outputs and stack traces/buer/stop — triggered when the agent concludes its turn/v1/metrics — bridges OpenTelemetry cost/token metrics (optional)When a signal fires, BUER employs a two-step escalation: it first silently nudges the agent to self-correct by injecting context. If the issue persists, it escalates to you. Integrity violations (like test_tampering or boundary breaches) bypass the nudge and escalate to you immediately.
stuck_region — agent keeps pounding the same code block without convergencedefine_loop — agent reverts a definition back to a structurally equivalent earlier statetest_tampering — agent changes assertions to pass tests rather than fixing the functional codeArchitected intentionally with three distinct channels (Alerts, Health hints, Inline assists), BUER helps shape the agent's work before mistakes happen:
structural_briefing — pre-edit context: who depends on this code, and what does it depend on?debug_range — narrows debugging down to recent changes intersecting with the crash stacksafety-net — warns the agent if it's modifying a definition with a massive blast radiusBUER features an honest, telemetry-backed financial compiler. By bridging Claude Code's OpenTelemetry metrics (which transmit raw token counts but exclude conversational content or code payloads) at /v1/metrics, BUER calculates your real expenditure against estimated intervention savings across three transparent tiers:
BUER requires Python ≥ 3.10. It parses Python, JavaScript, and TypeScript locally via embedded tree-sitter grammars — no heavy external compiler toolchains are required for its core features.
git clone https://github.com/zengxzh/buer.git
cd buer
pip install -e .
Start the monitor locally:
buer-server --host 127.0.0.1 --port 7777 --db .buer/store.sqlite
To configure your agent environment to send hooks to BUER, or to hook up systemd service persistent runtimes, see docs/SETUP.md.
.buer/ data protectionBUER stores all its state in a local .buer/ directory at your project root (a SQLite database in WAL mode). To keep this data safe, BUER automatically adds .buer/ to your project's .gitignore the first time it runs in a git repository — creating .gitignore if none exists, or appending to it otherwise (your existing entries are never modified).
BUER also monitors .gitignore: if the entry is removed or the file is deleted, BUER re-adds .buer/ on the next edit or session. This is intentional and required — without it, routine git operations would destroy BUER's data:
git clean -fd would delete the .buer/ directory entirely.git checkout / git reset --hard would roll the database back (or, with WAL files partially reverted, corrupt it) — losing all accumulated structural history.If you deliberately want to track .buer/ in git, add an explicit !.buer/ line to your .gitignore; BUER respects that and will not override it.
BUER is built for local-first, privacy-respecting development. BUER runs 100% on your local machine. It never uploads your source code, file structures, prompts, or credentials to any third-party cloud servers.
Alpha — core implementation complete (graph, signals, reconcile, assists, recap); active development and dogfooding ongoing.
This project is licensed under the Business Source License 1.1 (BSL-1.1).
See LICENSE for full terms.
Xiaozhou Zeng leozeng@gmail.com
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.