dsh-simple-codegraph: Production-Grade Single-Agent CodeGraph Integration for DeepSeek Harness

Introduction

In DeepSeek Harness (DSH), Agents often rely on numerous grep, glob, and read_file calls to reconstruct the structure of a codebase. This approach consumes expensive context and is inefficient. dsh-simple-codegraph aims to address this pain point by providing each DSH Agent with an isolated, project-scoped CodeGraph MCP connection, allowing Agents to obtain relevant source code, call hierarchies, and impact scope with a single centralized exploration call.

Plugin Overview

dsh-simple-codegraph is a DSH plugin maintained by QuantumKuba. It provides production-grade, agent-isolated CodeGraph integration and is released under the MIT license.

Core Features

  1. True Agent Isolation: Each active Agent receives a scoped CodeGraph MCP stdio process pinned to its own working directory.
  2. Concurrent Multi-Project Support: Multiple Agents can work concurrently in separate repositories with zero cross-project leakage.
  3. Single-Tool Philosophy: By default, only codegraph_explore is exposed to minimize schema overhead and eliminate tool-selection confusion.
  4. Zero-Configuration Bundling: Installed natively via dsh plugin add, with automatic upward discovery of the repository root (.codegraph/).
  5. Compression-Safe Architecture: CODEGRAPH_EXPLORE_DEDUP remains disabled, ensuring DSH context pruning does not invalidate subsequent model queries.
  6. First-Turn Handshake Guarantee: Tool prompts are preassembled, ensuring the MCP stdio handshake completes before first-turn prompt dispatch.

Installation and Prerequisites

Before installing the plugin, ensure that the CodeGraph CLI is installed and that the target project has been indexed.

  1. Check Installation
    codegraph --version
  1. Initialize the Project
    cd /path/to/my-project
    codegraph init
  1. Install the Plugin
    Add the plugin to the specified DSH profile (for example, web, coding, or the default profile):
    dsh plugin --profile web add dsh-simple-codegraph

Typical Usage

After installation, start DSH inside an indexed repository. The plugin automatically starts a CodeGraph MCP server for each Agent session and exposes mcp__codegraph__codegraph_explore in the first turn.

cd /path/to/my-project
dsh --profile web

Notes

  • Environment Requirement: The CodeGraph CLI must be installed first.
  • Model Optimization: The plugin is optimized for local 20B–30B models (for example, Qwen 2.5/3.x 27B/32B and DeepSeek distilled models). In resource-constrained environments, tool schemas consume valuable context, repeated file reads are slow, and unnecessary Agent loops can cause drift.
  • License: The plugin is released under the MIT license.

Summary

This plugin simplifies how Agents understand codebases by providing isolated MCP connections and a single-tool interface. Developers can enable it directly with standard DSH plugin commands, without manually configuring complex MCP connection parameters.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye