
Veritasgraph
io.github.bibinprathapPublished by GitHub account bibinprathapv0.2.0Updated Nov 11, 2026
Zero-trust, air-gapped Enterprise GraphRAG MCP server with offline, citation-grounded answers.
Overview
Local, on-prem GraphRAG MCP server that lets an assistant query a governed knowledge graph and get citation-grounded answers, or an explicit abstention.
- What you can do
- Ask questions over the local knowledge graph in exploratory or governed mode, with citations, grounding flags and abstention
- Check whether a question is answerable before spending a model call, and replay past answers with their receipts and feedback
- Read and propose ontology entries, glossary terms and entity types, and search terms
- Ingest documents, import or export graphs, merge entities, and manage snapshots and the audit log
- Query connected SQL sources through a governed semantic layer, answered with generated SQL
- When to use it
- Use it when an assistant should answer from your own documents and internal databases with verifiable citations, and should say it does not know rather than guess. Suited to compliance, research and enterprise search work that must stay on-premise.
- Requirements
- Runs locally as a Python package (Python 3.10+) with a local Ollama endpoint set via OLLAMA_HOST and a pulled model named by VERITASGRAPH_MODEL. A SQLite store path is set with VERITASGRAPH_DB or STUDIO_DATA_DIR; the tool tier is chosen with VERITASGRAPH_MCP_MODE. The optional structured data layer needs its own DSN and secret key settings.
Installation
In SourceWeft
- Open Veritasgraph in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
VeritasGraph — The Governed, On-Prem GraphRAG & Agent Framework
A knowledge graph your agents can trust: every answer cites its sources, the vocabulary is governed by a certified ontology, and the system says "I don't know" instead of guessing. Runs 100% locally.
[VeritasGraph Logo][PyPI version] [Python 3.10+] [License: MIT] [CI] [GitHub Stars] [MCPVault: claimed] [M8ven Score]
🎯 Traditional RAG guesses based on similarity. VeritasGraph reasons based on structure — and refuses to answer when the evidence isn't there.
🌐 Live site · 🎮 Try the Studio live · ⭐ Star · 🍴 Fork · 💬 Discuss · 🐛 Report a bug
[Building Auditable Deep-Research Agents — Live at MBZUAI] [VeritasGraph Master Demo]
✨ What's new
📑 Table of contents
- Quick start
- Architecture
- Core concepts — attribution · ontology · compiler · governed mode · governance · PII · structured data
- VeritasGraph Studio
- Security model
- MCP server
- CLI
- Configuration
- API overview
- Deployment
- Development & tests
- Examples & ecosystem
- Vision RAG Python package (PyPI)
- Why VeritasGraph?
- Acknowledgments, awards & citation
🚀 Quick start
Option A — Local (Python + Ollama)
Studio asks for the token the first time you open it and keeps it for the browser session. To run a local demo without auth, set STUDIO_AUTH=off (Studio logs a warning on startup); never do this on a shared or public host.
Option B — Docker Compose
Studio is published on 127.0.0.1:8200 only.
Option C — MCP server for your IDE agent
See MCP server for IDE registration.
One-command end-to-end demo
This builds a graph and drives a fully wired agent through graph reasoning, memory recall, PII redaction and a guardrail block:
🏗️ Architecture
Studio, MCP and the CLI are thin layers over the same engine and store. A graph built in Studio can be queried from your IDE, and a compile run from the CLI shows up in the Studio Ontology tab. A shared job lock ensures only one compiler runs at a time.
🧠 Core concepts
Attribution, citations and abstention
- Attribution is a data model, not a prompt. Provenance is stored at write time: every entity and relation keeps the chunk it came from (
doc_xxx#n, orimp_xxx#nfor imported graphs). This prevents hallucinated citations at read time. - Deterministic retrieval. Graph traversal is reproducible, which separates the factual evidence trace from stochastic LLM generation.
- Strict citation check. Citations in the answer are compared with the sources that were actually retrieved. Mismatches are reported in
unknown_citationsand setgrounded: false. - Explicit abstention. If no entity matches the question, or governed mode can't ground the answer, the response sets
abstained: trueinstead of guessing.
Ontology & business glossary
The ontology is the governed vocabulary of the graph:
- Entity types, e.g.
Drug,Enzyme,Supplier. - Predicates, e.g.
inhibits, with optional domain/range constraints. - Glossary terms: business definitions with synonyms, linked to entities.
Once vocabulary is certified, it changes how the system behaves:
- Extraction limits entity types to the certified list and maps synonyms to the certified predicate.
- Compile uses the same mapping rules to clean up the existing graph.
- Governed mode answers only when certified terms cover the question.
Manage it in the Studio Ontology tab, through /ontology in the REST API, or with the MCP tools get_ontology, search_terms, get_term and propose_term.
The ontology compiler
veritasgraph compile, POST /graphrag/compile, or a timer set with VERITASGRAPH_COMPILE_INTERVAL runs these stages:
Only unambiguous mappings to certified vocabulary change the graph. Everything else is a suggestion that you accept or reject in Studio or via /graphrag/suggestions. Rejected suggestions are fingerprinted and don't come back. Every run is recorded (/graphrag/compile/runs) and audited.
Governed mode, answerability and receipts
POST /graphrag/answerable(MCP:check_answerable) tells an agent whether a question can be answered before it spends a model call.GET /graphrag/answers/{id}returns the receipt: question, mode, answer, citations, grounding and feedback.POST /graphrag/answers/{id}/feedbackrecords a rating for the answer so it can be reviewed later. Any viewer can rate an answer.
Governance: audit, snapshots, merge
- Hash-chained audit log. Every write (ingest, import, compile, certify, merge, clear, restore) appends a SHA-256-chained event.
GET /graphrag/audit/verifyrecomputes the chain and reports the event where it breaks (broken_at). - Snapshots. Create, list and restore snapshots (
/graphrag/snapshots). Clearing the graph always takes a snapshot first. Retention is set withVERITASGRAPH_SNAPSHOT_KEEP(default 20). - Entity merge.
POST /graphrag/entities/mergefolds duplicates together and keeps their relations and provenance. - Import / export. Bring in
graph.jsonfrom Graphify, Understand-Anything, AI-Atlas or a generic node/edge file. Merge strategies arepreserve_curated,skip_existingandoverwrite, with a--dry-runpreview.
PII policy
VERITASGRAPH_PII_POLICY controls what happens when ingested text contains email addresses, SSNs, credit card numbers (Luhn-validated), phone numbers or IP addresses:
PII in chunks is redacted on read for callers below VERITASGRAPH_PII_REVEAL_ROLE (default editor).
Structured data layer
Beyond documents, VeritasGraph can govern databases. Install with pip install -e ".[structured]" and set VG_STRUCTURED_DSN to a Postgres + pgvector store.
- Connect a source read-only: PostgreSQL, MySQL/MariaDB, SQLite, DuckDB, ClickHouse, Trino, Hive (
[structured-hive]), Snowflake or Databricks ([structured-saas]). Credentials are encrypted withVG_SECRET_KEY. - Sync the schema, then compile a semantic layer of datasets, fields, relationships, glossary terms and measures. These follow the same
proposed → certifiedworkflow. - Ask in natural language. The answer is generated SQL over certified objects, run under a statement timeout and a row cap, and returned with a receipt.
Source DSNs are guarded:
- A network allowlist (
VG_STRUCTURED_ALLOWED_NETWORKS) controls which hosts can be reached. - A file root (
VG_STRUCTURED_FILE_ROOT) limits SQLite and DuckDB to approved paths. - Dangerous driver options are refused.
See .env.structured.example for every setting, and the structured CLI / /structured API.
🖥️ VeritasGraph Studio
Studio is a local Agent Build Workspace (FastAPI + a single-page UI at /studio). You build a knowledge graph from your own documents, govern its vocabulary, and wire it into agents alongside tools, memory, data logging, guardrails and headroom-style context budgeting. You then chat with those agents and watch every stage of the orchestration pipeline.
🎮 Try the Studio live — a stable URL that always redirects to the currently running Studio tunnel.
Orchestration pipeline (per turn): Guardrails → Memory → Knowledge Graph → Headroom budget → Tools → Data log, with every step visible in the trace.
[Knowledge Graph builder and explorer] [Agent builder with capability toggles]
For full API details and curl recipes, see studio_api/README.md. For a guided enterprise scenario, see the Northwind Bank compliance playbook.
🔐 Security model
Auth is on by default. Studio refuses to start unless STUDIO_API_TOKENS is set or STUDIO_AUTH=off is set explicitly.
More controls:
- Public routes: only
/health,/readyand/studio; the UI shell holds no data. - SSRF protection: HTTP tools can't reach private, loopback or link-local addresses unless the address is listed in
STUDIO_TOOL_ALLOWED_NETWORKS. - CORS: set allowed origins with
STUDIO_CORS_ORIGINS. - MCP tiers:
VERITASGRAPH_MCP_MODElimits which tools an MCP client can see. In the Studio MCP bridge, tools are also limited by the caller's role. - PII: see PII policy.
🔌 MCP server
VeritasGraph ships a Model Context Protocol server: a zero-trust, air-gapped enterprise GraphRAG server for MCP. Claude Desktop, Cursor, VS Code, Windsurf, Cline and Continue connect over JSON-RPC 2.0 stdio with zero external data egress.
Resources: veritasgraph://graph, veritasgraph://stats, veritasgraph://ontology. Tools that aren't in the active mode are reported as unknown tools.
See veritasgraph_mcp/README.md for Claude Desktop, Cursor and VS Code registration snippets.
🏥 Use case — VeritasGraph MCP in production medical AI on Azure
Real-world deployment: the VeritasGraph MCP server runs on Azure Functions with Azure AI Foundry. It delivers GraphRAG-powered clinical decision support with verifiable citations and a compliance-ready architecture.
The challenge: 90% of Azure AI demos work. Most never ship. The gap isn't the model; it's architecture, security, state management and compliance.
The solution: VeritasGraph is deployed as a remote MCP server that Azure AI Foundry agents call to answer clinical questions with:
- ✅ Multi-hop GraphRAG reasoning: answers are assembled from separate graph edges.
- ✅ Verifiable citations: every claim traces to
[doc#chunk]sources. - ✅ Production-grade architecture: externalized state, identity at the boundary, observability.
- ✅ Compliance-ready: region-pinned, PHI-aware guardrails, semantic-layer RBAC.
Key production lessons:
- State externalization. Flex Consumption wiped in-memory graphs; this was fixed with a mounted Azure Files share.
- Identity at the boundary. Carry the Entra identity, and enforce Power BI RLS and Dataverse roles on behalf of the user.
- Self-correcting agents. Feed errors and the schema back, and retry up to 3× (e.g. for DAX generation).
- Compliance by design. Foundry guardrails block PHI-leaking requests before they reach the model.
- Observability layers. Application Insights, Foundry Traces, Evaluations and Alerts.
[Watch: VeritasGraph MCP on Azure AI Foundry]
- 📄 From Proof of Concept to Production: Azure AI That Actually Ships
- 💻 Azure AI Foundry + VeritasGraph implementation repository
💡 Key insight: the gap between proof of concept and production is architecture, not the model. Ground it, externalize state, secure it, observe it, make it resilient and keep it compliant.
🧰 CLI
pip install -e ".[studio]" installs the veritasgraph command:
The import command accepts --format values auto, graphify, understand_anything, ai_atlas and generic, and --source-type values curated, extracted and inferred.
⚙️ Configuration
The full reference is in studio_api/README.md.
🌐 API overview
The interactive OpenAPI docs are served at /docs. Main route groups:
🐳 Deployment
Share with your team (free)
*The free tier has some limitations. Always keep auth on for anything reachable from the internet, and rotate tokens that have been shared.
On-premise hardware guidance
Hardware: 16+ CPU cores, 64 GB+ RAM (128 GB recommended), and an NVIDIA GPU with 24 GB+ VRAM (A100 / H100 / RTX 4090) for larger local models.
Software: Docker and Docker Compose, Python 3.10+, NVIDIA Container Toolkit.
Copy .env.example to .env and fill in environment-specific values.
Provider support (OpenAI-compatible)
Studio talks to Ollama (OLLAMA_HOST). The structured layer and the GraphRAG pipeline in graphrag-ollama-config/ work with any OpenAI-compatible API. The structured layer stays local unless you set VG_LLM_ALLOW_REMOTE to allow a remote endpoint.
Azure OpenAI, OpenRouter, Anyscale and LocalAI are also supported.
⚠️ Embeddings must match your index. If you indexed with
nomic-embed-text(768 dims), you must query with the same model. Switching embedding models requires re-indexing.
🧪 Development & tests
CI runs ruff and pytest on Python 3.10 and 3.12. Browser end-to-end tests live in tests/studio-e2e (see VERITASGRAPH_PLAYWRIGHT_INTEGRATION_TESTS.md). Contributions are welcome; see CONTRIBUTING.md and SECURITY.md.
🧩 Examples & ecosystem
🏛️ Enterprise compliance — VeritasGraph + VeritasReason
GraphRAG is great at describing what documents say. Questions like "Which purchase orders violated our Segregation-of-Duties policy last quarter?" are rule-evaluation problems over structured records. VeritasReason is a deterministic reasoning engine (forward-chaining + Rete + SPARQL) that fires policy rules over a triple store and returns auditable answers with W3C PROV-O provenance.
[VeritasGraph + VeritasReason policy-compliance demo]
The rules live in rules/sod_policy.yaml and the SQL → triple mapping in ingest_structured.py. See veritas-reason/plan.md for a walkthrough.
Built with VeritasGraph
- MeAkash77 / VeritasGraph-Enterprise-GraphRAG-Verifiable-AI-Platform — enterprise GraphRAG adapter and verifiable AI platform patterns.
- PTP063 / veritas-graph — derivative project and live deployment.
- RahulSagar2005 / multi-hop-rag — multi-hop retrieval and reasoning workflows.
- lukehungngo / agentwall — agent security and governance-oriented reasoning flows.
- gajanan229 / Fact-checker-Agent — evidence-focused fact-checking.
- Minh-Tam-Solution / EndiorBot — enterprise chatbot built around graph-backed reasoning.
- NistorDorinGabriel / Proiect_Licenta — academic thesis extending VeritasGraph-inspired graph reasoning.
Building with VeritasGraph? Open a PR with a short repo description to be featured here.
📚 Guides & talks
- 📄 Build Governed AI Agents On-Prem (PDF): designing, wiring and shipping governed agents on your own infrastructure.
- ⚡ Live docs · 🎮 Live demo · 📖 Article · 📄 Research paper
[Build Governed AI Agents On-Prem — walkthrough] [Import any graph.json into VeritasGraph Studio — walkthrough]
[Watch VeritasGraph build reasoning paths in real time] [Convert charts & tables to knowledge graphs — Vision RAG tutorial]
📦 Vision RAG Python package (PyPI)
Note: the
veritasgraphpackage on PyPI is the Vision RAG / tree + graph library. It is separate from the Studio / MCP / governance stack in this repository. Both install averitasgraphcommand, so use separate virtual environments if you need both.
[Colab: Vectorless RAG] [Colab: Vision RAG] [Colab: Tree Accuracy]
Graph + Tree retrieval
The package also includes an interactive PyVis graph explorer. It shows a query-aware subgraph, colors nodes by community, highlights query entities in red, and sizes nodes by number of connections.
Why VeritasGraph?
[Traditional RAG vs VeritasGraph comparison]
Who is it for? Engineers building enterprise search, compliance assistants, research copilots, scientific literature explorers and agent memory systems: anywhere "the answer" depends on how facts connect, and where a wrong answer costs more than no answer.
🙌 Acknowledgments
Builds on the foundational work of HopRAG, Microsoft GraphRAG, LangChain & LlamaIndex, and Neo4j.
🏆 Awards & Citation
Presented at the International Conference on Applied Science and Future Technology (ICASF 2025) — 📄 Appreciation Certificate.
Star History
[stars] [issues] [forks] [license] [Image]
Licensed under MIT. ⭐ Star the repo to follow the roadmap for open-source, governed GraphRAG.
Source: README.md at commit 68552fd
Tools
0Version history
2- v0.2.0LatestNov 11, 2026
- v0.1.2Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts