Verify multi-hop relational claims before an agent asserts them β zero tokens, with proof paths.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
TL;DR. LLMs hallucinate on multi-hop relational reasoning. This is a relation-algebra verifier an agent calls to check a claim before asserting it: zero model tokens, precision-guaranteed (accepts a claim iff a grounded proof path exists), language-agnostic, and provider-agnostic. Plugs in as a library, a function-calling tool, or an MCP server. Validated on real LLMs (DeepSeek et al.) and the public CLUTRR benchmark. See docs/integration.md.
π Full paper: PAPER.md Β· Integration guide: docs/integration.md Β· Try it in 30 seconds: quickstart notebook
Δα»c bαΊ±ng tiαΊΏng Viα»t: README.vi.md
LLMs are solid on one-hop facts but collapse on composition β chaining several correct facts into a multi-step conclusion. On CLUTRR (kinship reasoning), DeepSeek's accuracy falls off with depth, while a grounded operator-composition solver holds ~100% flat β at zero tokens:
(CLUTRR/v1 gen_train234_test2to10, clean-chain, n=12/hop; full test set n=635: solver
covers 99.5%, accuracy 99.2%. grounded_reasoning/experiments/clutrr_eval.py.)
Is: a guaranteed reasoning-verification layer built on relation operator algebra.
calibrate_transitivity doesn't care
whether facts came from an external KB or the model's own assertions, so it
already calibrates SGDC's real output precision with zero new code (see
self_grounded_calibration_eval.py,
PAPER.md Β§6's remark).Is not: an "unprecedented breakthrough." The Katz index, the Neumann series, graph reachability, and neuro-symbolic grounding are all classical math and technique. The contribution here is unification, a measured guarantee, and benchmark numbers β not a new primitive. The guard needs a relation graph (supplied, or extracted from LLM facts); flexibility is bounded (see PAPER Β§5).
Raised in review, reproduced, and fixed with an opt-in guard each β not swept under the rug:
"Bob" vs "bob"), the graph
treats them as two nodes and a real path silently breaks β the guard then
(correctly, per its own contract) rejects a claim that is actually true.
Fix (binary): GroundedReasoner(normalize=lambda s: s.strip().casefold())
folds surface-form variants together before they become graph keys; proofs
still display each entity's original first-seen spelling. Theorem N
characterizes exactly when this is safe: precision stays exactly 1.0 as
long as normalize never merges two genuinely distinct entities β that's
the only way it can go wrong, so it's exactly what
gr.calibrate_normalization(labeled_pairs) measures from held-out evidence,
reusing the same Clopper-Pearson machinery as Theorem M.via is transitive in reality. It guarantees
"a path exists under the closure of via," not "via actually composes in
the world." Compose a relation that's only partially/conditionally
transitive ("trusts": A trusts B, B trusts C, does not imply A trusts C)
and you get a confident, mathematically correct grounded=True that answers
a different question than the one you meant to ask. Fix (binary):
GroundedReasoner(transitive_relations={"parent", "is_a", ...}) makes the
guard raise ValueError for any undeclared relation, turning a silent
modeling assumption into an explicit, checked one. Fix (measured β Theorem
M): gr.calibrate_transitivity(rel, labeled_pairs) replaces the binary
declare-or-reject with an actual number β a Clopper-Pearson lower confidence
bound on "a graph-grounded claim for rel is really true," computed from
held-out labeled pairs. Where the binary guard can only guess or block
outright, the calibrated bound tells you how much to trust it.Both opt-in guards are off by default (identical behavior to previous
releases). Reproductions: tests/test_agent.py::TestEntityNormalization,
::TestTransitiveRelationsGuard, ::TestTransitivityCalibration,
::TestNormalizationCalibration; the A/B comparisons:
transitivity_calibration_eval.py,
normalization_calibration_eval.py.
Heterogeneous relation chains. verify(via=rel) composes ONE relation with
itself; gr.verify_path(subject, obj, via=["parent","employer"]) composes an
exact sequence of different relations (e.g. a derived "financially dependent
on" claim) β not new math (OperatorRelationAlgebra.follow already composes
mixed-relation chains exactly per Theorem G, this just exposes it at the
facade with proof-path reconstruction) β and gr.calibrate_path(via, labeled_pairs) calibrates that fixed pattern with the same Clopper-Pearson
engine as calibrate_transitivity (see PAPER.md Β§5.3.4). Checked against
independent ground-truth BFS across 8,000 triples with zero mismatches:
tests/test_agent.py::TestHeterogeneousPathVerification,
heterogeneous_path_calibration_eval.py.
| Approach | Extra tokens | Guarantee | Needs an external KB |
|---|---|---|---|
| LLM self-verification (2nd call) | +110% | none (measured 34% precision) | no |
| Self-consistency / majority vote | multiplies with sample count | none, statistical only | no |
| RAG / external KG grounding | varies | only as good as retrieval | yes |
| This guard | +0 | precision = 1.0 (Theorem G) | no |
| This guard, self-grounded (SGDC) | +0 | precision = 1.0 given sound atomic facts (Theorem I) | no |
| This guard, conformal | +0 | coverage β₯ 1βΞ±, distribution-free (Theorem K) | no |
The reasoning core rests on a single unification (numerically verified, zero error):
| View | Theorem | Content |
|---|---|---|
| Fuzzy diffusion inference | F | conf(aβb) = Ξ£ Ξ±α΅(Pα΅)[a,b], calibrated + grounded |
| Relation operator algebra | G | composition = operator product, transitive closure = Ξ£ powers |
| Spectral analysis (Katz) | H | engine.infer = resolvent (IβΞ±P)β»ΒΉβI (matches 0.0 error) |
βΉ fuzzy inference is spectral analysis of the relation operator. grounded_reasoning/reasoning/.
Six further theorems extend this core: I (two-sided precision/recall guarantee for a self-grounded, no-external-KB variant), J (closure-learning completeness, validated on CLUTRR), K (conformal reasoning β distribution-free coverage under a noisy relation graph, including one extracted by an LLM from raw text), L (Horn forward-chaining, generalizing transitive closure to conjunctive rules), M (empirical transitivity calibration β a Clopper-Pearson confidence bound replacing a blind transitivity assumption with a measured one), and N (normalization precision isolation β precision=1.0 breaks only via an over-merge, and only that is what needs calibrating). All nine are stated, proved, and numerically verified in PAPER.md.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/grounded-reasoning)<a href="https://allmcps.com/mcp/grounded-reasoning"><img src="https://allmcps.com/api/badge/grounded-reasoning?style=directory" alt="Grounded Reasoning on AllMCPs" /></a>