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.0.tar.gz (9.9 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.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ohwise_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 9.9 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.0.tar.gz
Algorithm Hash digest
SHA256 3aa571db9f62c05dd22ba55b964559eb0dba36525b82c1984237b10ae7930109
MD5 42a3a017f2fbd2ef3a462832fb0fa8af
BLAKE2b-256 0f16b1bece383e54c87523486d28bb74d07cb9d748b12ed6e4e42226078922ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ohwise_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbf1cacacace4c32bc4afa2fa7f6b3519a2d58d268d4506269396d4eb3376455
MD5 07422f4016ac0ef54a8b32c7e9027c3e
BLAKE2b-256 4bd52f1f6462581b423cba668c0e1965c0f36792ca1251a32eb7d6997a208be4

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