# veritasgraph

An on-prem GraphRAG server that answers from a knowledge graph with source citations and admits when evidence is missing.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 325
- Author: bibinprathap
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/bibinprathap/VeritasGraph
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/veritasgraph

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `VERITASGRAPH_MODEL`, `OLLAMA_HOST`, `STUDIO_DATA_DIR` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
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>

### Codex

**Platform CLI**
```bash
codex mcp add veritasgraph --env VERITASGRAPH_MODEL=<VERITASGRAPH_MODEL> --env OLLAMA_HOST=<OLLAMA_HOST> --env STUDIO_DATA_DIR=<STUDIO_DATA_DIR> -- uvx veritasgraph-mcp
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e VERITASGRAPH_MODEL=<VERITASGRAPH_MODEL> -e OLLAMA_HOST=<OLLAMA_HOST> -e STUDIO_DATA_DIR=<STUDIO_DATA_DIR> veritasgraph uvx veritasgraph-mcp
```
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>

## When to use it
- 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
- 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

## Similar
- [neo4j-graphrag-skill](https://affpapa.org/en/nevibecode/skills/neo4j-graphrag-skill.md) — skill · 1100 installs
- [neo4j-genai-plugin-skill](https://affpapa.org/en/nevibecode/skills/neo4j-genai-plugin-skill.md) — skill · 812 installs
- [Knowledge Graph Builder](https://affpapa.org/en/nevibecode/skills/knowledge-graph-builder.md) — skill · 433 installs
- [haiku.rag](https://affpapa.org/en/nevibecode/mcp/haikurag.md) — MCP server · ★ 635
- [Knowledge Base Manager](https://affpapa.org/en/nevibecode/skills/knowledge-base-manager.md) — skill · 438 installs
- [mini-context-graph](https://affpapa.org/en/nevibecode/skills/mini-context-graph.md) — skill · 72 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
