最近推送 2026-10-28 14:47(0 天前),属于活跃维护
DeusData/codebase-memory-mcp
GITHUB中文整理主语言 C · 47,712 星 · MIT · 创建于 2026-02-25
一个用 C 编写的本地代码智能 MCP 服务器,把代码、文档、配置与基础设施连成一张持久化知识图谱,供开发者和编码助手查询。
仓库健康度
5 个维度开放 Issue 637 个 · Fork 3,924 个
star 记录还不够天数,增量算不出来
许可证 MIT · 8 个 topics · 开了 Wiki
这一项暂无数据,不代表项目没有发布
「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。
Star 趋势
6 天记录横轴 2026-10-23 → 2026-10-28,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。
它解决什么问题
据 README 归纳大型仓库里功能分散在源码、文档、部署配置和 CI 脚本中,开发者定位陌生功能、追踪跨服务调用链或判断改动影响范围时只能反复搜索和读文件。没有它,编码助手缺少结构化上下文,容易遗漏相关代码,并消耗大量重复读取带来的 token。
核心能力
7 条- 1建立代码、文档与基础设施之间关系的本地持久化知识图谱
- 2提供符号、文本与语义三种搜索方式并附调用方和依赖信息
- 3把文档章节、PDF 文本页和架构决策关联到对应代码符号
- 4追踪 Docker、Kubernetes、Terraform 等部署配置到源码的关系
- 5对比索引快照并找出改动影响的符号和相关测试
- 6通过 MCP 向编码助手提供结构化上下文,也可从命令行直接查询图谱
- 7可选 CBM Lens 以可视化方式浏览架构图、调用路径和覆盖缺口
项目画像
6 个角度项目定位
一个用 C 编写的本地代码智能 MCP 服务器,把代码、文档、配置与基础设施连成一张持久化知识图谱,供开发者和编码助手查询。
适合谁
需要为编码助手补充仓库结构上下文的开发者,以及要在陌生或大型代码库中梳理功能位置、调用链和部署来源的工程团队。
典型场景
接手不熟悉的项目时,用图谱定位某个功能的实现位置、相关符号和依赖关系;在编码助手中查询跨服务的调用链,让助手基于结构化上下文修改代码;在改动前查看受影响的符号,并找出需要运行的关联测试;把部署配置和 CI 脚本追溯回对应源码,弄清上线流程与代码的对应关系
部署难度
需要安装该 MCP 服务器并接入编码客户端;索引和查询在本地完成,不依赖托管服务或 API 密钥,典型步骤包括安装、配置客户端集成、建立索引后查询。
风险限制
索引和图查询不需要托管服务或 API 密钥,但客户端集成支持程度因客户端而异;CBM Lens 处于公开测试阶段,版本为 v0.0.1。
最近维护
最近一次推送是 2026-10-28 14:47。 实现方式:原生 C 后端用自带的语法解析代码和文件格式,结合类型解析建立符号与关系索引,把结果存入本地持久化图谱;既通过 MCP 工具向客户端暴露查询能力,也提供命令行入口直接检索,索引在会话之间保留。
README 原文细节
2 个板块怎么安装从零跑起来的步骤
Quick Start
The standard native release includes CBM Lens. Start it after installation with codebase-memory-mcp daemon start --open --port=9749. The Nix packages and source builds also offer builds without the UI.
Options: --skip-config (binary only, no agent setup), --dir= (custom location).
The install command automatically strips macOS quarantine attributes and ad-hoc signs the binary; no manual xattr/codesign needed.
- Download the archive for your platform from the latest release:
- codebase-memory-mcp--.tar.gz (macOS/Linux) or .zip (Windows)
- Extract and install (each archive includes install.sh or install.ps1):
- Restart your coding agent.
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
Agent setup: skills, profiles, and hooks
Installation also equips supported coding agents to use the graph in daily work. The native install command detects clients and installs the integration pieces their documented formats support:
Hook augmentation is context-only and fail-open: it does not replace or block the requested tool call. Features vary by client and platform; some clients use durable instructions or a parent-agent handoff instead of hooks or direct subagent MCP access. Codex users review and trust installed hooks through /hooks. See Multi-Agent Support and Sessions, compaction, and subagents for exact support and activation requirements.
- MCP configuration — Connects the client to the local server and its tools.
- Instructions and skills — Explains graph-first exploration, index freshness, coverage checks, and when to read source.
- Scout, Verify, and Auditor profiles — Offers fast provisional lookup, task-directed verification, or bounded full verification, where custom agents are supported.
- Session and compaction hooks — Restores graph context at supported lifecycle events.
- Search and read hooks — Adds relevant graph context to supported searches and flags recorded coverage gaps after supported file reads.
Uninstall
Removes owned agent config entries, skills, hooks, instructions, and the installed binary. Existing graph indexes are listed and kept by default. -y/--yes, -n/--no, and noninteractive input keep them unless --delete-indexes is explicitly given. An interactive terminal without that flag is asked separately; the default answer is to keep them.
--delete-indexes is explicit consent and takes precedence over --no; --dry-run always preserves the files. When indexes are kept, uninstall prints their cache directory (${CBMCACHEDIR:-~/.cache/codebase-memory-mcp}) and how to remove them.
The install script placed beside the binary is reported, not deleted: uninstall prints its path and the rm command for it. It is left alone on purpose: it may be your own copy, a symlink into a checkout, or managed by a package manager, and an uninstaller should not delete a file it cannot prove it owns.
codebase-memory-mcp uninstall
Infrastructure and deployment
Ask "What deploys this service?", "Which image runs it?", or "Where does this configuration reach code?" CBM connects supported infrastructure forms to the source they build, configure, and run:
For resolvable inputs, a trace can follow Service → workload → image → Dockerfile → program, or follow deployment and configuration relationships. Use tracepath modes for topology, deployment, and run paths. These are static relationships from supported source forms; dynamic values and unresolved templates can leave gaps. See Edge types for the exact relationship rules and limitations.
- Containers and clusters: Dockerfiles, Compose services, Kubernetes resources, Helm charts and releases, and Kustomize overlays and patches.
- Provisioning and configuration: Terraform/OpenTofu resources and modules, tfvars overrides, Terragrunt dependencies, Ansible tasks and handlers, and supported configuration keys and environment-variab
- Build and delivery: shell commands, Make targets, and supported CI steps that build images, invoke repository scripts, or deploy resources.
Setup Scripts
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/scripts/setup.sh | bash
Install via Claude Code
You: "Install this MCP server: https://github.com/DeusData/codebase-memory-mcp"
实现原理它内部是怎么做的
How It Works
codebase-memory-mcp is a structural analysis backend: it builds and queries the knowledge graph. The backend does not require a generative model. It relies on your MCP client (Claude Code, or any MCP-compatible agent) to be the intelligence layer.
With MCP, your coding agent translates a question into tool calls. CBM Lens can also use an optional browser model for explanations; this does not change how the backend indexes or queries code.
关于 codebase-memory-mcp 的常见问题
7 个问题codebase-memory-mcp 是做什么的?
一个用 C 编写的本地代码智能 MCP 服务器,把代码、文档、配置与基础设施连成一张持久化知识图谱,供开发者和编码助手查询。 大型仓库里功能分散在源码、文档、部署配置和 CI 脚本中,开发者定位陌生功能、追踪跨服务调用链或判断改动影响范围时只能反复搜索和读文件。没有它,编码助手缺少结构化上下文,容易遗漏相关代码,并消耗大量重复读取带来的 token。
codebase-memory-mcp 有哪些功能?
核心能力:建立代码、文档与基础设施之间关系的本地持久化知识图谱;提供符号、文本与语义三种搜索方式并附调用方和依赖信息;把文档章节、PDF 文本页和架构决策关联到对应代码符号;追踪 Docker、Kubernetes、Terraform 等部署配置到源码的关系;对比索引快照并找出改动影响的符号和相关测试;通过 MCP 向编码助手提供结构化上下文,也可从命令行直接查询图谱;可选 CBM Lens 以可视化方式浏览架构图、调用路径和覆盖缺口。
codebase-memory-mcp 适合谁用?
需要为编码助手补充仓库结构上下文的开发者,以及要在陌生或大型代码库中梳理功能位置、调用链和部署来源的工程团队。
codebase-memory-mcp 是怎么工作的?
原生 C 后端用自带的语法解析代码和文件格式,结合类型解析建立符号与关系索引,把结果存入本地持久化图谱;既通过 MCP 工具向客户端暴露查询能力,也提供命令行入口直接检索,索引在会话之间保留。
怎么安装 codebase-memory-mcp?
按项目 README 的说明:Download the archive for your platform from the latest release:;codebase-memory-mcp--.tar.gz (macOS/Linux) or .zip (Windows);Extract and install (each archive includes install.sh or install.ps1):;Restart your coding agent.。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。
用 codebase-memory-mcp 有什么门槛或限制?
索引和图查询不需要托管服务或 API 密钥,但客户端集成支持程度因客户端而异;CBM Lens 处于公开测试阶段,版本为 v0.0.1。
codebase-memory-mcp 现在还在维护吗?数据怎么样?
目前 47,712 星,3,924 个 Fork,主语言 C,创建于 2026-02-25,最近一次推送 2026-10-28 14:47,许可证 MIT。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。
这些内容来自哪
读法说明项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-10-23 17:52。
