guardrail-mcp-server
v2.0.0
Published
Professional MCP server for Guardrail - Intelligent development environment guardrails
Maintainers
Readme
Guardrail MCP Server
Professional Model Context Protocol server for Guardrail AI.
"Stop shipping pretend features."
Installation
npm install -g guardrail-mcp-serverConfiguration
See MCP-INSTALLATION-GUIDE.md for editor-specific setup.
Development
cd mcp-server
npm install
npm startPremium Command Palette Tools
These tools provide a top-notch, zero-friction UX:
Ship Check Commands
run_ship- Guardrail: Ship Check (GO/NO-GO)run_reality- Guardrail: Run Reality Moderun_mockproof- Guardrail: Run MockProof Gaterun_airlock- Guardrail: Run Airlock (SupplyChain)
Report & Artifact Commands
get_last_run- Guardrail: Open Last Run Reportopen_artifact- Open Report/Replay/Trace/SARIF/Badgererun_last_check- Guardrail: Re-run Last Checkexport_sarif- Export findings as SARIF
Setup & Policy Commands
run_doctor- Guardrail: Doctor (Fix my setup)edit_policies- Guardrail: Policies (Quick Edit)get_status- Get server status and workspace infopolicy_patch- Apply atomic policy changes
Fix Mode Commands
enter_fix_mode- Enter Fix Mode for blocker resolutionfix_mode_status- Get Fix Mode checklist statusmark_fix_complete- Mark blocker as fixedexit_fix_mode- Exit and re-run ship check
Evidence & Diagnostics
explain_finding- Get detailed finding explanation
AI Guardrail Tools (Prompt Firewall + Output Verification)
These tools provide AI safety and verification capabilities:
| Tool | Description |
|------|-------------|
| guardrail.verify | 🛡️ Verify AI agent output before applying - checks secrets, dangerous commands, path traversal |
| guardrail.quality | 📊 Code quality analysis - complexity, maintainability, technical debt metrics |
| guardrail.smells | 👃 Code smell detection - anti-patterns, naming issues, structural problems |
| guardrail.hallucination | 🔍 Hallucination check - verify claims against actual source code |
| guardrail.breaking | ⚠️ Breaking change detection - API changes, removed methods, type changes |
| guardrail.mdc | 📝 MDC Generator - source-anchored documentation generation |
| guardrail.coverage | 🧪 Test coverage mapping - identify untested components |
Example Usage
// Verify AI-generated code before applying
{
"tool": "guardrail.verify",
"arguments": {
"input": "{\"format\":\"guardrail-v1\",\"diff\":\"...\",\"commands\":[]}",
"mode": "build"
}
}
// Check code quality
{
"tool": "guardrail.quality",
"arguments": {
"projectPath": ".",
"threshold": 70
}
}
// Detect code smells
{
"tool": "guardrail.smells",
"arguments": {
"projectPath": ".",
"severity": "high"
}
}Agent Checkpoint Tools
Pre-write validation that blocks AI agents until issues are fixed:
| Tool | Description |
|------|-------------|
| guardrail_checkpoint | 🛡️ Validate code before writing - blocks on TODOs, mocks, console.log, etc. |
| guardrail_set_strictness | ⚙️ Set checkpoint strictness: chill, standard, strict, paranoid |
| guardrail_checkpoint_status | 📊 Get current checkpoint status and blocking violations |
Architect Tools
AI agents consult the Architect before writing code:
| Tool | Description |
|------|-------------|
| guardrail_architect_review | 🏛️ Review code against architecture patterns |
| guardrail_architect_suggest | 💡 Get architectural guidance before writing code |
| guardrail_architect_patterns | 📋 List all active architecture patterns |
| guardrail_architect_set_strictness | ⚙️ Set architect strictness level |
Codebase Architect Tools
Deep codebase knowledge for AI agents:
| Tool | Description |
|------|-------------|
| guardrail_architect_context | 🧠 Load full codebase context (tech stack, conventions, patterns) |
| guardrail_architect_guide | 🏛️ Get guidance for creating/modifying code |
| guardrail_architect_validate | ✅ Validate code against codebase patterns |
| guardrail_architect_dependencies | 🔗 Understand file relationships and impact |
Guardrail 2.0 Tools (Consolidated)
Six core tools for the complete workflow:
| Tool | Description |
|------|-------------|
| checkpoint | 🛡️ Block AI agents until issues are fixed (pre/post write) |
| check | 🔍 Verify code is real, wired, honest |
| ship | 🚀 Go/No-Go decision (GO / WARN / NO-GO) |
| fix | 🔧 Fix blocking issues safely |
| status | 📊 Health + version info |
| set_strictness | ⚙️ Set checkpoint strictness level |
Intent Drift Guard Tools
Capture intent before writing code, monitor for drift:
| Tool | Description |
|------|-------------|
| guardrail_intent_start | 🎯 Start a new step with explicit intent |
| guardrail_intent_check | ✅ Check if code changes align with stated intent |
| guardrail_intent_validate_prompt | 🔒 Validate new prompts against locked intent |
| guardrail_intent_status | 📊 Get current Intent Drift Guard status |
| guardrail_intent_complete | ✅ Complete step and generate proof artifact |
| guardrail_intent_lock | 🔒 Lock intent to prevent scope expansion |
| guardrail_intent_unlock | 🔓 Unlock intent, allow scope changes |
Core Analysis Tools
validate_project- Validate project structure and API endpointscheck_design_system- Validate design system consistencycheck_project_drift- Check for architecture driftsetup_design_system- Set up and lock design systemregister_api_endpoint- Register API endpointget_project_health- Get project health scoreget_guardrails_rules- Get guardrails rulesarchitect_analyze- Intelligent project analysisbuild_knowledge_base- Build codebase knowledgesemantic_search- Search code by meaningsecurity_scan- Full security scanship_check- Ship readiness checkget_deploy_verdict- Get deploy GO/NO-GO decision
Resources
guardrails://rules- Guardrails rules documentguardrails://templates- Available templatesguardrails://design-tokens- Design system tokens
Documentation
See MCP-PREMIUM-TOOLS.md for detailed tool documentation.
Privacy & Trust
- Runs locally
- Artifacts saved to
.Guardrail/ - No upload unless you export/share
