The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building agents that need a deep understanding of a codebase, how to efficiently retrieve symbols, trace call chains, or obtain an architecture overview is a common pain point. @lovedolove/dsh-codebase-memory-mcp is a standalone Codebase Memory MCP bridge plugin that injects the capabilities of Codebase Memory MCP into DSH’s toolchain.

The plugin is maintained by LoveDoLove, registers six knowledge-graph-based code tools, and automatically launches the backend service and visualization interface when the plugin loads. It also includes a set of agent skills and status-check commands.

Core Features

The plugin mainly performs the following:

  1. Tool registration: Registers six knowledge graph tools in the DSH tool registry for code search, snippet reading, architecture overview, and call chain tracing.
  2. Auto-start: Automatically starts the codebase-memory-mcp daemon and its graphical Web UI when the plugin is loaded.
  3. System prompt injection: Injects the “Codebase Memory — Knowledge Graph Policy” into the model, guiding it on when to prefer graph tools over traditional grep or read.
  4. Agent skill: Bundles an agent skill named codebase-memory, which can be loaded through the skill tool.
  5. Slash command: Registers the /cbm command for querying the executable path, Web UI link, and indexed projects.
  6. Cross-platform detection: Supports cross-platform executable detection, including CBM_EXE environment variable override, system directories, PATH, and WSL interoperability.

Prerequisites

Before installing the plugin, ensure the following environment is ready:

  • DeepSeek Harness: The version must satisfy >=0.1.2-rc.1 <0.3.0-0.
  • Node.js: The version must satisfy >=18 <25.
  • Executable file: The codebase-memory-mcp executable must be installed in advance. The plugin detects this binary only when loading; if it is not found, the daemon will not start and the tools will not be registered.

Installation

Use the official command to install the plugin into a specified DSH Profile (for example, web):

dsh plugin --profile web add @lovedolove/dsh-codebase-memory-mcp

After installation, DSH automatically activates the Bundle. If a dependency is missing (such as @deepseek-ai/dsh-commands), the plugin handles it with graceful degradation and retains only the core tools injection feature.

Typical Usage

After the plugin is installed and started, the agent or user can directly invoke the corresponding tools or commands.

Tool Invocation Examples

  1. Confirm indexing status
    First call cbm_projects() to confirm that the current project has been correctly indexed.

  2. Search symbols
    Use cbm_search to find symbols by name or path:

    cbm_search(name_pattern=".*auth.*")
  1. Trace call chains
    Find callers and callees of a function, with a maximum depth:
    cbm_trace(symbol="login", direction="both", max_depth=3)
  1. Read snippets
    Retrieve precise code definitions without loading the entire file:
    cbm_snippet(qualified_name="app.auth.login")
  1. Architecture overview
    Get the component structure under a specific directory:
    cbm_arch(directory="src")

Status Check

Use the /cbm command to check the service status:

  • Displays the executable path.
  • Displays the Web UI access link (default port 9749).
  • Lists the currently indexed projects.

If the executable is not found, the command prompts you to install it or set the CBM_EXE environment variable.

Notes

The plugin runs as a Bridge plugin, and its core logic depends on the upstream codebase-memory-mcp project. It is recommended to review the source code and license (MIT) before installation. The plugin is cross-platform, but on Windows, pay attention to binary path resolution and compatibility with WSL environments.