Codebase knowledge graph MCP server — call chains, topology, and hybrid search for coding agents
Project description
orgraph-mcp
Codebase knowledge graph for coding agents. Gives Claude Code, Cursor, Codex, and other MCP-compatible agents a persistent graph of any repo — call chains, topology clusters, dependency trees — on top of hybrid code search.
Quickstart
Install uv, then:
uv tool install orgraph-mcp
orgraph install
orgraph install detects installed coding agents and wires up the MCP server automatically. Open any repo in your agent and orgraph starts working — it indexes on first run, no manual setup needed.
To undo: orgraph uninstall
What agents can do
Once configured, your agent has 6 tools:
| Tool | What it does |
|---|---|
search(query) |
Hybrid BM25+semantic search — find code by description |
trace(symbol, direction, depth) |
Follow call chains forward (callees) or backward (callers) |
get_context(file_or_symbol) |
Topology cluster, community, call depth, indegree — where does this fit? |
find_entry_points(kind) |
HTTP handlers and entry surfaces; kind = "all" | "http" | "topology" |
get_dependencies(file, direction, depth) |
Import + call dependency tree, forward or reverse |
reindex(force) |
Re-index changed/deleted files without restarting the server |
The agent picks the right tool automatically based on what you ask.
Manual usage
# Index a repo manually (optional — serve auto-indexes)
orgraph index /path/to/repo
# Check what was indexed
orgraph status /path/to/repo
# Search from the CLI
orgraph search "authentication middleware" /path/to/repo
# Start the MCP server
orgraph serve /path/to/repo
Manual MCP config
If you prefer to configure manually instead of using orgraph install:
Claude Code (~/.claude.json):
{
"mcpServers": {
"orgraph": {
"command": "uvx",
"args": ["--from", "orgraph-mcp", "orgraph", "serve", "."],
"type": "stdio"
}
}
}
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"orgraph": {
"command": "uvx",
"args": ["--python", "3.13", "--from", "orgraph-mcp", "orgraph", "serve", "."]
}
}
}
The server uses . as the repo path — it starts relative to wherever your agent opens the project.
How it works
- Extraction — tree-sitter AST extractor (SCIP compiler-accurate extraction when available)
- Graph — Kuzu embedded graph DB with Function/Class/File nodes + CALLS/IMPORTS/INHERITS edges
- Search — semble hybrid BM25 + Model2Vec embeddings
- Topology — BFS entry-point clustering groups files into domain clusters
- Communities — Leiden community detection for finer-grained groupings
- Incremental — md5 manifest tracks changes;
reindexonly re-extracts what changed
Eval
Measure retrieval quality against a ground truth file:
orgraph eval /path/to/repo --ground-truth queries.json --output report.json
Ground truth format:
[
{
"id": "auth-flow",
"query": "how is authentication handled",
"relevant_files": ["auth.py", "middleware.py"],
"relevant_symbols": ["authenticate", "require_auth"],
"query_type": "semantic"
}
]
Reports NDCG@10, MRR, and Precision@3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orgraph_mcp-0.1.8.tar.gz.
File metadata
- Download URL: orgraph_mcp-0.1.8.tar.gz
- Upload date:
- Size: 287.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36344dea808e8cd28cf1b04d5b4cc0f0fa2629f8d959f8401c39f4099e7f095e
|
|
| MD5 |
9820776365ff66e5597923910b98e81b
|
|
| BLAKE2b-256 |
deb957d4f5b14003f32a6a4c28453af7b87944dc2f4a3b8002d5aaed2408f3e7
|
Provenance
The following attestation bundles were made for orgraph_mcp-0.1.8.tar.gz:
Publisher:
release.yml on tss-pranavkumar/orgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orgraph_mcp-0.1.8.tar.gz -
Subject digest:
36344dea808e8cd28cf1b04d5b4cc0f0fa2629f8d959f8401c39f4099e7f095e - Sigstore transparency entry: 1848388879
- Sigstore integration time:
-
Permalink:
tss-pranavkumar/orgraph@4d5c74e7b5dda8feb8d67696375f39550d2514a3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tss-pranavkumar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d5c74e7b5dda8feb8d67696375f39550d2514a3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file orgraph_mcp-0.1.8-py3-none-any.whl.
File metadata
- Download URL: orgraph_mcp-0.1.8-py3-none-any.whl
- Upload date:
- Size: 175.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8a1d7e951451d4edfc9d24d7d9c62412cd83e5297630d9904efd63ca624eeeb
|
|
| MD5 |
0ff0277b02013d493f28a354aebca50a
|
|
| BLAKE2b-256 |
4ca8f8e280bc9ae70f8dcff9d6df201a87dde639a61f0dac05dde9a6c91df222
|
Provenance
The following attestation bundles were made for orgraph_mcp-0.1.8-py3-none-any.whl:
Publisher:
release.yml on tss-pranavkumar/orgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orgraph_mcp-0.1.8-py3-none-any.whl -
Subject digest:
b8a1d7e951451d4edfc9d24d7d9c62412cd83e5297630d9904efd63ca624eeeb - Sigstore transparency entry: 1848388989
- Sigstore integration time:
-
Permalink:
tss-pranavkumar/orgraph@4d5c74e7b5dda8feb8d67696375f39550d2514a3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tss-pranavkumar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4d5c74e7b5dda8feb8d67696375f39550d2514a3 -
Trigger Event:
push
-
Statement type: