veritasgraph — Claude Code MCP server: GraphRAG with citations
An on-prem GraphRAG server that answers from a knowledge graph with source citations and admits when evidence is missing.
claude mcp add --env VERITASGRAPH_MODEL=<VERITASGRAPH_MODEL> --env OLLAMA_HOST=<OLLAMA_HOST> --env STUDIO_DATA_DIR=<STUDIO_DATA_DIR> --transport stdio veritasgraph -- uvx veritasgraph-mcpWhat veritasgraph does
VeritasGraph answers by traversing a knowledge graph instead of ranking chunks by similarity. Provenance is stored when documents are written, so citations are not invented at generation time. If the graph has no edge for a question, the agent returns insufficient evidence rather than a guess. Traversal is reproducible, which keeps the evidence trace separate from the model's own output.
It runs as an MCP server through uvx veritasgraph-mcp. Ingest and queries need a local Ollama. Configuration takes VERITASGRAPH_MODEL, OLLAMA_HOST and STUDIO_DATA_DIR. The demo modes differ in what they ask of you: --mode=lite works with an OpenAI or Anthropic API key, --mode=local wants Ollama and 8GB RAM, and --mode=full needs Docker and Neo4j.
There is a worked example, MedTrust Agent, that applies the same architecture to medical and pharmaceutical workflows. It requires [doc#chunk] citations and withholds uncited answers, keeps a tamper-evident audit log, and blocks any tool call that fails authorization. Worth a look if you need that kind of control plane around agent tools.
What it helps with
- get answers tied to specific document fragments
- keep a reproducible evidence trace apart from model generation
- make the agent admit when the graph lacks evidence
- run graph-based retrieval entirely on your own hardware
- audit which tools an agent actually invoked
Example prompts for the agent
- add veritasgraph as an MCP server and check that it responds
- point veritasgraph at local Ollama and set the model via VERITASGRAPH_MODEL
- ask the graph which documents support this conclusion
How to install veritasgraph
Platform CLI
claude mcp add --env VERITASGRAPH_MODEL=<VERITASGRAPH_MODEL> --env OLLAMA_HOST=<OLLAMA_HOST> --env STUDIO_DATA_DIR=<STUDIO_DATA_DIR> --transport stdio veritasgraph -- uvx veritasgraph-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from veritasgraph-mcp <command>
Platform CLI
codex mcp add veritasgraph --env VERITASGRAPH_MODEL=<VERITASGRAPH_MODEL> --env OLLAMA_HOST=<OLLAMA_HOST> --env STUDIO_DATA_DIR=<STUDIO_DATA_DIR> -- uvx veritasgraph-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from veritasgraph-mcp <command>
Config file
{
"mcpServers": {
"veritasgraph": {
"command": "uvx",
"args": [
"veritasgraph-mcp"
],
"env": {
"VERITASGRAPH_MODEL": "<VERITASGRAPH_MODEL>",
"OLLAMA_HOST": "<OLLAMA_HOST>",
"STUDIO_DATA_DIR": "<STUDIO_DATA_DIR>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from veritasgraph-mcp <command>
Config file
{
"servers": {
"veritasgraph": {
"type": "stdio",
"command": "uvx",
"args": [
"veritasgraph-mcp"
],
"env": {
"VERITASGRAPH_MODEL": "<VERITASGRAPH_MODEL>",
"OLLAMA_HOST": "<OLLAMA_HOST>",
"STUDIO_DATA_DIR": "<STUDIO_DATA_DIR>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from veritasgraph-mcp <command>
Platform CLI
gemini mcp add -e VERITASGRAPH_MODEL=<VERITASGRAPH_MODEL> -e OLLAMA_HOST=<OLLAMA_HOST> -e STUDIO_DATA_DIR=<STUDIO_DATA_DIR> veritasgraph uvx veritasgraph-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from veritasgraph-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about veritasgraph
How do I install veritasgraph in Claude?
Run claude mcp add veritasgraph -- uvx veritasgraph-mcp. For environment variables use the longer form: `claude mcp add --env VERITASGRAPH_MODEL=<VERITASGRAPH_MODEL> --env OLLAMA_HOST=<OLLAMA_HOST> --env STUDIO_DATA_DIR=<STUDIO_DATA_DIR> --transport stdio veritasgraph -- uvx veritasgraph-mcp`.
What does veritasgraph do?
It is an MCP server for GraphRAG: retrieval walks a knowledge graph rather than comparing chunk vectors, and each answer carries citations. When the graph lacks the needed edges, it says so instead of guessing.
What do I need to run veritasgraph?
A local Ollama handles ingest and queries. The --mode=lite demo only needs an OpenAI or Anthropic API key, --mode=local requires Ollama and 8GB RAM, and --mode=full needs Docker plus Neo4j.