ohwise-mcp
MCP server connecting AI coding agents to graph-native code context and multi-agent pipelines.
ohwise-mcp implements the Model Context Protocol so that any MCP-compatible AI agent (Claude Code, Claude Desktop, and others) can:
- Build and query knowledge graphs from code repositories via codebase2graph
- Build and query knowledge graphs from documents via docs2graph
- Rank the most relevant nodes for any query using Personalized PageRank
- Trigger and poll OhWise Studio pipelines for multi-agent task execution
Pure Python. No LLM dependency for graph tools. Bring your own model.
Quick start
pip install ohwise-mcp[all]
Add to Claude Code
claude mcp add ohwise -- ohwise-mcp
Or manually in your Claude Code config (~/.claude.json or .mcp.json):
{
"mcpServers": {
"ohwise": {
"command": "ohwise-mcp",
"env": {
"OHWISE_URL": "https://your-ohwise-instance.com",
"OHWISE_TOKEN": "your-token-here"
}
}
}
}
OHWISE_URLandOHWISE_TOKENare only required for Studio pipeline tools. Graph tools work offline without them.
Tools
Code graph tools
| Tool | Description |
|---|---|
build_code_graph(repo_path, graph_type) |
Extract a knowledge graph from a code repository |
rank_code_nodes(query, graph_id, k) |
Rank nodes by relevance to a query — get focused code context |
search_code_graph(keyword, graph_id, kind_filter) |
Find nodes by keyword or kind (function, class, file, …) |
Graph types: all, call, entity, schema, workflow, infra, security, web, android, decision, folder
Document graph tools
| Tool | Description |
|---|---|
build_doc_graph(paths, graph_type) |
Extract a knowledge graph from documents (PDF, DOCX, MD, HTML, …) |
rank_doc_nodes(query, graph_id, k) |
Rank document nodes by relevance — get focused document context |
OhWise Studio tools (requires OHWISE_URL + OHWISE_TOKEN)
| Tool | Description |
|---|---|
start_pipeline(user_input, agent_ids) |
Trigger an OhWise coordinator pipeline |
get_pipeline_result(thread_id, poll_seconds) |
Poll a pipeline for results |
Example usage in Claude Code
Once configured, Claude Code can use graph context automatically:
> What does the authentication flow look like in this repo?
Claude Code calls build_code_graph → rank_code_nodes("authentication flow") → receives ranked nodes with call relationships and content snippets → answers with precise, relationship-aware context.
> Delegate this refactoring task to the OhWise pipeline and get back the plan
Claude Code calls start_pipeline → OhWise native agents run in parallel → Claude Code receives the synthesized result.
Installation variants
# Graph tools only (no OhWise backend needed)
pip install ohwise-mcp[code] # code graphs
pip install ohwise-mcp[docs] # document graphs
pip install ohwise-mcp[all] # both
# Core only (Studio pipeline tools work without graph extras)
pip install ohwise-mcp
Python API
The tools are also importable directly:
from ohwise_mcp.server import mcp
# Run as MCP server
mcp.run()
Design principles
- No LLM dependency — graph construction is pure static analysis
- Offline-first — code and document graph tools work without any server
- Composable — works standalone or alongside OhWise Studio
- Model-agnostic — any MCP-compatible agent can use these tools
Related projects
| Package | What it does |
|---|---|
| codebase2graph | Code repository → knowledge graph |
| docs2graph | Documents → knowledge graph |
| graph2sql | Schema graph → SQL context |
Contributing
git clone https://github.com/jw-open/ohwise-mcp
cd ohwise-mcp
pip install -e ".[dev]"
pytest tests/ -v
License
Apache-2.0 — see LICENSE
Metadata
Release files for ohwise-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ohwise_mcp-0.2.0.tar.gz | 23.0 kB | Without provenance | Details for ohwise_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ohwise_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for ohwise_mcp-0.2.0-py3-none-any.whl |
Total release size: 40.7 kB
Release files / ohwise_mcp-0.2.0.tar.gz
| Download URL | ohwise_mcp-0.2.0.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c68652e69d825808e2427662e20f818d7d5fac4ff416b8b5ec0f0316e83903f0
|
|
BLAKE2b-256 checksum How to use checksums |
406f6c6af6bd4954d6d7dff6439e94fa9abf1bf2dbf604ad005ee5c33d200883
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ohwise_mcp-0.2.0-py3-none-any.whl
| Download URL | ohwise_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e904b85ba01af1ebd5d55198575f50357f9f507f6853c851fbea2fed18a2581
|
|
BLAKE2b-256 checksum How to use checksums |
265eca3363ffd1efc0ec17e47aa6da9a74ffb5fcfe46485c0b6a300ff32de034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for ohwise-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.