Skip to main content

MCP server connecting AI coding agents to graph-native code context and multi-agent pipelines.

Project description

ohwise-mcp

PyPI version Python License

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_URL and OHWISE_TOKEN are 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_graphrank_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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ohwise_mcp-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ohwise_mcp-0.1.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file ohwise_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: ohwise_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ohwise_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 46d8c7c72ca20bdca9ddf27dc246a4662de33161786f2f1f6d97832bec99f980
MD5 fd7f8a2b5a7e804d51fd2be6fad62178
BLAKE2b-256 bfaafbeebf4c5254e47f97a0506e66a11c6c9eff46f64f7273f43ca1935d89be

See more details on using hashes here.

File details

Details for the file ohwise_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ohwise_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ohwise_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 333c9b3f3916cfbae16c6a015e8a7f94390b8ca89346bf7126e1a4047d6b31ab
MD5 a9215a17fdde8e7d6934e9ed9e47e021
BLAKE2b-256 d289a4711ef42fa08555707f79af34d7b3746d6fa08fba3b4c4b762d60aa21fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page