npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mtm-codebase-memory

v0.2.2

Published

DeepSeek Harness integration for codebase-memory-mcp

Readme

mtm-codebase-memory

A source-loadable DeepSeek Harness integration for the local codebase-memory-mcp runtime.

What it provides

The package exports a named Cordis plugin and a DSH profile bundle. Both paths use the same runtime implementation:

  • The plugin uses its package-owned npm CLI through the current Node binary only to provision the pinned package, then starts the cached native binary directly; neither npx nor CBM must be on PATH.
  • The pinned npm CLI provisions [email protected] on first use; the upstream wrapper verifies and caches the native runtime, including when lifecycle scripts are skipped.
  • The official @deepseek-ai/dsh-mcp-client remains responsible for MCP tool discovery, namespacing, reconnect, tool execution, and disposal.
  • The plugin maps CBM's graph-first instructions and documented explore/review workflows into DSH system-prompt assembly because the official bridge exposes MCP tools, not MCP prompts.
  • Session-start context and CBM hook-augment results are delivered through DSH's logged agent and tool-context paths. Hook failures are bounded and fail open.

The model-facing tool namespace defaults to mcp__codebase_memory__*.

Install

Install the bundle into the official local DSH web profile:

dsh plugin --profile web add mtm-codebase-memory

The bundle itself is installed into that profile; the native runtime is provisioned lazily by the package-owned npm CLI, so no global npx or codebase-memory-mcp command is required. A fresh DSH host is required after changing profile composition:

dsh --profile web --dump-config

The dump should contain a row named mtm-codebase-memory whose plugin name is also mtm-codebase-memory, not the old direct MCP-client row.

For a local checkout:

dsh plugin --profile web add /path/to/mtmdsh/packages/mtm-codebase-memory

Source composition

The package can be loaded without a profile patch when a custom local DSH composition owns its plugin list:

import * as CodebaseMemory from "mtm-codebase-memory";

await ctx.plugin(CodebaseMemory, {
  serverName: "codebase_memory",
});

The plugin requires the DSH systemPrompt and local subprocess services. Its nested official MCP client requires the normal DSH tools and model services.

Configuration

All fields are optional:

| Field | Default | Purpose | | --- | --- | --- | | serverName | codebase_memory | Stable MCP tool namespace | | command / args | package-owned npm exec | Override the local executable for a controlled test or installation | | cwd | DSH process cwd | Working directory for CBM and hook payloads | | env | empty | Explicit CBM environment entries | | cacheDir | unset | Sets CBM_CACHE_DIR | | allowedRoot | unset | Sets CBM_ALLOWED_ROOT | | ensureRuntime | true | Provision/resolve the native binary before MCP activation; false requires an offline cached runtime | | augmentHooks | true | Enable session and read/search context augmentation | | failOnStartupError | false | Use the official MCP client's startup failure policy | | toolCallTimeoutMs | 60000 | MCP tool-call timeout | | hookTimeoutMs | 2000 | Bounded hook-augment timeout | | runtimeCheckTimeoutMs | 120000 | Binary provisioning/version-check timeout |

The shipped cordis.patch.yml supplies only the stable namespace. To override a row in a profile patch, restate the complete plugin config because DSH patch layers replace, rather than deep-merge, a matched row.

Example:

- id: mtm-codebase-memory
  name: mtm-codebase-memory
  config:
    serverName: codebase_memory
    allowedRoot: !!js process.cwd()
    env:
      CBM_LOG_LEVEL: warn

Do not put credentials in the patch. DSH's subprocess and MCP layers apply their normal environment scrubbing; explicit values in env are intentional opt-ins.

Lifecycle behavior

The plugin owns the current DSH-side frontend connection through Cordis. The native CBM runtime continues to own its shared daemon, watcher, indexes, and cache lifecycle. The plugin registers graph-first instructions in DSH system-prompt assembly and may add bounded CBM lifecycle context on the first step. Search/read tool events are translated to CBM's documented hook payload and any returned context is attached through DSH's logged tools/post-execute additional-context contract.

The integration does not run CBM's global codebase-memory-mcp install command. That command edits other agent clients' configuration files; DSH profile composition is the authority for this integration. The package-owned npm CLI is invoked only for the pinned package and native runtime provisioning.

First use

In a fresh session:

  1. Call mcp__codebase_memory__list_projects or mcp__codebase_memory__index_status.
  2. If the workspace is not indexed, call mcp__codebase_memory__index_repository with its absolute repo_path.
  3. Discover exact symbols with search_graph before calling trace_path or get_code_snippet.
  4. Check has_more and use check_index_coverage before relying on negative or exhaustive conclusions.

Verify

From the repository root:

pnpm check:mtm-codebase-memory
pnpm --filter mtm-codebase-memory pack --pack-destination dist/npm
node scripts/verify-package.mjs packages/mtm-codebase-memory dist/npm/mtm-codebase-memory-0.2.2.tgz
pnpm run smoke:mtm-codebase-memory -- dist/npm/mtm-codebase-memory-0.2.2.tgz

Set DSH_SMOKE_TOOL_CATALOG=1 for the optional live-session assertion that checks mcp__codebase_memory__list_projects in the model tool catalog. This check requires a working DSH model route.

Scope

This package targets the official local Node DSH Web Harness. It does not provide a Cloudflare Worker or remote multi-tenant execution plane. The native CBM runtime must remain on the local execution host.