Zero-trust, air-gapped Enterprise GraphRAG MCP server with offline, citation-grounded answers.
io.github.bibinprathap/veritasgraph (MCP) Server
The io.github.bibinprathap/veritasgraph MCP server is a zero-trust, air-gapped Enterprise GraphRAG server that provides offline, citation-grounded answers. It is positioned as a governed, on-prem GraphRAG and agent framework that can run 100% locally or in the cloud. The approach combines a Tree-Search structure with knowledge-graph reasoning.
๐ ๏ธ Key Features
Zero-trust and air-gapped operation
Offline, citation-grounded answering
Enterprise GraphRAG and governed agents
Tree-Search structure plus knowledge-graph reasoning
๐ Use Cases
GraphRAG for information retrieval
Multi-hop reasoning with knowledge graphs
Enterprise knowledge management and knowledge engineering
Graph analytics and knowledge-engineering workflows
โก Developer Benefits
Knowledge graphs, knowledge management, and RAG support
Multi-hop reasoning and context-window-oriented agent design
Python-library use (Python 3.10+ indicated)
โ ๏ธ Limitations
Tooling scope is not specified in the provided data (toolCount not included)
VeritasGraph โ The Governed, On-Prem GraphRAG & Agent Framework
Stop chunking blindly. Combine Tree-Search structure with Knowledge-Graph reasoning โ and wire it into governed AI agents. Runs 100% locally or in the cloud.
๐ฏ Traditional RAG guesses based on similarity. VeritasGraph reasons based on structure.
Don't just find the document โ understand the connection, then act on it with governed agents.
๐ ๏ธ VeritasGraph Studio โ Build, wire & test governed agents locally
Studio is a local Agent Build Workspace (FastAPI + single-page UI) that lets you build a knowledge graph from your own documents and wire it into agents alongside tools, memory, data logging, guardrails, and headroom-style context budgeting โ then chat with those agents live and watch every stage of the orchestration pipeline. Everything runs 100% locally against Ollama.
๐ฎ Try the Studio Live โ stable URL that always redirects to the current running studio tunnel.
Run it:
bash
pip install -r requirements.txt
ollama serve & ollama pull qwen3:latest # any local chat model
STUDIO_DATA_DIR="$PWD/studio_api/data" \
uvicorn studio_api.main:app --host 127.0.0.1 --port 8200 --log-level warning
# Studio UI โ http://localhost:8200/studio ยท API docs โ /docs
One-command end-to-end demo (builds a graph + drives a fully-wired agent through graph reasoning, memory recall, PII redaction, and a guardrail block):
Medical AI โ Clinical Knowledge Graph โ de-identifies notes (Safe Harbor), extracts entities, detects contradictions, normalizes to ICD-10/RxNorm/SNOMED/LOINC, builds patient KG with citations.
๐ก What you're seeing: a query triggers multi-hop reasoning across the knowledge graph. Nodes light up as connections are discovered, showing exactly how the answer was found โ not just what was found.
๐ MCP Server โ connect your IDE agent to VeritasGraph
VeritasGraph ships a dedicated Model Context Protocol server โ the first zero-trust, air-gapped Enterprise GraphRAG server for MCP. Connect Claude Desktop, Cursor, VS Code, Windsurf, Cline, or Continue directly to the GraphRAG engine over JSON-RPC 2.0 stdio, with zero external data egress.
bash
python -m veritasgraph_mcp # from repo root (needs local Ollama for ingest/query)
Tools: veritasgraph_ingest_document, veritasgraph_query (multi-hop answers with [doc#chunk] citations), veritasgraph_search_entities, veritasgraph_get_graph, veritasgraph_clear_graph. See veritasgraph_mcp/README.md for IDE registration snippets.
๐ฅ VeritasGraph-MCP Use Case โ Production Medical AI on Azure
Real-world deployment: VeritasGraph MCP server running on Azure Functions with Azure AI Foundry, delivering GraphRAG-powered clinical decision support with verifiable citations and compliance-ready architecture.
๐ Production deployment walkthrough
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 deployed as a remote MCP server that Azure AI Foundry agents call to answer clinical questions with:
โ Multi-hop GraphRAG reasoning โ assembles answers from separate graph edges
โ Verifiable citations โ every claim traces to [doc#chunk] sources
โ Production-grade architecture โ externalized state, identity at boundary, observability
{"question":"Should we adjust warfarin for patient 4471 on amiodarone?","answer":"Reduce the warfarin dose because amiodarone inhibits CYP2C9...","citations":["doc_warfarin_note#0","doc_warfarin_note#1"],"reasoning_path":["Amiodarone โ CYP2C9","CYP2C9 โ Warfarin","Warfarin โ Bleeding Risk"]}
Technical stack:
Compute: Azure Functions (Flex Consumption) โ scales to zero, fast event-driven scale-out
State: Azure Files mount โ survives cold starts and scale events
Medical MCP Server โ Clinical knowledge graph with multi-hop reasoning and [doc#chunk] citations
Power BI Natural-Language Agent โ Validates OAuth token โ discovers schema โ generates DAX โ executes via executeQueries REST API with row-level security enforced by the platform
๐ก Key insight: The gap between POC and production is architecture, not the model. Ground it, externalize state, secure it, observe it, make it resilient, keep it compliant.
๐ Python API
python
from veritasgraph import VisionRAGPipeline
pipeline = VisionRAGPipeline() # auto-detects available models
doc = pipeline.ingest_pdf("document.pdf")
result = pipeline.query("What are the key findings?")
print(result.answer)
๐ณ Hierarchical tree navigation + graph search
python
from veritasgraph import VisionRAGPipeline
pipeline = VisionRAGPipeline()
doc = pipeline.ingest_pdf("report.pdf")
# View the document's hierarchical structure (like a Table of Contents)print(pipeline.get_document_tree())
# Document Root# โโโ [1] Introduction (pp. 1-5)# โ โโโ [1.1] Background (pp. 1-2)# โ โโโ [1.2] Objectives (pp. 3-5)# โโโ [2] Methodology (pp. 6-15)# Navigate to a specific section (tree-based retrieval)
section = pipeline.navigate_to_section("Methodology")
print(section['breadcrumb']) # ['Document Root', 'Methodology']# Or use graph-based semantic search
result = pipeline.query("What methodology was used?")
# โ answer with section context: "๐ Location: Document > Methodology > Analysis Framework"
GraphRAG is brilliant at describing what your documents say. But enterprise questions like "Which purchase orders violated our Segregation-of-Duties policy last quarter?" are rule-evaluation problems over structured records โ not similarity search.
For those, VeritasGraph ships a sister module: VeritasReason โ a deterministic reasoning engine (forward-chaining + Rete + SPARQL) that fires policy rules over a triplet store and returns auditable answers with W3C PROV-O provenance.
The same pattern applies to leave-policy violations (HRIS attendance), expense-report fraud (ledger + receipts), clinical protocol breaches (EHR + guidelines), or KYC/AML (transactions + watchlists). Define the SQL โ triple mapping in ingest_structured.py, write rules in rules/*.yaml, and ask in plain English. See veritas-reason/plan.md for a full walk-through.
๐ Interactive Graph Visualization
VeritasGraph includes an interactive 2D knowledge-graph explorer (PyVis) that visualizes entities and relationships in real time.
Feature
Description
Query-aware subgraph
Shows only entities related to your query
Community coloring
Nodes grouped by community membership
Red highlight
Query-related entities shown in red
Node sizing
Bigger nodes = more connections
Interactive
Drag, zoom, hover for entity details
Full graph explorer
View the entire knowledge graph
โ๏ธ Provider Support (OpenAI-compatible)
VeritasGraph works with any OpenAI-compatible API โ mix and match cloud and local:
Provider
API Base
API Key
Example Model
Ollama (default)
http://localhost:11434/v1
ollama
llama3.1-12k
OpenAI
https://api.openai.com/v1
sk-proj-...
gpt-4-turbo-preview
Groq
https://api.groq.com/openai/v1
gsk_...
llama-3.1-70b-versatile
Together AI
https://api.together.xyz/v1
your-key
Meta-Llama-3.1-70B-Instruct-Turbo
LM Studio
http://localhost:1234/v1
lm-studio
(model loaded in LM Studio)
Also supported: Azure OpenAI, OpenRouter, Anyscale, LocalAI, vLLM.
bash
cd graphrag-ollama-config
cp settings_openai.yaml settings.yaml
cp .env.openai.example .env# edit with your provider settings
python -m graphrag.index --root . --config settings_openai.yaml
python app.py
โ ๏ธ 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. Full details in OPENAI_COMPATIBLE_API.md.
๐ณ Deployment
Five-Minute Magic Onboarding (Docker)
Run a full stack (Ollama + Neo4j + Gradio) with one command:
bash
cd docker/five-minute-magic-onboarding
# set your Neo4j password in .env, then:
docker compose up --build
graph TD
subgraph "Indexing Pipeline (one-time)"
A[Source Documents] --> B{Document Chunking};
B --> C{"LLM Extraction<br/>(Entities & Relationships)"};
C --> D[Vector Index];
C --> E[Knowledge Graph];
end
subgraph "Query Pipeline (real-time)"
F[User Query] --> G{Hybrid Retrieval Engine};
G -- "1. Vector search for entry points" --> D;
G -- "2. Multi-hop graph traversal" --> E;
G --> H{Pruning & Re-ranking};
H -- "Rich context" --> I{LoRA-Tuned LLM Core};
I -- "Answer + provenance" --> J{Attribution Layer};
J --> K[Attributed Answer];
end
style A fill:#f2f2f2,stroke:#333,stroke-width:2px
style F fill:#e6f7ff,stroke:#333,stroke-width:2px
style K fill:#e6ffe6,stroke:#333,stroke-width:2px
The four stages:
Automated Knowledge Graph construction โ chunk documents into TextUnits, extract (head, relation, tail) triplets, assemble nodes + edges in a graph DB (e.g. Neo4j).
LoRA-tuned reasoning core โ a locally hosted, LoRA-tuned open model generates attributed answers with efficient fine-tuning for reasoning + attribution.
Attribution & provenance layer โ propagates source IDs, chunks, and graph nodes into a structured, traceable JSON output.
โ Hierarchical tree + graph โ PageIndex-style TOC navigation with graph flexibility.
โ Governed agents โ guardrails, memory, tools, and context budgeting wired together in Studio.
โ Open-source & sovereign โ MIT-licensed, no vendor lock-in.
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, not just whether they appear near each other in a vector index.
๐ 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.
bibtex
@article{VeritasGraph2025,
title={VeritasGraph: A Sovereign GraphRAG Framework for Enterprise-Grade AI with Verifiable Attribution},
author={Bibin Prathap},
journal={International Conference on Applied Science and Future Technology (ICASF)},
year={2025}
}