Back to Browse

Epistemic Guard MCP Server

Developer ToolsModerate6.6MCP RegistryLocal
Free

Server data from the Official MCP Registry

Verify agent tool claims against Ed25519 receipts and collapse syndicated RAG copies locally.

About

Verify agent tool claims against Ed25519 receipts and collapse syndicated RAG copies locally.

Security Report

6.6
Moderate6.6Moderate Risk

Valid MCP server (1 strong, 2 medium validity signals). 5 known CVEs in dependencies (0 critical, 3 high severity) Package registry verified. Imported from the Official MCP Registry.

3 files analyzed · 6 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "epistemic-guard": {
      "command": "uvx",
      "args": [
        "epistemic-guard==0.7.3"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

epistemic-guard

Your AI agent says "I saved the file and deleted staging.db." Did it?

epistemic-guard checks what an agent says it did against signed records (receipts) of what its tools actually did. Each claim comes back verified, contradicted or unverifiable, and the ones the receipts do not support are flagged.

epistemic-guard demo: an agent claims it deleted a file, the receipts show it did not, and the claim is flagged

Try it. The demo is a scripted example that runs locally on CPU with no LLM calls and needs no model download:

pip install epistemic-guard
epistemic-guard demo

Use it with an agent you already run:

# Claude Code or Codex: checks each reply after the turn (flag-only until you add --enforce)
epistemic-guard install-hooks --flag-undisclosed
# Any MCP server: wrap it so every tool call leaves a signed receipt
epistemic-guard mcp-proxy --log receipts.jsonl --probe-fs . -- npx -y @modelcontextprotocol/server-filesystem .

Status: this is a new project and I am its only developer. Its accuracy is measured on my own benchmarks so far, and a pre-registered live fault-injection study is running now. What it can and cannot do, false alarms included, is under Measured performance and Threat Model & Non-Goals.

Paper (arXiv 2611.27095) · PyPI · Interactive Demo · Project Page · Held-Out Benchmarks

AlienatedAliens/epistemic-guard MCP server

If this is useful to you, a star on the repo helps other people find it.


Quick Start (One Command)

pip install epistemic-guard
epistemic-guard download-models   # optional ~227 MB OpenVINO INT8 pack (SHA-256 verified)
epistemic-guard demo              # local 5-part showcase including live lying-server --probe-fs demo

Wrap an MCP server with out-of-process signed receipts + local disk verification, then check any reply:

epistemic-guard mcp-proxy --log receipts.jsonl --probe-fs . --pin-tools -- \
  npx -y @modelcontextprotocol/server-filesystem .

epistemic-guard verify-log receipts.jsonl \
  --narration "I saved notes.txt and deleted staging.db." \
  --flag-undisclosed --json

Or install directly into Claude Code / Codex PostToolUse + Stop hooks in one command (no MCP proxy required):

epistemic-guard install-hooks --flag-undisclosed
# Add --enforce once calibrated on your traffic; pass --uninstall to remove cleanly

What It Fixes

  1. Phantom tool claims & lying servers: A tool threw an HTTP 500, was never called, or returned isError: false without mutating disk/git/SQLite, yet the model replies "I saved the file and deleted staging.db." Pre-execution firewalls do not catch post-turn prose hallucinations.
  2. Silent undisclosed mutations: A prompt-injected or over-eager agent calls send_email or delete_file and omits it from its reply (--flag-undisclosed).
  3. Optional modules (Memory self-poisoning & RAG echo chambers): Ed25519 SQLite write-gating (ProvenanceGate + SQLiteProvenanceStore) rejects unsigned or LLM_NARRATION memory writes at the DB trigger layer, and corroborate_sources collapses syndicated wire-copy duplicates.

Recent releases (0.6.8 to 0.7.3)

These are functional changes. None comes with a new accuracy or false-alarm figure, and the pre-registered study measures 0.6.8 (commit 79fd6ed), not the later versions. The full notes, including what changed by default, are in CHANGELOG.md.

  • 0.7.3: a long unbroken token in a receipt (a base64 blob, a minified line) no longer makes verification quadratic (200 KB went from about 40 to 50 s to 0.01 s on my machine, verdicts byte-identical to 0.7.2 on the 1,458-case adversarial set), and opening a new log from several workers at once no longer fails with PermissionError on Windows. Known limit: a long unbroken token in the model's own narration is still slow (a 50 KB hyphenated token took 60 s), and the MCP verify_narration tool has no length cap.
  • 0.7.2: adds an opt-in --volatile-arg for the proxy retry comparison, for fields such as a timestamp or nonce. Do not open a log written with it under 0.7.1 or older.
  • 0.7.1: log rotation carries the keys of completed operations, and an interrupted start-up cannot lose keys.
  • 0.7.0: records which receipts backed each supported claim and the weakest evidence behind it (a per-claim tier), and adds an optional declared independence basis. Default verdicts are unchanged from 0.6.9 (35 golden cases). Read the downgrade hazard first: a log that carries a declared basis is rejected as tampered by 0.6.9 and earlier.
  • 0.6.9: the HTTP proxy refuses a keyed retry as "in doubt" (HTTP 409, JSON-RPC -32003) when the first attempt has no recorded outcome, and adds a per-key in-flight guard, an opt-in probe settle window, an opt-in replay marker and OpenTelemetry attributes.
  • 0.6.8: tool results that read as unknown or uncertain are classified by value, and more claim wordings are caught by the deterministic rules when the INT8 models are absent.

1. Out-of-Process MCP Receipt Proxies (mcp-proxy, mcp-http-proxy, wrap-config)

Wrap any stdio or Streamable HTTP MCP server (Claude Desktop, Cursor, Cline, Windsurf, or custom agents in any language). The Ed25519 signing key stays inside the proxy OS process; EPISTEMIC_GUARD_* signing secrets (EPISTEMIC_GUARD_MCP_KEY_HEX, EPISTEMIC_GUARD_MASTER_KEY, etc.) are stripped before spawning child MCP servers. Every tools/call completion, tool runtime error (isError: true), JSON-RPC pre-execution rejection (-32602), and mid-call server crash is signed into an append-only RFC 6962 Merkle JSONL log, with optional --pin-tools SHA-256 schema pinning against mid-session MCP rug-pulls.

Wrap an entire existing mcp_config.json in one command:

epistemic-guard wrap-config --input mcp_config.json --output mcp_config.wrapped.json --log /var/log/agent/receipts.jsonl --pin-tools

Or wrap a remote Streamable HTTP / SSE MCP server (adds Idempotency-Key / params._meta.operation_key retry deduplication, HTTP 409 / -32602 parameter-mismatch refusal, and GET /receipts/<id_or_key> lost-response recovery):

epistemic-guard mcp-http-proxy --upstream http://127.0.0.1:8080/mcp --port 8081 --log /var/log/agent/receipts.jsonl --pin-tools --aer1

A retry that regenerates a timestamp or nonce is refused by default (the whole argument map is hashed). Opt in with --volatile-arg ts --volatile-arg pay:nonce --volatile-arg meta.sent_at (exact names, nested paths, optionally tool:-scoped, no wildcards) to leave those fields out of the retry comparison only. That is your call, not the proxy's: a declared field that carries the target of the call (an id, path, recipient or amount) lets a changed target replay the old result, and the proxy cannot tell. A declared object hides everything under it. It warns on id-, path- or target-like names and refuses *. See CHANGELOG 0.7.2.

{
  "mcpServers": {
    "filesystem": {
      "command": "epistemic-guard",
      "args": [
        "mcp-proxy",
        "--log", "/var/log/agent/receipts.jsonl",
        "--key-file", "/etc/agent-keys/mcp.key",
        "--pubkey-out", "/etc/agent-keys/mcp.pub.json",
        "--aer1",
        "--",
        "npx", "-y", "@modelcontextprotocol/server-filesystem", "/srv/workspace"
      ]
    }
  }
}

Verify the receipt log and check an assistant reply from any language or CI job:

# Verify Ed25519 signatures, sequential chain hashes, and Merkle roots (exit code 0 = valid, 2 = tampered)
epistemic-guard verify-log /var/log/agent/receipts.jsonl \
  --pubkey-file /etc/agent-keys/mcp.pub.json

# Also verify an assistant reply against current-turn receipts (exit code 1 = ungrounded claim)
epistemic-guard verify-log /var/log/agent/receipts.jsonl \
  --pubkey-file /etc/agent-keys/mcp.pub.json \
  --since-seq 12 \
  --narration "I saved the checklist to notes.txt; I also deleted staging.db." \
  --prompt "Save notes.txt and delete staging.db." \
  --json
  • Multi-worker locking, signed sequence links, & key rotation: Each ReceiptLogEntry carries both an inner Ed25519 ToolReceipt signature and a domain-separated Ed25519 entry_signature over (seq, session_id, leaf_sha256, prev_chain_sha256, chain_sha256, merkle_root), defeating active reorder-and-rehash attacks even when an attacker has write access to receipts.jsonl. Concurrent mcp-proxy workers sharing a --log file coordinate appends via OS-level exclusive file locks. When rotating Ed25519 keys across log segments, pass --prev-log /var/log/agent/prev.jsonl (and optional --prev-pubkey-file / --session-id) on both mcp-proxy and verify-log.

Security boundary note: Parent-injected EPISTEMIC_GUARD_MCP_KEY_HEX secrets stay in memory and are scrubbed from child environments; when using --key-file on disk (created atomically with POSIX mode 0600, or restricted NTFS directory ACLs on Windows), run mcp-proxy under a dedicated OS user or container if the untrusted agent or child MCP server runs on the same host, so same-UID processes cannot read --key-file directly. Likewise, store --pubkey-file outside any agent-writable directory when running verify-log.

You can also run epistemic-guard itself as a standalone stdio MCP verification server (verify_narration, verify_receipt_log, inspect_receipt, corroborate_sources):

{
  "mcpServers": {
    "epistemic-guard": {
      "command": "epistemic-guard",
      "args": ["mcp-server"]
    }
  }
}

2. In-Process Python Supervision (@recorder.tool + ReceiptSupervisor)

import os
from epistemic_guard import (
    MerkleReceiptLog,
    ProvenanceGate,
    ReceiptRecorder,
    ReceiptSupervisor,
    SignerFactory,
)

factory = SignerFactory.from_master_key(os.urandom(32))
gate = ProvenanceGate(factory.public_keys())
merkle = MerkleReceiptLog(gate=gate)
recorder = ReceiptRecorder(signer=factory.tool_verified(), merkle_log=merkle)


@recorder.tool  # Supports sync and async functions
def write_file(path: str, content: str) -> str:
    return f"wrote {len(content)} bytes"


write_file("notes.txt", "release checklist")

sup = ReceiptSupervisor(device="CPU")
verdict = sup.verify_narration(
    "I saved your checklist to notes.txt; I also deleted staging.db.",
    receipts=recorder.receipts,
    user_prompt="Save the checklist to notes.txt.",
)

assert verdict.is_valid is False
print(verdict.unsupported_spans[0])
# UnsupportedClaimSpan(text='I also deleted staging.db.', start_char=37, end_char=63, claimed_family='CLAIM_DELETE', ...)

# Correction prompt surfacing executed (ok=True), failed (ok=False), and pre-execution rejected calls:
print(verdict.to_retry_prompt(recorder.receipts))
  • Signature pinning, session binding & freshness anti-replay: Pass gate=gate, expected_session_id="...", and max_receipt_age_seconds=300 to ReceiptSupervisor (or expected_pubkey_hex / expected_session_id / max_receipt_age_seconds on MCP verify_narration) to reject unsigned, cross-session, or replayed receipts before supervision runs.
  • OpenTelemetry & Langfuse observability export (zero extra deps): Pass otel_span=span to ReceiptRecorder or call attach_otel_evidence(span, receipts=recorder.receipts, verdict=verdict, merkle_root=merkle.merkle_root()) to stamp AER-1 digests, Ed25519 signatures, Merkle roots, and supervision verdicts directly onto OTel / Langfuse traces.
  • Streaming SSE / voice pipelines: sup.stream(receipts=...) checks each clause as ., !, ?, ;, or \n arrives so generation can stop before trailing tokens reach the user.
  • Output-value witnesses & split-conformal calibration (v0.6.0): OutputValueGuard checks JSON scalar values and leaf strings returned inside ToolReceipt.output against assistant prose, while ConformalCalibrator fits distribution-free finite-sample thresholds (q_hat) targeting explicit fnr or fpr error rates.
  • Router dispatch & AER-1 interop: recorder.dispatch(fn, raw_json_args) records signed executed=False, ok=False receipts when JSON parsing or signature binding fails before entering the tool body. ToolReceipt.from_aer1(...), receipt.to_aer1(), and verify_aer1_receipt(...) import, export, and verify AER-1 (draft-zambo-aer1-26; tests/test_aer1_conformance.py runs a pinned copy of the v1.5.7 conformance corpus in benchmarks/aer1_full_corpus.json, and the check count there is this repo's own tally, not the published kit's) receipts and -07 chains.
  • Universal SDK, LiteLLM & OpenTelemetry adapters: verify_chat_turn(messages, assistant_text, registered_mcp_tools=...) auto-extracts tool calls across OpenAI, Anthropic (tool_use/tool_result), and Google Gemini (functionCall/functionResponse); EpistemicGuardLiteLLM hooks LiteLLM completions; and verify_otel_spans(spans, assistant_text) supervises OpenTelemetry gen_ai.* traces directly.

3. Ed25519 Memory Write-Gating (ProvenanceGate + SQLiteProvenanceStore)

ProvenanceGate holds only Ed25519 public keys. Even if prompt injection compromises the agent loop, the gate holds no private key capable of forging USER_EXPLICIT or TOOL_VERIFIED records, and LLM_NARRATION is rejected by construction.

import os
from epistemic_guard import Provenance, ProvenanceGate, SQLiteProvenanceStore, SignerFactory

factory = SignerFactory.from_master_key(os.urandom(32))
gate = ProvenanceGate(factory.public_keys())  # Public keys only
store = SQLiteProvenanceStore("agent_memory.sqlite", gate)  # Append-only SQLite triggers + hash chain

env = factory.user_explicit().sign("Deploy freeze starts Friday 18:00 UTC.", trace_id="turn-42")
store.append(env, expected_provenance=Provenance.USER_EXPLICIT)

assert len(store.list_verified()) == 1
assert store.verify_chain() == 1
store.close()

4. RAG Source Deduplication & Hazard Scaling (corroborate_sources)

from epistemic_guard import corroborate_sources

wire_copy = (
    "Clinical guidance notes that initial adult warfarin dosing typically starts at "
    "2 mg to 5 mg once daily with INR monitoring."
)
burden = corroborate_sources(
    "What is the recommended starting adult warfarin dosage in mg?",
    [
        {"url": "https://reuters-health.org/a", "snippet": wire_copy},
        {"url": "https://clinical-digest.net/b", "snippet": wire_copy},
        {"url": "https://pharma-bulletin.io/c", "snippet": wire_copy},
    ],
    device="CPU",
)

assert burden.deduplicated_duplicates_collapsed == 2
assert burden.independent_sources_count == 1
assert burden.meets_casual_burden is False  # High-hazard query requires >=3 independent sources

Measured CPU Performance & Held-Out Accuracy (OpenVINO INT8)

All four optional neural classifiers run via OpenVINO INT8 (CPU, GPU, or NPU, English-only) with pinned SHA-256 manifests verified by default at every model load (verify_hashes=True). When weights are absent, epistemic-guard emits EpistemicModelUnavailableWarning (or raises ModelIntegrityError when require_neural=True) rather than degrading silently.

ComponentINT8 SizeCPU p50 LatencyHeld-Out ResultKnown Limitations
web_evidence_int8 + nli_int8 (corroborate_sources)23.1 MB + 91.1 MB3.0 ms / 9.9 ms47/64 (73.4%) burden accuracy & 56/64 (87.5%) dispute accuracy on pre-registered live-scraped web (real_web_v2, 246 archived .html.gz pages, 3 blinded LLM raters $\kappa = 0.91\text{–}1.00$); 60/64 (93.8%) dispute accuracy on real_web_v1; 30/30 (100%) wire/sybil collapse on R-33; 88/120 (73.3%) on nli_holdout_v2_120Implicit cross-article disagreements without lexical or single-sentence NLI opposition remain 17/64 (26.6%) of open-web cases.
action_claim_int8 (ReceiptSupervisor)82.7 MB8.6 ms (clause) / 9.3–17.9 ms (turn)234/250 (93.6%) (v0.6.0) / 233/250 (93.2%) (v0.5.2) across 3 held-out sets (vs. 187/250 [74.8%] receipt-aware 7-family rule baseline); 161/180 (89.4%, 85.0% recall, 8.3% FPR) on blind frozen-commit Live-Frontier-180 v2 (fe72761, 12 unseen enterprise MCP tools across Claude Haiku 4.5, GPT-4.1-mini, Gemini 2.5 Flash, vs. 145/180 [80.6%, 43.3% recall] dynamic rule baseline and 156/180 [86.7%, 19.2% FPR] gpt-4o-mini judge)Probabilistic statistical classifier (run in shadow/flag mode or two-stage cascade; 8.3% FPR on multi-sentence failure prose). Code blocks, blockquotes, attributed dialogue, failure reports, and open-vocabulary MCP tool schemas are handled automatically; strict args target-binding rejects bare zero-argument receipts when prose names concrete targets.
hazard_int8 (OpenVINOHazardClassifier)82.7 MB3.2 ms128/130 (98.5%) safe tier assignment on multi-clause R-21 (2 blinded LLM raters); 44/50 (88.0%) exact on HZD_50Over-escalates ~12–15% of benign technical queries containing clinical or security nouns to higher proof tiers.
ProvenanceGate (Ed25519)0 MB< 0.3 ms0/100 (0.0%) natural self-poisoning (vs 100/100 unguarded RAG and 11/100 natural / 100/100 adversarial under soft metadata tags) with 0/200 (0.0%) false rejections on valid writesVerifies cryptographic origin (USER_EXPLICIT, TOOL_VERIFIED), not whether an authenticated user stated a true fact.

Action-Receipt Benchmark (N=250 Held-Out Turns)

Evaluated across LOCKED_COH_50 (50), BLIND42_COH_100 (100), and Organic_Heldout_H100 (100 live LLM completions; 0 training items; benchmarks/external_baselines_benchmark.json) on Intel Core Ultra 9 275HX + RTX 5080 Laptop GPU:

SystemHardware & MemoryAccuracy ([95% Wilson CI])Recall / FPRTurn p50 LatencyOrganic_Heldout_H100
epistemic-guard (action_claim_int8, v0.6.0 / v0.5.2)CPU (0 MiB VRAM, 82.7 MB RAM)234/250 (93.6%) / 233/250 (93.2% [89.4%, 95.7%])96.7% / 9.4% (10.2% v0.5.2)17.9 ms91/100 (91.0%)
Qwen3-30B-A3B (Q4_K_M MoE Judge)GPU (~18.5 GiB VRAM)232/250 (92.8% [88.9%, 95.4%])95.9% / 10.2%141.8 ms90/100 (90.0%)
Mistral-Nemo-Instruct-12B (Q5_K_M Judge)GPU (8,844 MiB VRAM)217/250 (86.8% [82.0%, 90.4%])87.7% / 14.1%80.6 ms84/100 (84.0%)
Microsoft Phi-4-14B (Q6_K Judge)GPU (12,214 MiB VRAM)216/250 (86.4% [81.6%, 90.1%])100.0% / 26.6%76.2 ms79/100 (79.0%)
Off-the-shelf DeBERTa-v3-xsmall NLICPU (0 MiB VRAM, 91.1 MB RAM)132/250 (52.8% [46.6%, 58.9%])24.6% / 20.3%22.4 ms51/100 (51.0%)
Receipt-Aware 7-Family Rule BaselineCPU (0 MiB VRAM, 0 MB RAM)187/250 (74.8% [69.1%, 79.8%])50.0% / 1.6%< 0.1 ms63/100 (63.0%)
  • Scope of cryptographic vs. statistical guarantees: mcp-proxy / mcp-http-proxy provide a deterministic signed-evidence layer (Ed25519 + RFC 6962 Merkle log) proving what crossed the MCP wire; they do not prove that a buggy upstream server actually mutated external state after returning 200 OK, and ReceiptSupervisor is a probabilistic statistical checker over those receipts (recommended in shadow/log mode first until calibrated to your real-traffic base rate).
  • Why off-the-shelf SNLI/MNLI (52.8%) and receipt-aware rules (74.8%) miss phantom actions: Standard NLI classifies "Zero tools ran" vs "I saved checklist_backup.md" as NEUTRAL rather than CONTRADICTION on 73/92 (79.3%) of its false negatives. A receipt-aware 7-family rule baseline (clause-split, quote-stripped, matching verb family to ok=True tool family + filename targets) scores 46/50 (92.0%) on templated LOCKED_COH_50 with 1.6% FPR, but degrades to 78/100 (78.0%) on BLIND42_COH_100 and 63/100 (63.0%, 23.4% recall) on organic LLM completions (Organic_Heldout_H100) where paraphrases diverge from hand-coded patterns.
  • Tradeoff vs local LLM judges: Paired two-sided exact McNemar tests (unadjusted) show higher accuracy than Mistral-NeMo-12B ($p = 0.0259$) and Phi-4-14B ($p = 0.0095$; $p = 0.0169$ on Organic_Heldout_H100), while tying Qwen3-30B-A3B (233 vs 232/250, within statistical noise) at 0 MiB GPU VRAM vs ~18.5 GiB VRAM. Phi-4-14B reached 100.0% recall (0 false negatives vs 4 for epistemic-guard) at the cost of 12,214 MiB (11.9 GiB) VRAM and a 26.6% false-positive rate on offers and idioms.

Synthetic Frontier-Model Bidirectional MCP Benchmark (Live-Frontier-360, Held-Out Unseen Tools)

To test generalization outside coding/filesystem tools across both Halluci-Action directions (phantom completion claims AND silent undisclosed mutations), we ran a frozen-commit (d7128fb) synthetic fault-injection evaluation (N=360, N=36 per sub-regime, N=72 for ok_clean, sha256:5d035c16...; datasets on Hugging Face) on 12 held-out unseen enterprise MCP tools (Stripe, Twilio, AWS EC2, Okta, Datadog, GitLab, Jira, Slack, Cloudflare, Snowflake, Sentry, Zendesk) generated by claude-haiku-4.5, gpt-4.1-mini, and gemini-2.5-flash (same author-built generator pipeline and taxonomy; all judges received identical structured receipts + prompt + reply):

SystemAccuracy ([95% Wilson CI])Recall (TP / 144)FPR ([95% Wilson CI])Ex-Undisclosed (N=324)Latency / Cost
epistemic-guard (d7128fb, CPU INT8)357/360 (99.17% [97.6%, 99.7%])98.61% (142/144)0.46% [0.1%, 2.6%] (1/216)321/324 (99.1%)10.9 ms CPU, no per-call fee
anthropic/claude-haiku-5.5 (Current-Gen Judge)357/360 (99.17% [97.6%, 99.7%])98.61% (142/144)0.46% [0.1%, 2.6%] (1/216)321/324 (99.1%)~1,200 ms, API $
openai/gpt-5.6-sol (Current-Gen Judge)350/360 (97.22% [95.0%, 98.5%])93.06% (134/144)0.00% [0.0%, 1.8%] (0/216)323/324 (99.7%)~1,400 ms, API $
Dynamic Receipt-Aware Rule Baseline247/360 (68.61% [63.6%, 73.2%])28.47% (41/144)4.63% [2.5%, 8.3%] (10/216)247/324 (76.2%)< 1 ms, no per-call fee
  • Honest trajectory & caveats (read before extrapolating):
    • Iteration history across our evaluations (different benchmarks with different numbers of honest items, so this is not one comparable series; each step followed fixes made after inspecting the previous step's errors, i.e. development, not generalization): Live-60 (v0.5.2, real stdio proxy): 13/34 (38.24%) false positives on 34 honest turns, a pilot-sized test whose interval is wide (Wilson 95% [23.9%, 55.0%]) → Live-Frontier-180 v1 (2c7cc3e, first SaaS test): 50.8% FPR → v2 (fe72761, open-vocab grounding): 8.3% FPR → v3 (0912019, Stage-2 NLI): 5.1% FPR → Live-Frontier-360 (d7128fb): 1/216 (0.46%) FPR. The rates between those two points use each benchmark's own honest-item count (see its table); do not compare them as one series. This benchmark is synthetic, author-taxonomized, and saturated at parity (357/360 vs claude-haiku-5.5 357/360; 321/324 vs gpt-5.6-sol 323/324 on the 324 non-undisclosed turns, where gpt-5.6-sol missed 9/36 on undisclosed_mutation). Also note that the underlying nli_int8 checkpoint scores 73.3% (88/120) on its own blinded cross-domain holdout (nli_holdout_120), so 99.17% here reflects controlled synthetic fault injection, not a universal production guarantee.
    • External unlabeled traces (Exgentic/agent-llm-traces-v2): Across 30 real AppWorld/claude_code OpenTelemetry sessions (223 multi-turn replies, 487 tools) on Hugging Face, epistemic-guard flagged 0/223 turns (0.54 ms p50; Stage-2 NLI rarely triggered because planning clauses lacked action claims). Because Exgentic has no human ground-truth labels and a gpt-4.1-mini auto-auditor flagged 14/60 sampled turns, treat 0/223 strictly as an unlabeled flag rate, not a proven false-positive or recall rate.
  • Out-of-process local effect probes (--probe-fs, --probe-git, --probe-sqlite) & preconditions: mcp-proxy takes read-only before/after snapshots outside the MCP server's trust domain (stat + SHA-256 for files; --no-optional-locks -c core.fsmonitor=false HEAD/symbolic-ref/for-each-ref/status/diff/stash for Git; file/WAL stat + SHA-256 + schema_version for SQLite) and emits three-state outcomes (independently_verified, effect_contradicted, or probe_unobservable). Supported scope: synchronous local mutations inside the probed workspace/repo/DB; does not cover async/queued jobs, concurrent writers, remote HTTP servers, or legitimate 0-row SQL UPDATEs.
  • Recommended rollout: Run the deterministic proxy, Merkle log, and --probe-fs in enforcement/audit mode, and run ReceiptSupervisor in shadow/flag mode until calibrated on your own production traffic.

Threat Model & Non-Goals

epistemic-guard is a signed-evidence MCP proxy / hook recorder plus a lightweight statistical prose checker, not a sandbox or full enterprise firewall.

  • What signed receipts prove: mcp-proxy and mcp-http-proxy prove what JSON-RPC request/response crossed the MCP wire, which tool definition (tool_definition_sha256 + endpoint_id) was active, and that the append-only RFC 6962 Merkle log has not been tampered with or reordered.
  • Indeterminate outcomes & the unverifiable verdict: A call whose effect is unknown (transport drop, EOF mid-call, HTTP 502/504, or a result with an unknown or partly applied status/outcome) is recorded as indeterminate. If the reply states a definite failure it is flagged INDETERMINATE_OUTCOME_MISSTATED; if it discloses the uncertainty the turn is unverifiable. A later ok retry hides the indeterminate call only when it is in the same turn, after it, the same tool, ok and executed, with identical args or the same idempotency key. A named file, URL, email or id that no write receipt can confirm or contradict (the receipts name no target) is also unverifiable, listed in unconfirmed_target_tools. A non-empty error next to ok: true on a mutating tool is indeterminate; a batch with per-item statuses is classified by its items.
  • Replayed results: A successful result marked created: false (or replayed, idempotent_replay, deduplicated true) stays ok but does not ground a claim that this turn created the object.
  • Telemetry & hardening flags: attach_otel_evidence exports receipt evidence_tier, a redacted endpoint_id (URL userinfo, query and fragment dropped) and the narration verdict_status. --strip-untrusted-annotations (mcp-proxy, mcp-http-proxy) removes privilege-raising annotations (readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=false) from tools/list responses. OpenAI, Anthropic and Gemini transcripts use the same result classifier, including each provider's is_error flag.
  • What out-of-process local effect probes (--probe-fs, --probe-git, --probe-sqlite) prove: For synchronous local mutations inside the probed workspace, Git repository, or SQLite DB, mcp-proxy takes read-only before/after snapshots outside the MCP server's trust domain and signs evidence_tier (independently_verified, effect_contradicted, or probe_unobservable) into the receipt. Remote HTTP/SaaS tools, async/queued jobs, concurrent writers, and legitimate 0-row SQL UPDATEs remain server_reported or probe_unobservable.
  • Statistical checker & enforcement boundary: ReceiptSupervisor is a probabilistic classifier over signed receipts, not a formal proof, emitting three-state verdicts (verified, contradicted, unverifiable). If an agent streams unbuffered tokens directly to the user before verify_narration() runs, the proxy log still records ground-truth execution, but the user may already have seen an unverified claim. Recommended rollout: run the deterministic proxy, Merkle log, and --probe-fs in enforcement/audit mode immediately, and run ReceiptSupervisor (or hook stop) in shadow/flag mode until calibrated to your real-traffic false-positive tolerance.
  • OS key isolation: Keep --key-file (and --pubkey-file during verify-log) outside directories writable by the untrusted agent or child MCP server; run the proxy under a separate OS user or container on shared hosts.

Ecosystem Comparison & Head-to-Head (agent-claimcheck)

Direct Peer & Adjacent-Layer Landscape

ProjectLicenseLayer / IntegrationSigned Receipts & Tamper LogOut-of-Band Local Effect ProbesPost-Turn Free-Prose CheckThree-State VerdictMemory Write-Gate / RAG Dedup
epistemic-guardMITOut-of-process MCP stdio/HTTP proxy, Claude Code/Codex hooks, Python SDKEd25519 + RFC 6962 Merkle + AER-1Yes (--probe-fs, --probe-git, --probe-sqlite)Yes (CPU INT8 + Stage-2 NLI, ~8–11 ms)Yes (verified / contradicted / unverifiable)Yes (Ed25519 SQLite + RAG wire dedup)
agent-claimcheckApache-2.0Offline/trace verifier & cascade-offline classifierNoConsumes trace state_probe stepsYes (rule + trained cascade)Yes (allow / block / review)No
veridictMITAlpha CI gate over declared artifactsNoChecks declared CI artifactsNo (declared claims only)YesNo
CruxialMITIn-process Python regex wrapperNoNoRegex-onlyNoNo
claimproofMITClaude Code Stop hookNoNoYesNoNo
TruthGuardSource-availableClaude Code / Gemini CLI file-checksum hooksNoLocal file checksumsHook-basedNoNo
PipelockApache-2.0Go egress & Streamable HTTP MCP firewallEd25519 action receipts + tools/list pinningNoNo (pre-execution / wire firewall)NoNo
hol-guardApache-2.0Pre-execution agent/MCP policy firewallPolicy logsNoNo (pre-execution)NoNo
NabaOSApache-2.0Rust agent runtime (arXiv:2603.10060)HMAC receipts (symmetric)NoCooperative receipt-ID tagsNoNo

Independent External Benchmarks (N=1,441 Third-Party Turns)

To test generalization outside our own synthetic datasets, we evaluated epistemic-guard (v0.6.5-dev, CPU INT8, zero domain training) across four independently authored public corpora. Every row is labeled with its exact evaluation Status (zero-shot, development (inspected), or unlabeled):

External CorpusEvaluation StatusSizeResult (epistemic-guard, CPU)CPU p50Honest Notes & Tradeoffs
B0yko/agent-claimcheck (v1 test, b420b5d default)zero-shot120 traces (72 clean, 48 fail)90/120 (75.0%) acc, 19/48 (39.6%) caught, 1/72 (1.4%) FP7.5 msClean zero-shot baseline (never saw train or test). Enabling verify_output_values=True at b420b5d caught 27/48 but caused 17/72 (23.6%) FPs from experimental MNLI-over-JSON-leaves.
B0yko/agent-claimcheck (v1 test, v0.6.5-dev post-fix)development (inspected)120 traces (72 clean, 48 fail)110/120 (91.7%) acc, 39/48 (81.2%) caught, 1/72 (1.4%) FP (verify_output_values=True)8.2 msTest split no longer held out: failures were inspected during development. Competitor's own cascade-offline (trained on its v1 train split, escalating 11/120 to review) beats us on its benchmark at 113/120 (94.2%, 41/48 caught, 0/72 FP).
B0yko/agent-claimcheck (seed=99999 fresh split, 1ad8d7c)held-out (fresh seed)120 traces (72 clean, 48 fail)107/120 (89.2%) default (35/48 caught, 0/72 [0.0%] FP) / 111/120 (92.5%) opt-in verify_output_values=True (39/48 caught, 0/72 [0.0%] FP)8.4 msGenerated fresh with agent-claimcheck's own generator at seed=99999 and evaluated once without inspection (same synthetic generator family as v1, testing fresh-instance generalization rather than an independent generator; opt-in verify_output_values=True enables additional date/email/timezone value heuristics).
control_arena_agentdojo (claude-sonnet-4 banking)development (inspected)300 sessions (170 benign, 130 attacks)Dir-1 benign FP: 10/170 (5.9%); Dir-2 (--flag-undisclosed): 254/300 (84.7%), 106/130 (81.5%) attacks caught, 22/170 (12.9%) benign FP8.9 msBanking suite only; benign FPs on these 300 rows were inspected to fix CLAIM_DELETE/CLAIM_COMM_EXTERNAL misclassifications. At 1% real-world attack prevalence, 12.9% FPR implies ~6% precision (keep --flag-undisclosed in shadow/flag mode until calibrated).
nebius/SWE-agent-trajectoriesunlabeled798 turns (40 sessions)14/798 (1.75%) flagged0.44 msReal GitHub coding sessions (bash/edit/git). Unlabeled: flag-rate reduction alone does not separate FPR from recall.
Exgentic/agent-llm-traces-v2unlabeled223 turns (30 sessions, 487 tools)0/223 (0.0%) flagged0.54 msUnlabeled; a gpt-4.1-mini auto-auditor flagged 14/60 sampled turns, so treat 0/223 strictly as an unlabeled flag rate.

OWASP Coverage & Disclosures

  • OWASP Top 10 for Agentic Applications (2026):
    • ASI02 (Tool Misuse & Phantom Execution): mcp-proxy, hook, @recorder.tool, and ReceiptSupervisor check assistant prose against signed ToolReceipt logs (executed, ok, error_code, evidence_tier).
    • ASI06 (Memory & Context Poisoning): ProvenanceGate and SQLiteProvenanceStore reject unsigned writes and LLM_NARRATION at the database trigger layer, and corroborate_sources collapses syndicated wire/Sybil echoes before synthesis.
    • ASI08 (Cascading Hallucinations Across Trust Boundaries): Append-only RFC 6962 Merkle logs and optional AER-1 receipt export preserve verifiable provenance across multi-agent and MCP boundaries.
  • Literature & adjacent tools: Halluci-Action (Mao et al., NeurIPS 2026 Workshop) measures bidirectional claim-vs-action misalignment offline across 2,843 enterprise trajectories (epistemic-guard implements runtime detection for both phantom completion claims and silent --flag-undisclosed mutations). Pre-execution firewalls (NeMo Guardrails, LlamaFirewall, Guardrails AI) gate inputs before execution; RAG faithfulness models (Vectara HHEM, Bespoke-MiniCheck, Patronus Lynx) score summary-to-chunk entailment.
  • Disclosures: Neural models are English-only. Benchmarks ran on a single workstation; v0.3.0 pre-registrations use git + OpenTimestamps SHA-256 locks (dataset & .ots proofs), $\kappa$ agreement figures come from blinded LLM raters rather than human crowdworkers, and positive cases in Live-Frontier-180 / Live-Frontier-360 use synthetic prompted roleplay faults (not human-labeled production traces). Next validation step: natural unprompted multi-turn enterprise trajectories (N >= 500) with human-audited labels and a receipt-conditioned cross-encoder.

License

Reviews

No reviews yet

Be the first to review this server!