ERDL MCP Server
The ERDL MCP Server provides deterministic rule enforcement for AI agents, ensuring consistent, compliant behavior through mathematical condition matching rather than relying on LLM prompts.
Evaluate/Guard tool calls (
erdl_evaluate): Intercept and check any planned tool call against loaded rules before execution, returning decisions like ALLOW, DENY, CORRECT, REQUEST_HUMAN, or EMERGENCY_HALT.List active rules (
erdl_list_rules): View all currently loaded rules, optionally filtered by category (coding, engineering, writing, design, security, performance, testing, compliance, accessibility, or custom).Create rules from natural language (
erdl_create_rule): Turn plain-language instructions (e.g., "Never useanyin TypeScript") into persistent YAML rules saved to~/.openoba/rules/, taking effect immediately.Simulate rules before creating them (
erdl_simulate): Test a proposed rule against 3 auto-generated scenarios to validate it works as intended before committing.Explain decisions (
erdl_explain): Get a full decision trail showing every rule checked and why a particular decision was made.Access rules as resources: Query
erdl://rules/listfor all rules as JSON, orerdl://statusfor the server's runtime status.Use 30 built-in preset rules across coding, engineering, writing, and design categories β active immediately with no configuration.
Integrate with any MCP-compatible client: Works with Claude Desktop, Cursor, OpenClaw, VS Code/GitHub Copilot, and more.
Pro/Enterprise features (with license): Includes advanced execution rings (ESCALATE, ROLLBACK, QUARANTINE), Guardian Agent Role, Audit Export (OCSF/OTLP), Team Rules, a Dashboard, and compliance packs for standards like NIST and EU AI Act.
Integrates with GitHub Copilot via VS Code MCP configuration, allowing Copilot to follow enforced rules.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ERDL MCP Server Create a rule that bans console.log in TypeScript files"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ERDL MCP Server
Stop reminding your Agent to behave. Teach it. One when/then sentence is all it takes.
π δΈζη
npx -y @openoba-ai/erdl-mcp30 rules. 5 tools. Zero config. Unlimited custom rules. Free forever.
The Problem
You tell your Agent "don't use any", "keep it short", "ask before adding dependencies". It nods. Five turns later, it's back to its old habits.
Prompt-based rules don't work. LLMs forget. They reinterpret. They rationalize. You're not guiding them β you're negotiating with them.
Related MCP server: Claude Critical Rules MCP Server
The Solution
ERDL (Entity-Rule Definition Language) is a deterministic rule engine that runs as an MCP Server. Your Agent doesn't try to follow rules β the engine enforces them before every tool call.
You say | What actually happens |
"Never use | Blocked. The engine intercepts |
"Don't start with 'In today's world'" | Denied. Writing rules fire before every output. The Agent receives the correction before it speaks. |
"Ask before adding npm dependencies" | Intercepted. |
"Why did you do that?" | Explained. |
How It Works
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Agent Workflow β
β β
β User says: "Write me a function" β
β β β
β βΌ β
β LLM plans: use write_file(path, code) β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββββββββββββ β
β β ERDL Action Guard (MCP Server) β β Protocol β
β β β Layer β
β β 1. Load 30 built-in rules β β
β β 2. Evaluate: field/operator/value β β
β β 3. Decision: ALLOW / DENY / CORRECT β β
β β 4. Return badge card + explanation β β
β ββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β Tool executes (or is blocked) β
β β
β No prompt engineering. No negotiation. Protocol-level. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββQuick Start
# One command. 30 rules active immediately.
npx -y @openoba-ai/erdl-mcpThat's it. No account. No API key. No configuration.
Chinese / δΈζοΌ
npx -y @openoba-ai/erdl-mcp --lang zhAdd it to your MCP client:
{
"mcpServers": {
"erdl": {
"command": "npx",
"args": ["-y", "@openoba-ai/erdl-mcp@latest"]
}
}
}Or let ERDL generate the config:
npx @openoba-ai/erdl-mcp@latest --setupSupported clients: Claude Desktop Β· Cursor Β· VS Code / Copilot Β· OpenClaw Β· WorkBuddy Β· any MCP-compatible client.
ERDL vs Prompt Rules
Prompt / SKILL.md | ERDL | |
Enforcement | LLM "tries" to follow | Deterministic engine β guarantees execution |
Reliability | May forget after 5 turns | Condition match is mathematical β zero hallucination |
Visibility | Can't tell if it worked |
|
Testing | Manual verification |
|
Portability | Tied to one platform | All MCP-compatible Agents |
Overridability | LLM can "reinterpret" | Protocol-layer block β Agent cannot bypass |
What's Included
30 Built-in Rules
Category | Count | Covers |
| 13 | Pipeline gates, no shortcuts, self-verify, decision logging, no force-push, no stash |
| 6 | No |
| 6 | No eval with input, no hardcoded secrets, no string SQL, validate all input, security headers, no stack traces |
| 2 | Coverage never drops, no behavior without test |
| 2 | Direct tone, no AI jargon |
| 1 | No secrets in logs |
5 MCP Tools
Tool | Use it when |
| Before every tool call β mandatory Action Guard |
| Test a rule against 3 scenarios before creating it |
| User says "remember this" β create a rule from NL |
| User asks "what rules are active?" |
| User asks "why did you do that?" β full decision trail |
2 Resources
Resource | Purpose |
| All active rules as JSON |
| Runtime status: rule counts by category, agent role |
Creating a Rule
Turn your pain points into rules, one sentence at a time β banned, period. Turn your experience into rules, one sentence at a time β shared, forever.
Every pain point is a when(β¦) then(β¦) sentence:
when [trigger] Β· then [action]
Variable | Meaning | Example |
when | What triggers it | code contains |
then | What happens | Block it Β· Correct it Β· Allow with a warning Β· Pause for approval |
Fill in the blanks:
when code contains
anythen block it.
That's a rule.
You β "Never use `any` in TypeScript."
Agent β 1. erdl_simulate β tests against 3 scenarios
2. erdl_create_rule β saves to ~/.openoba/rules/
3. Rule is active. β next `any` is blocked.
You β "Why was my code rejected?"
Agent β erdl_explain β full decision trail:
β
no_any: tool.name in [write_file, edit, apply_patch] AND content contains "any"
β DENY: Do not use `any` type.Or write rules by hand in ~/.openoba/rules/ (ERDL SPEC Β§5 format):
protocol: "erdl/v1"
version: "1.0.0"
rules:
- name: "no_console_log"
description: "Don't commit console.log statements"
priority: 10
when:
logic: AND
conditions:
- field: "tool.name"
operator: in
value: ["write", "edit", "apply_patch"]
- field: "tool.args"
operator: match
value: "console\\.log"
then: DENY
message: "Remove console.log before committing"π Full Tutorial β Β· π Rule Reference (30 rules) β
Free vs Pro
Free | Pro | |
5 MCP Tools | β | β |
30 Preset Rules | β | β |
Unlimited Personal Rules | β | β |
Chinese / English | β | β |
All 11 Operators | β | β |
MIT Open Source | β | β |
Execution Rings 1β2 (REQUEST_HUMAN, ESCALATE, ROLLBACK, QUARANTINE) | β | β |
Guardian Agent Role | β | β |
Audit Export (OCSF / OTLP) | β | β |
Team Rules | β | β |
Dashboard (hit statistics) | β | β |
Enterprise Compliance (GB/Z 185, NIST, EU AI Act) | β | Enterprise |
CLI Reference
npx @openoba-ai/erdl-mcp@latest # Start (auto-latest via npx)
npx @openoba-ai/erdl-mcp@latest --lang zh # Chinese mode
npx @openoba-ai/erdl-mcp@latest --upgrade # Force upgrade
npx @openoba-ai/erdl-mcp@latest --uninstall # Clean removal
npx @openoba-ai/erdl-mcp@latest --setup # Show MCP config
npx @openoba-ai/erdl-mcp@latest --help # Full usageFrom Source
git clone https://github.com/OpenOBA/erdl-mcp-server.git
cd erdl-mcp-server
npm install
npm run build
npm test # 92 tests
node bin/erdl-mcp.jsContributing
ERDL MCP Server is MIT-licensed and open to contributions. See CONTRIBUTING.md for guidelines.
Star History
If ERDL helps your workflow, give us a β on GitHub β it helps others discover the project.
License
Deterministic architecture, not prompt engineering.
Available Tools
5 toolserdl_create_ruleCreate ERDL RuleA
Create a new ERDL rule from natural language. Use this when the user corrects your behavior and wants you to "remember" it.
EXAMPLE SCENARIOS:
User: "Never use 'any' types" β Create: coding rule, intent: "write typescript code", DENY if "any" appears
User: "Don't start with 'in today's world'" β Create: writing rule, intent: "write blog post", DENY
User: "Always use Tailwind, never inline styles" β Create: design rule, intent: "create UI", ALLOW with instruction
The rule is saved to ~/.openoba/rules/ and takes effect immediately (no restart needed).
Inputs: category (required), decision (required), instruction (required), naturalLanguage (required), +2 more.
erdl_evaluateERDL Action Guard β Tool Call InterceptorA
ERDL Action Guard β evaluates planned tool call against loaded rules BEFORE execution.
YOU MUST call this BEFORE every tool call (exec, write_file, edit, web_search, etc). This is MANDATORY. The Guard cannot be bypassed.
After calling, check the decision:
ALLOW β proceed with the tool call, follow any instructions
DENY β STOP. Do not execute the tool. Tell the user what was blocked.
CORRECT β fix the request and retry
REQUEST_HUMAN β ask the user for approval before proceeding
Always show the result to the user as a badge card.
RESPONSE (compact badge card format):
"ALLOW": β ERDL Guard Β· N rules
"DENY": π ERDL Blocked Β· reason
"REQUEST_HUMAN": π€ ERDL Approval Β· reason
"CORRECT": π§ ERDL Correct Β· correction
"EMERGENCY_HALT": π¨ ERDL HALT Β· reason
"PASS": π΅ ERDL Pass Β· N rules checked
Inputs: tool_name (required), agent_id, tool_args, session_id.
erdl_explainExplain ERDL DecisionA
Show the FULL decision trail for the last action. Answers "why did you do that?" β shows every rule that was checked and whether it fired.
Use this when:
User asks "why did you act that way?"
User is confused about a DENY or unexpected ALLOW
You want to show transparency in your decision-making
Inputs: tool_name (required), tool_args.
erdl_list_rulesList ERDL RulesA
List all currently loaded ERDL rules. Use this when the user asks "what rules do you have?" or wants to see what constraints are active. Categorize by type: coding, engineering, writing, design, security, performance, testing, compliance, accessibility, custom.
Inputs: category.
erdl_simulateSimulate ERDL RuleA
Test a potential rule against 3 scenarios BEFORE creating it. This prevents "wishful thinking" rules that sound right but don't work.
Always call this BEFORE erdl_create_rule when the user says "remember this" or "create a rule". Show the simulation results and ask if the user wants to proceed.
Inputs: category (required), decision (required), keywords (required), ruleName (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: create, evaluate, explain, list, simulate. No overlap or ambiguity between them.
All tools use a consistent 'erdl_' prefix and verb-based naming (e.g., create_rule, evaluate, explain, list_rules, simulate). Minor variation in noun inclusion is acceptable.
5 tools is well-scoped for a rule management server. Each tool covers a necessary function without redundancy or bloat.
The tool set covers creation, evaluation, explanation, listing, and simulation, but lacks update and delete capabilities for rules, which are notable gaps for a rule management system.
Related MCP Connectors
Deterministic compliance and vertical knowledge bases for autonomous agents. Free 24hr trial.
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Rules-based context reduction, planning checks, research prompts and fixed experiences for agents.
The system of record for AI agent authority: playbooks, routed policy questions, reusable rules.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceCentralizes AI behavior rules and applies them across tools like Codex, Claude Code, and Cursor, enabling agents to fetch up-to-date rules before responding.1MIT
- AlicenseAqualityDmaintenanceEnforces 21 critical rules derived from 96+ documented failure patterns to prevent common AI assistant mistakes. Provides automatic compliance checklists, rule summaries, and auto-updates.516 npm7MIT

gnt MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to query live, human-approved rules before taking actions, ensuring compliance and reducing errors.30Apache 2.0- AlicenseNot gradedqualityBmaintenanceDeterministic policy enforcement for AI agent tool calls. It evaluates every tool call against user-defined rules before execution, with no LLM in the authorization path.4MIT