Deterministic multi-hop graph retrieval for RAG. Zero LLM calls in the query path.
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 into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Centrality-aware GraphRAG retrieval planner. Drop-in layer over any vector DB.
hubmesh is a Python library that improves multi-hop RAG quality on top of an existing
vector database. You don't replace your infrastructure โ you add a smart planner between
your vector DB and your LLM.
Naive vector retrieval ("embed query, get top-k by cosine similarity") fails on multi-hop questions like "Where was the founder of the company that acquired Slack born?" The correct answer requires retrieving entities along a reasoning path, not the single most similar item.
GraphRAG and HippoRAG showed that running a small Personalized PageRank over a knowledge
graph at query time can substantially improve multi-hop retrieval. hubmesh extends
that line with two contributions:
The multi-component scoring pattern is adapted from the NNSI framework (Naidu Dsk, ICOMP'25 โ to appear) for SDN topology optimization, repurposed here for retrieval planning.
Seed mentions resolve through the alias index, so free-text entity names work. The query path stays deterministic and LLM-free โ the planning intelligence lives in the caller.
Exposes the planner as deterministic operator tools over stdio โ
index_corpus, retrieve (seed-steerable, as above), resolve_entities,
entity_neighbors, path_between, get_document, graph_stats,
list_corpora. Your agent is the solver: it decomposes the question,
reads each hop, and aims the next one; the server answers in
milliseconds with zero LLM calls. Corpora persist as plain JSON/NPZ
under ~/.hubmesh/corpora.
The server warms up models and persisted corpora in the background at launch (~5-10s on first run), so tool calls stay fast from the start โ relevant for strict-timeout connector clients (Perplexity, etc.).
For web-based connector clients, serve SSE natively โ no gateway process needed:
Tunnel field notes (from a live Perplexity integration): ngrok works
(free tier included); cloudflared quick tunnels buffer SSE bodies
and hang tool calls; supergateway is unnecessary here and crashes
on reconnect. --allow-tunnel accepts the tunnel's forwarded Host
header โ without it, proxied requests get 421 Misdirected Request.
Full field report โ setup, error decoder, a 9/9 test battery run through Perplexity, and two findings about reasoning-model behaviour โ in docs/perplexity.md.
Each layer is independently testable and replaceable. Adapters wrap your existing vector DB so you don't have to migrate.
Headline: on multi-hop QA, hubmesh's KG mode beats both naive cosine retrieval and a HippoRAG-style PPR-only ablation that uses the same KG, at every hop depth.
| Benchmark | Setting | recall@10 vs naive |
|---|---|---|
| HotpotQA dev, N=7405 (full) | KG mode | +5.90 pts |
| HotpotQA dev, N=500 | KG mode | +5.0 pts |
| MuSiQue dev, N=300, 2-hop | KG mode | +6.0 pts |
| MuSiQue dev, N=300, 3-hop | KG mode | +3.2 pts |
| MuSiQue dev, N=300, 4-hop | KG mode | +5.0 pts |
All rows measured with v0.4.0 defaults (alias-indexed seeds + NNSI-KG
convergence; ablation JSONs committed in benchmarks/). Disclosed:
convergence trades top-rank precision for depth recall โ recall@2 is
โ0.75 pts vs naive on full dev (dips โค0.5 at smaller n); if you
retrieve with top_k=2, set use_convergence=False. Multi-seed
queries cost ~1.5โ1.8ร (still zero LLM tokens, deterministic).
vs PPR-only ablation on the same KG: +29.8 pts on HotpotQA at N=500 (measured on v0.2.0) โ the multi-component scoring is doing the work, not just "having a graph."
On the full N=7405 HotpotQA dev: hubmesh hits 75.2% supporting-fact recall@10 vs naive cosine's 69.3% (+4.21 pts at recall@5; recall@2 โ0.75, disclosed above).
Latency: ~22 ms mean / 26 ms p95 per query on a 7K-node KG (after PPR matrix caching); ~3 s/query at the 66K-paragraph full-dev scale with v0.4 convergence on.
See BENCHMARKS.md for the full methodology, ablations, per-hop breakdown, and notes on what this proves and doesn't.
Reproduce:
Pre-alpha (v0.4.0). Core algorithms implemented and validated; adapters for
in-memory, Qdrant, and Chroma; entity-linked KG with both spaCy NER and
LLM-based extraction (both linker-aware); alias-indexed entity resolution;
NNSI-KG scoring (multi-source convergence default-on, hub-discounted PPR
opt-in); agent-driven iterative multi-hop via seed_entities /
exclude_docs; MCP operator server (hubmesh-mcp, native SSE) with
JSON/NPZ corpus persistence; document chunking; reasoning-path
explanation; PPR-cache latency optimisation. Pinecone / pgvector / Weaviate adapters
and additional multi-hop benchmarks are tracked as
good first issues.
The multi-component scoring pattern is adapted from the Network Node Significance Index (NNSI) framework introduced in Naidu Dsk, "A Framework for Improving Network Topology Based on Graph Theory in Software-Defined Networking", 26th International Conference on Internet Computing & IoT (ICOMP'25), Las Vegas, July 2025 โ proceedings to appear. Repurposed here from SDN topology optimization to retrieval planning.
MIT
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/hubmesh)<a href="https://allmcps.com/mcp/hubmesh"><img src="https://allmcps.com/api/badge/hubmesh?style=directory" alt="Hubmesh on AllMCPs" /></a>