Skip to main content

VeritasGraph MCP Server

mcp-name: io.github.bibinprathap/veritasgraph

The first zero-trust, air-gapped Enterprise GraphRAG server for the Model Context Protocol.

Connect your local IDE agent — Claude Desktop, Cursor, VS Code, Windsurf, Cline, Continue — directly to the VeritasGraph knowledge-graph engine over a standard JSON-RPC 2.0 stdio stream. Build graphs from your documents, run multi-hop graph-grounded queries with verifiable [doc#chunk] citations, and inspect entities — all 100% locally, with zero external data egress.

  • Zero-trust / air-gapped — stdlib-only JSON-RPC server; no cloud calls, no telemetry. The only network hop is your local Ollama runtime.
  • Verifiable attribution — every node and edge records the source chunk it came from, so answers cite their evidence.
  • Drop-in — wraps the same studio_api.graphrag_engine used by Studio.

Tools

Tool Purpose
veritasgraph_ingest_document Chunk a document, extract entities/relationships, merge into the graph.
veritasgraph_query Multi-hop, graph-grounded answer with citations and reasoning path.
veritasgraph_search_entities Fast subgraph retrieval for a query (no LLM call).
veritasgraph_get_graph Return the full graph: nodes, edges, stats.
veritasgraph_clear_graph Clear the entire graph (destructive).

Resources

URI Description
veritasgraph://graph Live snapshot of the knowledge graph.
veritasgraph://stats Entity / relationship / source counts.

Requirements

  • Python 3.10+

  • VeritasGraph repo dependencies: pip install -r requirements.txt

  • A local Ollama runtime with a chat model pulled (ingest/query need a model; search_entities/get_graph do not):

    ollama serve & ollama pull qwen3:latest
    

Run it

# From the repository root
python -m veritasgraph_mcp            # stdio JSON-RPC server
python -m veritasgraph_mcp --debug    # verbose logging on stderr

Environment variables

Variable Default Meaning
VERITASGRAPH_MODEL qwen3:latest Default Ollama model for ingest/query.
OLLAMA_HOST 127.0.0.1:11434 Local Ollama endpoint.
STUDIO_DATA_DIR studio_api/data Where the graph snapshot is persisted.

Use it through VeritasGraph Studio

The same tools and resources are exposed over HTTP by the Studio backend, so you can drive the MCP server without an IDE — and the Studio agent pipeline can call its tools directly.

Start the Studio API and the bridge mounts under /mcp:

uvicorn studio_api.main:app --port 8200
Method & path Purpose
GET /mcp/ Server identity, capabilities, tool/resource counts.
GET /mcp/tools List tool definitions (same schema as tools/list).
POST /mcp/tools/{name} Invoke one tool; body is the tool arguments.
GET /mcp/resources List veritasgraph:// resources.
GET /mcp/resources/read?uri=... Read a resource.
POST /mcp/rpc Full JSON-RPC 2.0 bridge (any MCP method over HTTP).

Two ready-to-use tools are pre-registered in the Studio Tools section (VeritasGraph MCP · Query and VeritasGraph MCP · Search), pointing at loopback /mcp/tools/... endpoints. Enable Tools on an agent to have the orchestrator invoke them automatically during a run.

# Example: call a tool via the bridge
curl -s http://127.0.0.1:8200/mcp/tools/veritasgraph_search_entities \
  -H 'Content-Type: application/json' -d '{"query": "acme corp"}'

Register in your IDE

Replace /abs/path/to/VeritasGraph with the absolute path to your clone, and point command at the repo's Python (e.g. .venv/bin/python).

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "veritasgraph": {
      "command": "/abs/path/to/VeritasGraph/.venv/bin/python",
      "args": ["-m", "veritasgraph_mcp"],
      "cwd": "/abs/path/to/VeritasGraph",
      "env": { "VERITASGRAPH_MODEL": "qwen3:latest" }
    }
  }
}

Cursor — .cursor/mcp.json

{
  "mcpServers": {
    "veritasgraph": {
      "command": "/abs/path/to/VeritasGraph/.venv/bin/python",
      "args": ["-m", "veritasgraph_mcp"],
      "cwd": "/abs/path/to/VeritasGraph"
    }
  }
}

VS Code — .vscode/mcp.json

{
  "servers": {
    "veritasgraph": {
      "type": "stdio",
      "command": "/abs/path/to/VeritasGraph/.venv/bin/python",
      "args": ["-m", "veritasgraph_mcp"],
      "cwd": "/abs/path/to/VeritasGraph"
    }
  }
}

Windsurf, Cline, and Continue use the same command / args / cwd shape.


Quick manual test (no IDE)

Pipe raw JSON-RPC frames over stdio:

printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
  '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"veritasgraph_get_graph","arguments":{}}}' \
  | python -m veritasgraph_mcp

You should get three JSON-RPC responses: server info, the tool catalog, and the current graph snapshot.


How it fits VeritasGraph

The MCP server is a thin protocol adapter. All graph construction, multi-hop retrieval, and citation logic live in studio_api/graphrag_engine.py, the same engine that powers Studio. That means the MCP surface, the Studio UI, and the HTTP API all read and write the same local knowledge graph.

Metadata

Release files for veritasgraph-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for veritasgraph-mcp 0.1.2
File Size Uploaded
veritasgraph_mcp-0.1.2.tar.gz 57.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for veritasgraph-mcp 0.1.2
File Interpreter ABI Platform
veritasgraph_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 98.5 kB

Release files / veritasgraph_mcp-0.1.2.tar.gz

Download URL veritasgraph_mcp-0.1.2.tar.gz
Size 57.8 kB
Tags Source
SHA-256 checksum
How to use checksums
db4c0f6f6c544929006fb04cef94886597a4b283bfead76c80f8daae7d2d0b2f
BLAKE2b-256 checksum
How to use checksums
3e5b1fe985c4aaba5f5a9b34e3f5e77171d456fc3d1fb60fee1a3fd455a96516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / veritasgraph_mcp-0.1.2-py3-none-any.whl

Download URL veritasgraph_mcp-0.1.2-py3-none-any.whl
Size 40.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b29451d4820bfa20a50747391dbbc3dec8e604bf064f98e2a909e9db604dab99
BLAKE2b-256 checksum
How to use checksums
30be0b3df260d2f26571b6e0e05c07e9038d8f69cf2969dc468a752e006cf92e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page