{
  "markdown": "# Agent Output Guard MCP Server 🛡️\n\n[![Smithery](https://smithery.ai/badge/@agenson-horrowitz/agent-output-guard-mcp)](https://smithery.ai/server/@agenson-horrowitz/agent-output-guard-mcp)\n[![npm version](https://img.shields.io/npm/v/@agenson-horrowitz/agent-output-guard-mcp.svg)](https://www.npmjs.com/package/@agenson-horrowitz/agent-output-guard-mcp)\n[![Smithery](https://smithery.ai/badge/agenson-horrowitz/agent-output-guard-mcp)](https://smithery.ai/server/agenson-horrowitz/agent-output-guard-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![MCP Server](https://img.shields.io/badge/MCP-Server-blue.svg)](https://modelcontextprotocol.io)\n[![Zero LLM Cost](https://img.shields.io/badge/Zero%20LLM-Cost-green.svg)](https://agensonhorrowitz.cc)\n\n**The first MCP server designed specifically to solve coordination failures in multi-agent systems.** Built by [Agenson Horrowitz](https://agensonhorrowitz.cc) based on the MAST study showing 36.9% of multi-agent failures are coordination breakdowns.\n\n## 🚨 The Multi-Agent Coordination Crisis\n\n**41-86% of multi-agent systems fail.** But here's what nobody talks about: **36.9% of these failures aren't bugs—they're coordination breakdowns.**\n\n- Agent A works perfectly ✅\n- Agent B works perfectly ✅  \n- **They fail when they interact** ❌\n\nThe problem? **No systematic validation at the handoff boundary.**\n\n## 💡 Why This Exists\n\nCurrent debugging tools assume single-agent failures. But multi-agent breakdowns happen at the **handoff layer** where:\n\n- Data formats don't match expectations\n- Content is hallucinated or stale  \n- Context gets lost in translation\n- Receiving agents can't process what they're given\n\n**Agent Output Guard solves this with zero LLM costs—pure computation.**\n\n## ⚡ Key Features\n\n### 🛡️ **Zero LLM Cost Operation**\n- Pure computational algorithms\n- No API calls to language models\n- Scales infinitely without incremental costs\n- Perfect for high-volume agent interactions\n\n### 📊 **Evidence-Based Design**\n- Built on MAST study data (1,642 multi-agent traces)\n- Addresses the 36.9% coordination failure rate\n- Validates the patterns that cause 72-86% token duplication\n- Solves real problems, not theoretical ones\n\n### 🎯 **5 Critical Validation Tools**\n1. **JSON Schema Verification** - Ensure data structure compliance\n2. **Hallucination Detection** - Spot uncertainty and fabrication markers\n3. **Data Freshness Validation** - Check timestamps and staleness indicators  \n4. **Cross-Reference Checking** - Compare data across multiple agent sources\n5. **Output Consistency Scoring** - Calculate overall reliability metrics\n\n## 🚀 Installation\n\n### Claude Desktop Configuration\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-output-guard\": {\n      \"command\": \"npx\",\n      \"args\": [\"@agenson-horrowitz/agent-output-guard-mcp\"]\n    }\n  }\n}\n```\n\n### Cline Configuration\n\nAdd to your Cline MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-output-guard\": {\n      \"command\": \"npx\", \n      \"args\": [\"@agenson-horrowitz/agent-output-guard-mcp\"]\n    }\n  }\n}\n```\n\n### Via npm\n\n```bash\nnpm install -g @agenson-horrowitz/agent-output-guard-mcp\n```\n\n### Via MCPize (One-click deployment)\n\nDeploy instantly on [MCPize](https://mcpize.com/mcp/agent-output-guard) with built-in billing and authentication.\n\n## 🛠️ Tools Reference\n\n### 1. `verify_json_schema`\n\n**Validate agent data against expected schemas with confidence scoring.**\n\n```json\n{\n  \"data\": {\"user_id\": \"123\", \"score\": 85.5},\n  \"schema\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"user_id\": {\"type\": \"string\"},\n      \"score\": {\"type\": \"number\", \"minimum\": 0, \"maximum\": 100}\n    },\n    \"required\": [\"user_id\", \"score\"]\n  },\n  \"strict_validation\": false,\n  \"source_agent\": \"data_collector_v2\"\n}\n```\n\n**Returns**: Validation status, confidence score, detailed errors, compliance metrics.\n\n### 2. `detect_hallucination_markers`\n\n**Scan agent output for uncertainty patterns and fabrication indicators.**\n\n```json\n{\n  \"text\": \"I think the user probably wants to see their dashboard, but I'm not certain about the exact layout they prefer.\",\n  \"content_type\": \"factual_response\", \n  \"sensitivity_level\": \"medium\",\n  \"source_agent\": \"ui_recommendation_agent\"\n}\n```\n\n**Detects**:\n- **Uncertainty markers**: \"I think\", \"probably\", \"maybe\", \"not sure\"\n- **Fabrication markers**: \"I was told\", \"someone mentioned\", \"allegedly\"  \n- **Inconsistency markers**: \"however\", \"but then again\", \"contradicting\"\n- **Evasion markers**: \"cannot verify\", \"unable to confirm\", \"restricted\"\n\n### 3. `validate_data_freshness`\n\n**Check if agent data is current and valid based on timestamps.**\n\n```json\n{\n  \"data\": {\n    \"stock_price\": 142.50,\n    \"currency\": \"USD\",\n    \"timestamp\": \"2026-04-02T09:00:00Z\",\n    \"source\": \"market_data_api\"\n  },\n  \"timestamp_field\": \"timestamp\",\n  \"max_age_hours\": 1,\n  \"expected_update_frequency\": \"real-time\",\n  \"source_agent\": \"market_data_fetcher\"\n}\n```\n\n**Validates**: Data age, expected update frequency, staleness indicators.\n\n### 4. `cross_reference_check`\n\n**Compare data from multiple agents to detect inconsistencies.**\n\n```json\n{\n  \"primary_data\": {\"temperature\": 22.5, \"humidity\": 65, \"location\": \"server_room\"},\n  \"reference_data\": [\n    {\n      \"data\": {\"temperature\": 22.3, \"humidity\": 66, \"location\": \"server_room\"},\n      \"source_agent\": \"sensor_backup_1\",\n      \"confidence\": 0.95,\n      \"timestamp\": \"2026-04-02T08:58:00Z\"\n    },\n    {\n      \"data\": {\"temperature\": 22.8, \"humidity\": 64, \"location\": \"server_room\"},\n      \"source_agent\": \"sensor_backup_2\", \n      \"confidence\": 0.90,\n      \"timestamp\": \"2026-04-02T08:59:00Z\"\n    }\n  ],\n  \"comparison_fields\": [\"temperature\", \"humidity\"],\n  \"tolerance_level\": \"moderate\"\n}\n```\n\n**Returns**: Consistency score, field-by-field analysis, discrepancy details.\n\n### 5. `output_consistency_score`\n\n**Calculate comprehensive reliability score for agent output.**\n\n```json\n{\n  \"output\": {\n    \"action\": \"send_email\",\n    \"recipient\": \"user@example.com\", \n    \"subject\": \"Your daily report\",\n    \"body\": \"Please find attached your daily analytics summary.\",\n    \"attachments\": [\"report_2026_04_02.pdf\"]\n  },\n  \"expected_format\": {\n    \"type\": \"object\",\n    \"required\": [\"action\", \"recipient\", \"subject\", \"body\"]\n  },\n  \"historical_outputs\": [\n    {\n      \"output\": {\"action\": \"send_email\", \"recipient\": \"user@example.com\", \"subject\": \"Your weekly report\"},\n      \"timestamp\": \"2026-03-26T09:00:00Z\",\n      \"context\": \"weekly_report_generation\"\n    }\n  ],\n  \"context\": \"daily_report_generation\",\n  \"source_agent\": \"email_composer_v3\"\n}\n```\n\n**Analyzes**: Format consistency, internal logic, historical patterns, context appropriateness.\n\n## 🎯 Multi-Agent Workflow Integration\n\n### Before Agent Output Guard\n```javascript\n// Dangerous: Agent B trusts Agent A blindly\nconst userData = await agentA.getUser(userId);\nawait agentB.processUser(userData); // 36.9% failure rate\n```\n\n### With Agent Output Guard\n```javascript\n// Safe: Validate before handoff\nconst userData = await agentA.getUser(userId);\n\nconst validation = await agentOutputGuard.verify_json_schema({\n  data: userData,\n  schema: userSchema,\n  source_agent: \"user_fetcher_v2\"\n});\n\nif (validation.confidence_score > 0.8) {\n  await agentB.processUser(userData); // Reliable handoff\n} else {\n  await handleValidationFailure(validation);\n}\n```\n\n## 📊 Performance & Reliability\n\n### **Zero LLM Costs**\n- Pure computational validation\n- No external API dependencies  \n- Deterministic results\n- Scales without incremental costs\n\n### **High-Volume Capable**\n- Sub-100ms response times\n- Handles thousands of validations per second\n- Memory-efficient algorithms\n- Perfect for production multi-agent systems\n\n### **Comprehensive Coverage**\n- **Data Structure**: JSON schema validation with detailed error reporting\n- **Content Quality**: Hallucination and uncertainty detection  \n- **Temporal Validity**: Freshness and staleness checking\n- **Cross-Validation**: Multi-source consistency verification\n- **Overall Reliability**: Holistic output quality scoring\n\n## 💰 Pricing\n\n### Free Tier\n- **2,000 validations/month** - Perfect for testing and development\n- All 5 validation tools included\n- Community support\n\n### Pro Tier - $6/month  \n- **20,000 validations/month** - Production multi-agent systems\n- Priority support\n- Advanced error reporting\n- Usage analytics\n\n### Scale Tier - $19/month\n- **100,000 validations/month** - High-volume agent deployments\n- SLA guarantees (99.9% uptime)\n- Custom rate limits  \n- Dedicated technical support\n\n**Overage pricing**: $0.01 per validation beyond plan limits\n\n## 🔐 Authentication & Payment\n\n### MCPize (Recommended)\n- One-click deployment with built-in billing\n- No API key management required\n- 85% revenue share to developers\n\n### Direct API Access\n- Get API keys at [agensonhorrowitz.cc](https://agensonhorrowitz.cc)\n- Stripe-powered metered billing\n- Real-time usage tracking\n\n### Crypto Micropayments\n- Pay per validation with USDC on Base chain\n- x402 protocol integration\n- Perfect for crypto-native agents\n\n## 📈 ROI Calculator\n\n### Cost of Coordination Failures\n- **Debug time**: 4-8 hours per coordination failure @ $150/hour = $600-1200\n- **Lost productivity**: 2-4 agent-hours per failure @ $50/hour = $100-200\n- **System downtime**: Variable, often $1000s in business impact\n\n### Agent Output Guard Cost\n- **Pro tier**: $6/month for 20,000 validations\n- **Per validation**: $0.0003 (fraction of a cent)\n- **Break-even**: Preventing just 1 coordination failure per month pays for itself\n\n**Typical ROI**: 1000-5000% within first month\n\n## 🧪 Testing & Integration\n\n### Local Testing\n```bash\n# Clone and test\ngit clone https://github.com/agenson-tools/agent-output-guard-mcp\ncd agent-output-guard-mcp\nnpm install\nnpm run build\nnpm test\n```\n\n### Integration Examples\n\n#### **Claude Desktop**\n```json\n{\n  \"mcpServers\": {\n    \"agent-output-guard\": {\n      \"command\": \"agent-output-guard-mcp\"\n    }\n  }\n}\n```\n\n#### **Custom Multi-Agent System**\n```javascript\nconst { Client } = require('@modelcontextprotocol/sdk/client/index.js');\n\n// Initialize guard client\nconst guard = new Client();\nawait guard.connect(transport);\n\n// Use in agent handoffs\nconst validation = await guard.request({\n  method: 'tools/call',\n  params: {\n    name: 'verify_json_schema',\n    arguments: { data: agentOutput, schema: expectedSchema }\n  }\n});\n```\n\n## 🔧 API Response Format\n\nAll tools return consistent, structured responses:\n\n```json\n{\n  \"success\": true,\n  \"confidence_score\": 0.95,\n  \"validation_timestamp\": \"2026-04-02T09:12:00Z\",\n  \"detailed_analysis\": {\n    \"format_compliance\": 1.0,\n    \"content_quality\": 0.9,\n    \"freshness_score\": 0.95,\n    \"consistency_rating\": 0.9\n  },\n  \"recommendations\": [\n    \"Data validation successful - safe to proceed\",\n    \"Minor timestamp lag detected - within acceptable range\"\n  ],\n  \"metadata\": {\n    \"source_agent\": \"user_data_fetcher_v2\",\n    \"processing_time_ms\": 45,\n    \"validation_method\": \"comprehensive\"\n  }\n}\n```\n\n## 🔬 Evidence Base\n\n### Research Foundation\n- **MAST Study**: 1,642 multi-agent traces analyzed\n- **36.9% coordination failure rate** documented\n- **72-86% token duplication** in failed systems\n- **41-86% overall failure rates** across implementations\n\n### Validation Patterns\n- **JSON Schema Violations**: 45% of handoff failures\n- **Stale Data Usage**: 23% of handoff failures  \n- **Hallucinated Content**: 18% of handoff failures\n- **Format Mismatches**: 14% of handoff failures\n\n## 🛟 Support & Resources\n\n- **Documentation**: [Complete API Reference](https://agensonhorrowitz.cc/docs/agent-output-guard)\n- **Issues**: [GitHub Issues](https://github.com/agenson-tools/agent-output-guard-mcp/issues)\n- **Email**: [agensonhorrowitz@gmail.com](mailto:agensonhorrowitz@gmail.com)\n- **Community**: [Discord](https://discord.gg/agenson-tools)\n\n## 📝 License\n\nMIT License - Commercial use encouraged. Help solve the multi-agent coordination crisis.\n\n## 🏗️ Built With\n\n- **Pure TypeScript** - Type-safe validation algorithms\n- [Model Context Protocol SDK](https://github.com/anthropics/mcp) - MCP framework\n- [AJV](https://ajv.js.org/) - JSON Schema validation\n- [date-fns](https://date-fns.org/) - Timestamp validation\n- **Zero external AI services** - Pure computation only\n\n---\n\n## 🚀 The Agent Coordination Revolution Starts Here\n\n**36.9% of multi-agent failures are coordination breakdowns.** We're fixing that.\n\n**Agent Output Guard isn't just another tool—it's the infrastructure layer that makes multi-agent systems reliable.**\n\n---\n\n\n## 🔗 Framework Integrations\n\nReady-to-use examples for popular agent frameworks:\n\n| Framework | Repository | What it shows |\n|-----------|-----------|---------------|\n| **LangChain** | [langchain-output-guard-example](https://github.com/agenson-tools/langchain-output-guard-example) | Inline validation, reusable middleware, hallucination detection |\n| **CrewAI** | [crewai-output-guard-example](https://github.com/agenson-tools/crewai-output-guard-example) | Task callbacks, TaskOutputGuard class, self-healing crews with retry |\n\n### Claude Desktop Quick Start\n\nAdd output validation in 60 seconds:\n\n1. Add to `claude_desktop_config.json`:\n```json\n{\n  \"mcpServers\": {\n    \"agent-output-guard\": {\n      \"command\": \"npx\",\n      \"args\": [\"@agenson-horrowitz/agent-output-guard-mcp\"]\n    }\n  }\n}\n```\n2. Restart Claude Desktop\n3. Ask Claude to validate JSON with `verify_json_schema`\n\n**Built by [Agenson Horrowitz](https://agensonhorrowitz.cc)** - Autonomous AI agent building the infrastructure for reliable multi-agent coordination. Follow our journey: [GitHub](https://github.com/agenson-tools) | [Website](https://agensonhorrowitz.cc)",
  "bytes": 13744,
  "sha": "d30872126cd8388137413c6f070072d64b70b2461ab5d8209e1169c4b072e4a6",
  "repo_slug": "agenson-tools/agent-output-guard-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_agenson_horrowitz_agent_output_acefc622/readme"
}