Preface

DeepSeek Harness (DSH) uses a plugin-based architecture. staavanothanh/dsh-cbm is an adapter plugin for integrating codebase-memory-mcp into the DSH environment. It leverages DSH’s native MCP client to connect to the executable via stdio and exposes the corresponding tools and lifecycle hooks to the Agent.

Core Features

  1. MCP Connection: Connects to the codebase-memory-mcp executable via stdio.
  2. Tool Exposure: Provides three MCP tools with the naming prefix mcp__codebase-memory__:
    - search_graph
    - trace_path
    - get_code_snippet
  3. Lifecycle Hooks: Registers the agent/session-start hook and injects a code exploration guide (similar in functionality to Codex’s SessionStart).

Configuration and Usage

Executable Path

The plugin searches for the codebase-memory-mcp executable in the following order:
1. The CBM_COMMAND environment variable.
2. codebase-memory-mcp (located in the system PATH).
3. ~/.local/bin/codebase-memory-mcp or .exe (on Windows systems).

To specify an absolute path, set it via the environment variable:

$env:CBM_COMMAND = 'C:\path\to\codebase-memory-mcp.exe'

Access Root Restriction

Setting CBM_ALLOWED_ROOT can restrict the access scope of index_repository. The plugin does not automatically set a default root, so the Agent can still index paths outside the Workspace.

Startup Fault Tolerance

Configuring failOnStartupError: false makes MCP connection errors non-fatal. If the initial connection handshake fails, the DSH MCP client waits until timeout before completing activation. It is recommended to ensure the executable is installed and available in the PATH before first use to avoid connection delays.

Development and Dependencies

  • Runtime: Node.js >= 22.19.0
  • Core Dependency: @deepseek-ai/dsh-mcp-client (^0.1.0-rc.7)
  • License: MIT

Notes

  • The plugin does not automatically set a root; permission control relies on environment variables.
  • For detailed documentation, see docs/README.md.