@lovedolove/dsh-codebase-memory-mcp
Codebase Memory MCP bridge for DeepSeek Harness: six knowledge-graph code tools, auto-started background daemon with visualization Web UI, and bundled agent skill.
Install
dsh plugin --profile web add @lovedolove/dsh-codebase-memory-mcp
Sandbox test results
| Stage | Result |
|---|---|
| 1 install | ✓ |
| 2 list | ✓ |
| 3 mount | ✓ |
| 4 boot | — |
Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).
README
@lovedolove/dsh-codebase-memory-mcp
Standalone Codebase Memory MCP bridge plugin and library for DeepSeek
Harness (DSH). Registers six knowledge-graph code tools, manages a lazily
started codebase-memory-mcp daemon with its graph-visualization Web UI, and
ships a bundled agent skill plus a /cbm status command.




Features
- Six knowledge-graph code tools registered on the DSH tool surface:
cbm_projects, cbm_search, cbm_snippet, cbm_arch, cbm_trace, and
cbm_search_code.
- Lazy daemon and Web UI — the plugin does not start the daemon while it is
loading. The shared client spawns codebase-memory-mcp --ui=true --port=9749
as a child process over stdio JSON-RPC 2.0 the first time a tool call or
/cbm needs it. If the child exits, the next request starts it again; the
client disposes it when the plugin shuts down.
- System-prompt guidance — injects a *Codebase Memory — Knowledge Graph
Policy* section that tells the model when to prefer the graph tools over
grep/read.
- Bundled agent skill — [
skills/codebase-memory/SKILL.md](skills/codebase-memory/SKILL.md)
is registered as a native bundled skill provider (codebase-memory, rank 600,
model- and user-invocable), so the model-facing skill tool can load it.
/cbmslash command — reports the resolved executable path, the Web UI
link, and the projects currently indexed in the daemon.
- Graceful degradation — only
toolsis a hard dependency
(inject: ['tools']); systemPrompt, skills, and commands are attached via
deferred ctx.inject(), so a missing host service simply skips that feature.
The six tools are registered even when the executable is absent; calls return
a degraded result instead of failing to load the plugin.
- Cross-platform executable detection —
CBM_EXEand
CODEBASE_MEMORY_EXE overrides, user and system directories, current working
directory, PATH, and a WSL interop fallback that locates
codebase-memory-mcp.exe reachable from Linux/WSL.
- Reusable library API — the package exports the MCP client, indexing engine,
repository discovery, sanitization, watcher, tool definitions, and type
constants, so the bridge can be used without the DSH plugin layer.
Requirements
Component · Version
DeepSeek Harness · >=0.1.2-rc.1 <0.3.0-0 (dsh.compatibility.dshVersions)
Node.js · >=18 <25 (engines)
codebase-memory-mcp executable · any recent release
Optional peer dependencies (declared in peerDependencies, resolved from the DSH
runtime when present): @deepseek-ai/cordis >=4.0.1-rc.1 <5.0.0-0, and
@deepseek-ai/dsh-commands, @deepseek-ai/dsh-skill,
@deepseek-ai/dsh-system-prompt, @deepseek-ai/dsh-tools >=0.1.2-rc.1 <0.3.0-0.
The executable is required for queries, not for loading the plugin. The
plugin registers the cbm_* tools at load time. If no executable is found,
tool calls return a degraded result and /cbm prints an installation hint.
The executable path is resolved when the shared client is constructed, so after
installing the binary you must reload the DSH profile for the plugin to find it.
Installation
1. Install the codebase-memory-mcp executable
The plugin is only a bridge — code indexing and querying are done by the
codebase-memory-mcp runtime (upstream project,
# Installs the CLI and downloads/caches the native runtime for your platform npm install -g codebase-memory-mcp # Verify it runs codebase-memory-mcp --version
Alternatively, download your platform's release binary and place it in one of
the locations the plugin searches:
~/.local/bin/codebase-memory-mcp(Linux/macOS user bin)/usr/local/bin/or/usr/bin/(system directories)- the current working directory, or anywhere on
PATH %USERPROFILE%\AppData\Local\Programs\codebase-memory-mcp\codebase-memory-mcp.exe(Windows)
Or point the plugin at it explicitly with CBM_EXE=/path/to/codebase-memory-mcp
(or CODEBASE_MEMORY_EXE).
2. Install the plugin into a DSH profile
dsh plugin --profile web add @lovedolove/dsh-codebase-memory-mcp
(replace web with your profile name — web, headless, sdk, acp, …)
This forwards the package install into the profile directory. Because the
package declares dsh.bundle.patch, DSH automatically activates the bundle
by appending @lovedolove/dsh-codebase-memory-mcp to the profile's
dsh.profile.bundles list.
Other ways to install:
- Web sidebar → Plugins page: search for the package and install it there
(the plugin_manager tool exposes the same operations in Creator mode).
- Manual wiring: add the package to the profile's
dependenciesin
$DSH_HOME/profiles/<name>/package.json and list it under
dsh.profile.bundles, then run a package install in that directory. The
shipped bundle patch ([cordis.patch.yml](cordis.patch.yml), declared as
dsh.bundle.patch) then mounts the plugin:
- insert:
- id: codebase-memory
name: '@lovedolove/dsh-codebase-memory-mcp'
3. Start DSH
On plugin load you will see the tool registration log:
[codebase-memory] registered tools: cbm_projects, cbm_search, cbm_snippet, cbm_arc …(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::7,最后更新 2026-11-03