dsh-graphify connects DeepSeek Harness to Graphify: a local knowledge graph with architecture queries, dependency paths, communities, and pull-request impact analysis.
The plugin uses the receiving DSH session’s project directory. It does not assume that the DSH host process started in the project, so one interactive DSH process can safely serve several workspaces.
Install Graphify with its MCP extra. The extra is required for python -m graphify.serve.
uv tool install 'graphifyy[mcp]'
pnpm add dsh-graphifyBuild the first graph from the project root:
graphify .Add the bundle to a DSH patch:
- insert:
- id: dsh-graphify
name: dsh-graphify
config:
cwd: /absolute/path/to/projectcwd is optional when the DSH session already has a project cwd or Graphify can find graphify-out/graph.json from the DSH startup directory. Set it when configuring a process-wide plugin for a fixed project.
The direct human command is available only in interactive DSH adapters that compose ctx.commands. A headless dsh invocation treats /graphify as model input; use normal Graphify CLI commands when running headless.
In DSH Web, the package's browser companion renders the submitted /graphify line and DSH's durable result card. Both successful output and failures remain visible after reload because they are reconstructed from command/run and command/done session events.
/graphify build the receiving session’s project
/graphify build ../another-project
/graphify update incrementally rebuild changed code
/graphify update . --force
The command accepts one path plus --force, --no-cluster, --code-only, or --no-viz. Graph questions belong in model tools, not the slash command.
The plugin exposes Graphify’s native MCP tools:
query_graph,get_node,get_neighbors,get_community,god_nodes,graph_stats, andshortest_pathlist_prs,get_pr_impact, andtriage_prs
It also exposes three compatibility tools:
graphify_capabilitieslists the installed server’s tools and resources.graphify_callinvokes a newly added Graphify MCP tool before this package releases a dedicated DSH schema.graphify_resourcereads Graphify resources such asgraphify://report, graph statistics, confidence audit, and suggested questions.
Every native tool supplies project_path automatically from the calling agent’s session cwd. An explicit project_path always wins.
You do not need to start python -m graphify.serve separately. The plugin starts and owns an MCP subprocess when an agent first calls a Graphify tool. The /graphify command is independent of that MCP subprocess and invokes the Graphify CLI directly.
The default command: auto first checks for an installed graphify-mcp executable or the interpreter behind an installed graphify command. If Graphify is not installed, it uses uv run --with graphifyy[mcp]. The installed runtime is preferred so a working deployment does not download a different Graphify version at every DSH startup.
| Setting | Default | Meaning |
|---|---|---|
command |
auto |
MCP server executable. Configure this with args for a custom server runtime. |
args |
[] |
Arguments for a configured MCP server executable. |
graphifyVersion |
unset | Version used only by the uv fallback, for example 0.9.57. |
cliCommand |
unset | Executable used for /graphify; defaults to the installed graphify command. |
cliArgs |
[] |
Arguments placed before the Graphify build or update operation. |
graphPath |
unset | Explicit graph.json path. |
cwd |
unset | Fixed fallback project directory. |
autoDetect |
true |
Search ancestors for graphify-out/graph.json. |
enablePromptSection |
true |
Tell the model when to use Graphify. |
timeoutMs |
60000 |
Per-MCP-operation timeout in milliseconds. |
toolPrefix |
'' |
Prefix every registered tool name. |
For example, a pinned custom Python runtime is configured as follows:
config:
command: /opt/graphify/bin/python
args: ['-m', 'graphify.serve']
cliCommand: /opt/graphify/bin/graphifyThe plugin preserves the environment passed by DSH. This is necessary for Graphify’s GitHub PR tools to use GH_TOKEN or GITHUB_TOKEN. Configure credentials through DSH’s credential mechanism; do not put secrets in the patch file.
There are two independent update loops:
- Keep graph data current with
graphify hook installandgraphify update .after code changes. Graphify also providesgraphify watch <path>for a long-running local watcher. - Keep the Graphify runtime current with
uv tool upgrade graphifyyfollowed bygraphify hook installwhen hooks are used. Useuv tool install --reinstall 'graphifyy[mcp]'if the MCP extra was not originally installed.
This repository runs a weekly scheduled GitHub Actions contract test against the latest graphifyy[mcp]. It verifies MCP initialization, the core tool list, and Graphify resources before a release is made. Production deployments can pin graphifyVersion while qualifying a new version, then upgrade deliberately.
pnpm run typecheck
pnpm run build
pnpm testUnit tests use a local fake MCP server and never require Graphify, a network connection, or a user cache. Run the upstream compatibility contract after installing graphifyy[mcp]:
GRAPHIFY_E2E=1 pnpm run test:e2e