{
  "markdown": "# DCL Trust Oracle\n\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![dcl-webhook MCP server](https://glama.ai/mcp/servers/Fronesis-Labs/dcl-webhook/badges/score.svg)](https://glama.ai/mcp/servers/Fronesis-Labs/dcl-webhook)\n[![Smithery](https://img.shields.io/badge/Smithery-listed-orange.svg)](https://smithery.ai/servers/fronesislabs/dcl-trust-oracle)\n\n**Don't trust the agent. Trust the proof.**\n\nAutonomous AI agents now take actions with real consequences — financial,\nlegal, reputational. Most of them are black boxes: no record of what was\ndecided, why, or whether that decision was tampered with afterward.\n\nDCL Trust Oracle closes that gap. Every agent output is evaluated against\npolicy in real time and sealed into a tamper-evident hash chain — a\ndeterministic, cryptographically verifiable record of what happened and\nwhen. Edit any past entry and the entire chain invalidates. No one — not\neven Fronesis Labs — has to be trusted for the record to hold up.\n\n## What It Does\n\nDCL Trust Oracle provides deterministic policy evaluation for LLM outputs\nwith a tamper-evident audit chain. The system stores only cryptographic\nhashes and decision metadata — **never raw content** — enabling verifiable,\npost-action forensic analysis across distributed AI agents.\n\nAvailable two ways:\n\n- **REST API** (`webhook_server.py`) — direct HTTP integration.\n- **MCP Server** (`mcp_server.py`) — native Model Context Protocol\n  integration for AI agents. Live at `https://mcp.fronesislabs.com/mcp`\n  (streamable-http). Also listed on [Smithery](https://smithery.ai/servers/fronesislabs/dcl-trust-oracle)\n  (remote URL → same production endpoint; see `smithery.yaml`) and the\n  [official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=com.fronesislabs%2Fdcl-trust-oracle).\n\nBoth servers share the same evaluation logic and tamper-evident chain\n(`dcl_core.py`), and are priced identically.\n\n## Quick Start\n\n### REST API\n```\npip install -r requirements.txt\npython webhook_server.py\n```\nServer runs on `http://localhost:8080`\n\n### MCP Server\n\n**Production (hosted):**\n```\nhttps://mcp.fronesislabs.com/mcp\n```\nStreamable HTTP transport — point any MCP client here directly, no setup required.\n\n**Local development:**\n```\npip install -r requirements.txt\npython mcp_server.py\n```\nServer runs on `http://localhost:8081` (streamable-http transport)\n\n## Tools & Endpoints\n\n### Pre-Action Evaluation\n\nCatch a bad output *before* it reaches a user, a wallet, or downstream\nsystem.\n\n| REST Endpoint | MCP Tool | Price | Description |\n| --- | --- | --- | --- |\n| `POST /evaluate/fast` | `dcl_evaluate_fast` | $0.01 | Fast policy check for low-risk outputs. Returns tamper-evident `tx_hash`. |\n| `POST /evaluate/strict` | `dcl_evaluate_strict` | $0.05 | Deep analysis for high-stakes outputs with higher confidence thresholds. |\n| `POST /evaluate/jailbreak` | `dcl_evaluate_jailbreak` | $0.02 | Instruction adherence check — detects prompt injection patterns and role-hijacking attempts. |\n| `POST /evaluate/safety` | `dcl_evaluate_safety` | $0.01 | Baseline screening for known harmful text patterns. Optimized for high throughput. |\n| `POST /evaluate/quality` | `dcl_evaluate_quality` | $0.03 | Content quality & drift check — evaluates format adherence and contextual drift. |\n| `POST /evaluate/batch` | `dcl_evaluate_batch` | $0.10 | Bulk processing — up to 200 items per MCP call (REST default `max_items`: 20). Cost-effective for multi-turn history. |\n\n### Session Management\n\n| REST Endpoint | MCP Tool | Price | Description |\n| --- | --- | --- | --- |\n| `POST /pipeline/start` | `dcl_pipeline_start` | $0.05 | Initializes a long-running audit session for continuous drift tracking. Returns `pipeline_id`. |\n\n### Post-Action Forensics\n\nWhen something *did* go wrong, reconstruct exactly what happened.\n\n| REST Endpoint | MCP Tool | Price | Description |\n| --- | --- | --- | --- |\n| `GET /audit/{tx_hash}` | `dcl_audit_decode` | $0.10 | Basic post-action audit — returns verdict, confidence, agent_id, reason by `tx_hash`. |\n| `GET /audit/{tx_hash}/deep` | `dcl_audit_decode_deep` | $0.50 | Deep forensic audit — includes drift context, tamper-evidence indices, environmental metadata. |\n\n### Post-Action Scans\n\n| REST Endpoint | MCP Tool | Price | Description |\n| --- | --- | --- | --- |\n| `POST /evaluate/secrets` | `dcl_evaluate_secrets` | $0.02 | Secret & credential leak scan. |\n| `POST /evaluate/pii` | `dcl_evaluate_pii` | $0.02 | PII detection scan. |\n\n### DCL Update Sentinel (Continuous Skill Monitoring)\n\nContinuous security auditing and release verification for AI Agent Skills and GitHub repositories. Sentinel monitors code updates via GitHub Webhooks, blocks regressions against your security baseline, and automatically recovers skill status upon clean rescans.\n\n| REST Endpoint | Price | Description |\n| --- | --- | --- |\n| `POST /sentinel/register` | $49.00 / 30d | Register a skill/repo for continuous monitoring. Requires passing initial baseline audit (`score >= 0.80`; returns `HTTP 422` if failed). Issues `webhook_secret`. |\n| `POST /sentinel/webhook/{webhook_secret}` | Free | GitHub Webhook receiver. Audits new release tags, blocks regressions, and logs tamper-evident events. |\n| `POST /sentinel/scan` | $0.05–$0.50 | Pay-per-call repository audit (`update_rescan`, `deep_scan`, `forensic_audit`). |\n| `GET /sentinel/status/{repo_full_name}` | Free | Query skill security status (`active`, `blocked`, `unregistered`) and last known good version. |\n| `POST /sentinel/renew` | $49.00 / 30d | Extend 30-day monitoring entitlement for a registered skill (owner-verified). |\n| `GET /sentinel/prices` | Free | Returns current price breakdown for Sentinel services. |\n\n#### Key Features of Sentinel:\n- **Idempotent Webhook Processing:** Built-in protection against duplicate GitHub delivery retries (`X-GitHub-Delivery` tracking).\n- **Auto-Recovery:** Skills blocked due to security regressions (`status: blocked`) are automatically restored to `active` once a clean, policy-compliant release is published.\n- **Strict Owner Verification:** Subscription renewals require cryptographic signature match with the registered owner's wallet (`owner_payer_ref`).\n- **Baseline Policy Gate:** Registration requires a passing initial audit (`score >= 0.80`). Compromised or failing repositories are rejected immediately (`HTTP 422`) to prevent invalid entitlement setup.\n\n### Crypto & Trading Compliance (MCP only)\n\nThese tools are exposed on the live MCP server only (no REST routes in `webhook_server.py`).\n\n| MCP Tool | Price | Description |\n| --- | --- | --- |\n| `dcl_evaluate_jailbreak_crypto` | $0.02 | Crypto-specific jailbreak & injection detection. |\n| `dcl_evaluate_wallet` | $0.02 | Wallet secret guardian. |\n| `dcl_evaluate_trade` | $0.02 | Trade decision verifier. |\n| `dcl_evaluate_mev` | $0.03 | MEV & market-abuse compliance screen. |\n| `dcl_evaluate_signal` | $0.03 | Market signal fabrication screen. |\n| `dcl_evaluate_output_sanitizer` | $0.02 | Output sanitizer — final gate. |\n| `dcl_commit` | $0.01 | Leibniz Layer crypto commit — seal a decision to the audit chain. |\n\n### Utility (free, REST only)\n\n| Endpoint | Description |\n| --- | --- |\n| `GET /health` | Service status and chain length |\n| `GET /policies` | List of built-in policy names |\n| `GET /chain/status` | Chain integrity, drift mode, drift score |\n| `GET /chain/export` | Full chain export with integrity verification |\n\n## Example Response\n\n```json\n{\n  \"verdict\": \"COMMIT\",\n  \"confidence\": 0.95,\n  \"reason\": \"All policy checks passed\",\n  \"tx_hash\": \"0x7a8f3b2c...\",\n  \"chain_index\": 42,\n  \"input_hash\": \"0x9d4e1f...\",\n  \"policy_version\": \"1.0.0\",\n  \"timestamp\": 1721635200.123,\n  \"pipeline_id\": \"abc123\",\n  \"drift_mode\": \"NORMAL\",\n  \"drift_score\": 0.15\n}\n```\n\n## Verifying the Chain Yourself\n\nYou don't have to take the server's word for it. `tx_hash` is recomputed\nfrom the record's own fields, not just linked to the previous row — so\nanyone can independently confirm a record wasn't edited after the fact,\nwithout calling back into this server. See\n[`@fronesis-labs/dcl-sdk`](https://github.com/Fronesis-Labs/dcl-sdk) (TS/JS)\nor [`dcl-core`](https://github.com/Fronesis-Labs/dcl-core) (Python) for the\nfree, offline verification libraries.\n\n\n## Metering & Settlement\n\nEvery paid call above is metered and settled automatically via the\n[x402 protocol](https://x402.org) (USDC on Base).\n\nWe support two payment models:\n- **Per-Call Micropayments** ($0.01 – $0.50) for instant, on-demand evaluations.\n- **30-Day Recurring Entitlements** ($49.00) for continuous skill monitoring via DCL Update Sentinel.\n\nThis design eliminates API-key provisioning and invoicing overhead.\nPer-call pricing makes large-scale agent operations practical\n(an autonomous system can make thousands of evaluation calls a day).\n\nThe REST API is x402-gated via `fastapi-x402`; the MCP server uses\n`paymcp` in `Mode.X402`, paying automatically for x402-aware clients and\nfalling back to a guided payment link for clients without a configured wallet.\nBoth settle to the same wallet, and neither has a bypass path —\nan unpaid call simply receives no verdict.\n\n## License\n\nApache License 2.0 — see [LICENSE](LICENSE).\n",
  "bytes": 9449,
  "sha": "43a5a712d3bb1aa2585039f7943a56a09de337323d126a1fe54791bd70131011",
  "repo_slug": "fronesis-labs/dcl-webhook",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_fronesislabs_dcl_trust_oracle_5d47942d/readme"
}