veritasgraph-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- veritasgraph_mcp-0.1.0/PKG-INFO +168 -0
- veritasgraph_mcp-0.1.0/README.md +1258 -0
- veritasgraph_mcp-0.1.0/pyproject.toml +53 -0
- veritasgraph_mcp-0.1.0/setup.cfg +4 -0
- veritasgraph_mcp-0.1.0/studio_api/__init__.py +12 -0
- veritasgraph_mcp-0.1.0/studio_api/ccr.py +133 -0
- veritasgraph_mcp-0.1.0/studio_api/compression.py +106 -0
- veritasgraph_mcp-0.1.0/studio_api/dependencies.py +10 -0
- veritasgraph_mcp-0.1.0/studio_api/graphrag_engine.py +487 -0
- veritasgraph_mcp-0.1.0/studio_api/main.py +79 -0
- veritasgraph_mcp-0.1.0/studio_api/models.py +227 -0
- veritasgraph_mcp-0.1.0/studio_api/orchestrator.py +481 -0
- veritasgraph_mcp-0.1.0/studio_api/store.py +796 -0
- veritasgraph_mcp-0.1.0/tests/test_policy_compliance_demo.py +195 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp/README.md +144 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp/__init__.py +22 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp/__main__.py +6 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp/server.py +197 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp/tools.py +238 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp.egg-info/PKG-INFO +168 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp.egg-info/SOURCES.txt +23 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp.egg-info/dependency_links.txt +1 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp.egg-info/entry_points.txt +2 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp.egg-info/requires.txt +1 -0
- veritasgraph_mcp-0.1.0/veritasgraph_mcp.egg-info/top_level.txt +2 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: veritasgraph-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The first zero-trust, air-gapped Enterprise GraphRAG server for the Model Context Protocol (MCP).
|
|
5
|
+
Author: Bibin Prathap
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bibinprathap/VeritasGraph
|
|
8
|
+
Project-URL: Repository, https://github.com/bibinprathap/VeritasGraph
|
|
9
|
+
Project-URL: Documentation, https://bibinprathap.github.io/VeritasGraph/
|
|
10
|
+
Project-URL: Issues, https://github.com/bibinprathap/VeritasGraph/issues
|
|
11
|
+
Keywords: mcp,model-context-protocol,graphrag,knowledge-graph,rag,zero-trust,air-gapped,local-llm,ollama,veritasgraph
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Requires-Dist: httpx>=0.27
|
|
24
|
+
|
|
25
|
+
# VeritasGraph MCP Server
|
|
26
|
+
|
|
27
|
+
**The first zero-trust, air-gapped Enterprise GraphRAG server for the
|
|
28
|
+
[Model Context Protocol](https://modelcontextprotocol.io/).**
|
|
29
|
+
|
|
30
|
+
Connect your local IDE agent — Claude Desktop, Cursor, VS Code, Windsurf,
|
|
31
|
+
Cline, Continue — directly to the VeritasGraph knowledge-graph engine over a
|
|
32
|
+
standard JSON-RPC 2.0 stdio stream. Build graphs from your documents, run
|
|
33
|
+
multi-hop graph-grounded queries with verifiable `[doc#chunk]` citations, and
|
|
34
|
+
inspect entities — all **100% locally**, with **zero external data egress**.
|
|
35
|
+
|
|
36
|
+
- **Zero-trust / air-gapped** — stdlib-only JSON-RPC server; no cloud calls, no
|
|
37
|
+
telemetry. The only network hop is your local Ollama runtime.
|
|
38
|
+
- **Verifiable attribution** — every node and edge records the source chunk it
|
|
39
|
+
came from, so answers cite their evidence.
|
|
40
|
+
- **Drop-in** — wraps the same `studio_api.graphrag_engine` used by Studio.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Tools
|
|
45
|
+
|
|
46
|
+
| Tool | Purpose |
|
|
47
|
+
|------|---------|
|
|
48
|
+
| `veritasgraph_ingest_document` | Chunk a document, extract entities/relationships, merge into the graph. |
|
|
49
|
+
| `veritasgraph_query` | Multi-hop, graph-grounded answer with citations and reasoning path. |
|
|
50
|
+
| `veritasgraph_search_entities` | Fast subgraph retrieval for a query (no LLM call). |
|
|
51
|
+
| `veritasgraph_get_graph` | Return the full graph: nodes, edges, stats. |
|
|
52
|
+
| `veritasgraph_clear_graph` | Clear the entire graph (destructive). |
|
|
53
|
+
|
|
54
|
+
## Resources
|
|
55
|
+
|
|
56
|
+
| URI | Description |
|
|
57
|
+
|-----|-------------|
|
|
58
|
+
| `veritasgraph://graph` | Live snapshot of the knowledge graph. |
|
|
59
|
+
| `veritasgraph://stats` | Entity / relationship / source counts. |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Requirements
|
|
64
|
+
|
|
65
|
+
- Python 3.10+
|
|
66
|
+
- VeritasGraph repo dependencies: `pip install -r requirements.txt`
|
|
67
|
+
- A local [Ollama](https://ollama.com) runtime with a chat model pulled
|
|
68
|
+
(ingest/query need a model; `search_entities`/`get_graph` do not):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ollama serve & ollama pull qwen3:latest
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Run it
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# From the repository root
|
|
78
|
+
python -m veritasgraph_mcp # stdio JSON-RPC server
|
|
79
|
+
python -m veritasgraph_mcp --debug # verbose logging on stderr
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Environment variables
|
|
83
|
+
|
|
84
|
+
| Variable | Default | Meaning |
|
|
85
|
+
|----------|---------|---------|
|
|
86
|
+
| `VERITASGRAPH_MODEL` | `qwen3:latest` | Default Ollama model for ingest/query. |
|
|
87
|
+
| `OLLAMA_HOST` | `127.0.0.1:11434` | Local Ollama endpoint. |
|
|
88
|
+
| `STUDIO_DATA_DIR` | `studio_api/data` | Where the graph snapshot is persisted. |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Register in your IDE
|
|
93
|
+
|
|
94
|
+
Replace `/abs/path/to/VeritasGraph` with the absolute path to your clone, and
|
|
95
|
+
point `command` at the repo's Python (e.g. `.venv/bin/python`).
|
|
96
|
+
|
|
97
|
+
### Claude Desktop — `claude_desktop_config.json`
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"mcpServers": {
|
|
102
|
+
"veritasgraph": {
|
|
103
|
+
"command": "/abs/path/to/VeritasGraph/.venv/bin/python",
|
|
104
|
+
"args": ["-m", "veritasgraph_mcp"],
|
|
105
|
+
"cwd": "/abs/path/to/VeritasGraph",
|
|
106
|
+
"env": { "VERITASGRAPH_MODEL": "qwen3:latest" }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Cursor — `.cursor/mcp.json`
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"mcpServers": {
|
|
117
|
+
"veritasgraph": {
|
|
118
|
+
"command": "/abs/path/to/VeritasGraph/.venv/bin/python",
|
|
119
|
+
"args": ["-m", "veritasgraph_mcp"],
|
|
120
|
+
"cwd": "/abs/path/to/VeritasGraph"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### VS Code — `.vscode/mcp.json`
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"servers": {
|
|
131
|
+
"veritasgraph": {
|
|
132
|
+
"type": "stdio",
|
|
133
|
+
"command": "/abs/path/to/VeritasGraph/.venv/bin/python",
|
|
134
|
+
"args": ["-m", "veritasgraph_mcp"],
|
|
135
|
+
"cwd": "/abs/path/to/VeritasGraph"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Windsurf, Cline, and Continue use the same `command` / `args` / `cwd` shape.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Quick manual test (no IDE)
|
|
146
|
+
|
|
147
|
+
Pipe raw JSON-RPC frames over stdio:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
printf '%s\n' \
|
|
151
|
+
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
|
|
152
|
+
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
|
|
153
|
+
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"veritasgraph_get_graph","arguments":{}}}' \
|
|
154
|
+
| python -m veritasgraph_mcp
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
You should get three JSON-RPC responses: server info, the tool catalog, and the
|
|
158
|
+
current graph snapshot.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## How it fits VeritasGraph
|
|
163
|
+
|
|
164
|
+
The MCP server is a thin protocol adapter. All graph construction, multi-hop
|
|
165
|
+
retrieval, and citation logic live in
|
|
166
|
+
[`studio_api/graphrag_engine.py`](../studio_api/graphrag_engine.py), the same
|
|
167
|
+
engine that powers Studio. That means the MCP surface, the Studio UI, and the
|
|
168
|
+
HTTP API all read and write the **same** local knowledge graph.
|