codebase-memory-mcp-intelligence
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecodebase-memory-mcp Intelligence
codebase-memory-mcp 代码智能
Overview
概述
codebase-memory-mcp is a high-performance code intelligence MCP server that indexes codebases into persistent knowledge graphs. It parses 155 languages using tree-sitter ASTs, resolves call graphs, detects HTTP routes, and enables sub-millisecond structural queries. The Linux kernel (28M LOC) indexes in 3 minutes; average repos in milliseconds.
Key capabilities:
- Graph-based code intelligence: Functions, classes, calls, imports, inheritance as queryable nodes/edges
- Structural search: Find symbols by pattern, trace call chains, detect dead code
- Architecture analysis: Community detection, hotspots, layering, cross-service HTTP linking
- Semantic search: Vector search with bundled embeddings (no API key required)
- 155 languages: Tree-sitter grammars compiled into a single static binary
- 14 MCP tools: All accessible via natural language in any compatible agent
codebase-memory-mcp 是一个高性能代码智能 MCP 服务器,可将代码库索引为持久化知识图谱。它使用 tree-sitter AST 解析 155 种语言,解析调用图、检测 HTTP 路由,并支持亚毫秒级结构化查询。Linux 内核(2800 万行代码)可在 3 分钟内完成索引;普通仓库仅需数毫秒。
主要功能:
- 基于图谱的代码智能:将函数、类、调用、导入和继承关系表示为可查询的节点/边
- 结构化搜索:按模式查找符号、追踪调用链、检测死代码
- 架构分析:社区检测、热点分析、分层分析、跨服务 HTTP 关联
- 语义搜索:使用内置 embeddings 进行向量搜索(无需 API key)
- 155 种语言:将 Tree-sitter grammars 编译为单一静态二进制文件
- 14 个 MCP 工具:任何兼容的 agent 均可通过自然语言使用全部工具
Installation
安装
Quick Install (macOS/Linux)
快速安装(macOS/Linux)
bash
undefinedbash
undefinedStandard version
Standard version
With graph visualization UI
With graph visualization UI
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui
undefinedcurl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui
undefinedWindows (PowerShell)
Windows(PowerShell)
powershell
Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1
.\install.ps1powershell
Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1
.\install.ps1Manual Installation
手动安装
Extract and run installer
Extract and run installer
tar xzf codebase-memory-mcp-*.tar.gz
./install.sh
The installer auto-detects Claude Code, Cursor, Codex CLI, Gemini CLI, Zed, OpenCode, Aider, VS Code, and other agents, configuring MCP entries automatically.tar xzf codebase-memory-mcp-*.tar.gz
./install.sh
安装程序会自动检测 Claude Code、Cursor、Codex CLI、Gemini CLI、Zed、OpenCode、Aider、VS Code 和其他 agent,并自动配置 MCP 条目。Verify Installation
验证安装
bash
codebase-memory-mcp --versionRestart your coding agent after installation.
bash
codebase-memory-mcp --version安装后,请重启你的 coding agent。
Core Usage Patterns
核心使用模式
Indexing a Codebase
索引代码库
Via agent (recommended):
User: Index this projectThe MCP server will call with the current working directory.
index_repositoryVia CLI:
bash
codebase-memory-mcp index /path/to/repoEnable auto-indexing:
bash
codebase-memory-mcp config set auto_index true
codebase-memory-mcp config set auto_index_limit 50000Auto-index runs on MCP session start for new projects and registers existing projects with the background file watcher.
通过 agent(推荐):
User: Index this projectMCP 服务器将使用当前工作目录调用 。
index_repository通过 CLI:
bash
codebase-memory-mcp index /path/to/repo启用自动索引:
bash
codebase-memory-mcp config set auto_index true
codebase-memory-mcp config set auto_index_limit 50000自动索引会在 MCP 会话启动时为新项目运行,并将现有项目注册到后台文件监视器。
Architecture Overview
架构概览
Get a complete architectural summary in one call:
User: Show me the architecture of this codebaseThis invokes which returns:
get_architecture- Languages and package structure
- Entry points (main functions, HTTP handlers)
- HTTP/gRPC/GraphQL routes
- Hotspot functions (high in/out degree)
- Module boundaries via Louvain clustering
- Layering analysis (presentation/business/data)
Example response structure:
json
{
"languages": ["TypeScript", "Python", "Go"],
"packages": ["src/api", "src/services", "src/models"],
"entry_points": [
{"name": "main", "file": "src/index.ts", "type": "Function"}
],
"routes": [
{"path": "/api/users", "method": "GET", "handler": "getUsers", "file": "src/api/users.ts"}
],
"hotspots": [
{"name": "processRequest", "in_degree": 15, "out_degree": 8, "file": "src/services/request.ts"}
],
"boundaries": [
{"module": "Community_0", "members": ["src/api/*"], "internal_edges": 45, "external_edges": 12}
]
}通过一次调用获取完整的架构摘要:
User: Show me the architecture of this codebase这将调用 ,并返回:
get_architecture- 语言和包结构
- 入口点(main 函数、HTTP 处理器)
- HTTP/gRPC/GraphQL 路由
- 热点函数(高入度/出度)
- 通过 Louvain 聚类识别模块边界
- 分层分析(展示层/业务层/数据层)
示例响应结构:
json
{
"languages": ["TypeScript", "Python", "Go"],
"packages": ["src/api", "src/services", "src/models"],
"entry_points": [
{"name": "main", "file": "src/index.ts", "type": "Function"}
],
"routes": [
{"path": "/api/users", "method": "GET", "handler": "getUsers", "file": "src/api/users.ts"}
],
"hotspots": [
{"name": "processRequest", "in_degree": 15, "out_degree": 8, "file": "src/services/request.ts"}
],
"boundaries": [
{"module": "Community_0", "members": ["src/api/*"], "internal_edges": 45, "external_edges": 12}
]
}Searching the Graph
搜索图谱
Find symbols by name pattern:
User: Find all functions with "Handler" in the nameUses :
search_graphjson
{
"name_pattern": ".*Handler.*",
"labels": ["Function"]
}Find high-degree nodes:
User: Show me the most called functionsjson
{
"labels": ["Function"],
"min_in_degree": 5,
"limit": 20
}Scope to specific files:
User: Find all classes in the auth modulejson
{
"labels": ["Class"],
"file_pattern": ".*/auth/.*"
}按名称模式查找符号:
User: Find all functions with "Handler" in the name使用 :
search_graphjson
{
"name_pattern": ".*Handler.*",
"labels": ["Function"]
}查找高连接度节点:
User: Show me the most called functionsjson
{
"labels": ["Function"],
"min_in_degree": 5,
"limit": 20
}限定到特定文件:
User: Find all classes in the auth modulejson
{
"labels": ["Class"],
"file_pattern": ".*/auth/.*"
}Call Tracing
调用追踪
Find all callers:
User: What calls the authenticate function?Uses :
get_callersjson
{
"symbol_name": "authenticate",
"max_depth": 3
}Trace call chain:
User: Trace the execution path from main to database functionsUses :
trace_symboljson
{
"symbol_name": "main",
"direction": "outgoing",
"max_depth": 5,
"edge_types": ["CALLS"]
}查找所有调用方:
User: What calls the authenticate function?使用 :
get_callersjson
{
"symbol_name": "authenticate",
"max_depth": 3
}追踪调用链:
User: Trace the execution path from main to database functions使用 :
trace_symboljson
{
"symbol_name": "main",
"direction": "outgoing",
"max_depth": 5,
"edge_types": ["CALLS"]
}Semantic Search
语义搜索
Find related code by concept:
User: Find authentication-related functionsUses :
semantic_queryjson
{
"query": "authentication jwt token validation",
"limit": 10
}Semantic search uses bundled Nomic embeddings (no API key required) with 11-signal scoring:
- TF-IDF relevance
- AST structural similarity
- API signature matching
- Data flow patterns
- MinHash near-clone detection
按概念查找相关代码:
User: Find authentication-related functions使用 :
semantic_queryjson
{
"query": "authentication jwt token validation",
"limit": 10
}语义搜索使用内置的 Nomic embeddings(无需 API key),并采用 11 项信号评分:
- TF-IDF 相关性
- AST 结构相似度
- API 签名匹配
- 数据流模式
- MinHash 近似克隆检测
Cypher-Like Queries
类 Cypher 查询
Advanced graph queries:
User: Run a Cypher query to find all functions that call database operationsUses :
cypher_querycypher
MATCH (f:Function)-[:CALLS]->(db:Function)
WHERE db.name CONTAINS 'query' OR db.name CONTAINS 'exec'
RETURN f.name, f.file, COUNT(db) as db_calls
ORDER BY db_calls DESC
LIMIT 20Find inheritance hierarchies:
cypher
MATCH (c:Class)-[:INHERITS*1..3]->(base:Class)
WHERE base.name = 'BaseModel'
RETURN c.name, c.fileHTTP route to implementation:
cypher
MATCH (r:Route)-[:HANDLED_BY]->(h:Function)-[:CALLS]->(s:Function)
WHERE r.path CONTAINS '/api/users'
RETURN r.path, h.name, COLLECT(s.name) as services高级图查询:
User: Run a Cypher query to find all functions that call database operations使用 :
cypher_querycypher
MATCH (f:Function)-[:CALLS]->(db:Function)
WHERE db.name CONTAINS 'query' OR db.name CONTAINS 'exec'
RETURN f.name, f.file, COUNT(db) as db_calls
ORDER BY db_calls DESC
LIMIT 20查找继承层次结构:
cypher
MATCH (c:Class)-[:INHERITS*1..3]->(base:Class)
WHERE base.name = 'BaseModel'
RETURN c.name, c.file从 HTTP 路由到实现的映射:
cypher
MATCH (r:Route)-[:HANDLED_BY]->(h:Function)-[:CALLS]->(s:Function)
WHERE r.path CONTAINS '/api/users'
RETURN r.path, h.name, COLLECT(s.name) as servicesDead Code Detection
死代码检测
User: Find unused functionsUses :
find_dead_codejson
{
"entry_points": ["main", "handler"],
"min_depth": 2
}Returns functions with zero incoming edges, excluding recognized entry points (main, init, handlers, tests).
CALLSUser: Find unused functions使用 :
find_dead_codejson
{
"entry_points": ["main", "handler"],
"min_depth": 2
}返回没有任何传入 边的函数,并排除已识别的入口点(main、init、handlers、tests)。
CALLSChange Impact Analysis
变更影响分析
Detect impact of uncommitted changes:
User: What's affected by my recent changes?Uses :
detect_changesjson
{
"include_tests": true
}Returns:
- Changed symbols with confidence scores
- Affected downstream symbols (via call graph)
- Risk classification (CRITICAL/HIGH/MEDIUM/LOW)
- Test coverage mapping
Example response:
json
{
"changed_symbols": [
{
"name": "authenticate",
"type": "Function",
"file": "src/auth.ts",
"confidence": 0.95,
"change_type": "modified"
}
],
"affected_symbols": [
{
"name": "loginHandler",
"type": "Function",
"file": "src/handlers/login.ts",
"distance": 1,
"risk": "HIGH"
}
]
}检测未提交更改的影响:
User: What's affected by my recent changes?使用 :
detect_changesjson
{
"include_tests": true
}返回:
- 发生更改的符号及其置信度分数
- 受影响的下游符号(通过调用图确定)
- 风险分类(CRITICAL/HIGH/MEDIUM/LOW)
- 测试覆盖映射
示例响应:
json
{
"changed_symbols": [
{
"name": "authenticate",
"type": "Function",
"file": "src/auth.ts",
"confidence": 0.95,
"change_type": "modified"
}
],
"affected_symbols": [
{
"name": "loginHandler",
"type": "Function",
"file": "src/handlers/login.ts",
"distance": 1,
"risk": "HIGH"
}
]
}Architecture Decision Records (ADR)
架构决策记录(ADR)
Create ADR:
User: Document our decision to use Redis for session storageUses :
manage_adrjson
{
"action": "create",
"title": "Use Redis for Session Storage",
"status": "accepted",
"context": "Need fast, distributed session management",
"decision": "Adopt Redis with session TTL and clustering",
"consequences": "Requires Redis infrastructure; enables horizontal scaling"
}List ADRs:
User: Show all architecture decisionsjson
{
"action": "list"
}Update ADR:
json
{
"action": "update",
"id": "ADR-001",
"status": "superseded"
}创建 ADR:
User: Document our decision to use Redis for session storage使用 :
manage_adrjson
{
"action": "create",
"title": "Use Redis for Session Storage",
"status": "accepted",
"context": "Need fast, distributed session management",
"decision": "Adopt Redis with session TTL and clustering",
"consequences": "Requires Redis infrastructure; enables horizontal scaling"
}列出 ADR:
User: Show all architecture decisionsjson
{
"action": "list"
}更新 ADR:
json
{
"action": "update",
"id": "ADR-001",
"status": "superseded"
}Cross-Service Analysis
跨服务分析
Find HTTP call sites:
User: Show all external API callsUses with HTTP edge filters:
search_graphjson
{
"edge_types": ["HTTP_CALLS"],
"labels": ["Function"]
}Trace cross-service dependencies:
cypher
MATCH (f:Function)-[:HTTP_CALLS]->(r:Route)
RETURN f.name, f.file, r.path, r.method查找 HTTP 调用点:
User: Show all external API calls使用带有 HTTP 边筛选条件的 :
search_graphjson
{
"edge_types": ["HTTP_CALLS"],
"labels": ["Function"]
}追踪跨服务依赖:
cypher
MATCH (f:Function)-[:HTTP_CALLS]->(r:Route)
RETURN f.name, f.file, r.path, r.methodConfiguration
配置
View Current Config
查看当前配置
bash
codebase-memory-mcp config listbash
codebase-memory-mcp config listKey Settings
关键设置
bash
undefinedbash
undefinedAuto-index on session start
Auto-index on session start
codebase-memory-mcp config set auto_index true
codebase-memory-mcp config set auto_index true
File limit for auto-indexing
File limit for auto-indexing
codebase-memory-mcp config set auto_index_limit 50000
codebase-memory-mcp config set auto_index_limit 50000
Enable background file watcher
Enable background file watcher
codebase-memory-mcp config set watch true
codebase-memory-mcp config set watch true
Embedding model (default: nomic-embed-code)
Embedding model (default: nomic-embed-code)
codebase-memory-mcp config set embedding_model nomic-embed-code
codebase-memory-mcp config set embedding_model nomic-embed-code
Graph visualization port
Graph visualization port
codebase-memory-mcp config set ui_port 9749
undefinedcodebase-memory-mcp config set ui_port 9749
undefinedIgnore Patterns
忽略规则
Create in your repo root (gitignore syntax):
.cbmignorenode_modules/
*.test.ts
dist/
build/
*.min.js
vendor/Default ignores: , , , , , ,
node_modules.gitdistbuildvendor.venv__pycache__在仓库根目录创建 (使用 gitignore 语法):
.cbmignorenode_modules/
*.test.ts
dist/
build/
*.min.js
vendor/默认忽略:、、、、、、
node_modules.gitdistbuildvendor.venv__pycache__Advanced Features
高级功能
Graph Visualization UI
图谱可视化 UI
Launch with UI enabled:
bash
codebase-memory-mcp --ui=true --port=9749Open for 3D interactive graph exploration.
http://localhost:9749Features:
- Force-directed layout with community coloring
- Filter by label, file, package
- Click nodes to see properties and edges
- Multi-galaxy layout for cross-repo graphs
启用 UI 后启动:
bash
codebase-memory-mcp --ui=true --port=9749打开 ,进行 3D 交互式图谱浏览。
http://localhost:9749功能包括:
- 采用社区着色的力导向布局
- 按节点标签、文件和包筛选
- 点击节点查看属性和边
- 面向跨仓库图谱的多星系布局
Team-Shared Graph Artifact
团队共享图谱产物
Commit compressed graph to avoid reindexing:
bash
undefined提交压缩后的图谱,避免重复索引:
bash
undefinedAfter indexing, compress the graph
After indexing, compress the graph
codebase-memory-mcp export --output=.codebase-memory/graph.db.zst
codebase-memory-mcp export --output=.codebase-memory/graph.db.zst
Commit to repo
Commit to repo
git add .codebase-memory/graph.db.zst
git commit -m "Add codebase graph snapshot"
Teammates run:
```bash
codebase-memory-mcp import --input=.codebase-memory/graph.db.zstgit add .codebase-memory/graph.db.zst
git commit -m "Add codebase graph snapshot"
团队成员运行:
```bash
codebase-memory-mcp import --input=.codebase-memory/graph.db.zstCLI Mode
CLI 模式
Use without MCP for scripting:
bash
undefined无需 MCP 即可编写脚本:
bash
undefinedSearch
Search
codebase-memory-mcp cli search_graph '{"name_pattern": ".*Service$", "labels": ["Class"]}'
codebase-memory-mcp cli search_graph '{"name_pattern": ".*Service$", "labels": ["Class"]}'
Cypher query
Cypher query
codebase-memory-mcp cli cypher_query 'MATCH (f:Function) WHERE f.name = "main" RETURN f'
codebase-memory-mcp cli cypher_query 'MATCH (f:Function) WHERE f.name = "main" RETURN f'
Get architecture
Get architecture
codebase-memory-mcp cli get_architecture '{}'
codebase-memory-mcp cli get_architecture '{}'
Semantic search
Semantic search
codebase-memory-mcp cli semantic_query '{"query": "database connection pooling", "limit": 5}'
undefinedcodebase-memory-mcp cli semantic_query '{"query": "database connection pooling", "limit": 5}'
undefinedLanguage-Specific Features
各语言专属功能
Go:
- Package resolution via
go.mod - Interface implementation detection
- Struct method resolution
TypeScript/JavaScript:
- JSX component tracing
- Type inference from JSDoc
- Import alias resolution
- Decorator detection
Python:
- Class hierarchy via
INHERITS - Decorator-based route detection (Flask, FastAPI)
- Import resolution via ,
pyproject.tomlsetup.py
C/C++:
- Header/implementation linking
- Preprocessor-aware parsing
- Template instantiation tracking
Go:
- 通过 解析包
go.mod - 检测接口实现
- 解析结构体方法
TypeScript/JavaScript:
- 追踪 JSX 组件
- 基于 JSDoc 进行类型推断
- 解析导入别名
- 检测装饰器
Python:
- 通过 获取类层次结构
INHERITS - 基于装饰器的路由检测(Flask、FastAPI)
- 通过 、
pyproject.toml解析导入setup.py
C/C++:
- 关联头文件与实现
- 感知预处理器的解析
- 跟踪模板实例化
Infrastructure-as-Code
基础设施即代码
Kubernetes manifests:
User: Show all Kubernetes resourcesjson
{
"labels": ["Resource"],
"properties": {"kind": "Deployment"}
}Kustomize overlays:
cypher
MATCH (overlay:Module)-[:IMPORTS]->(base:Resource)
WHERE overlay.type = 'kustomize'
RETURN overlay.name, COLLECT(base.name) as resourcesDockerfile analysis:
User: Find all services using Node 18json
{
"labels": ["Dockerfile"],
"code_pattern": "FROM node:18"
}Kubernetes 清单:
User: Show all Kubernetes resourcesjson
{
"labels": ["Resource"],
"properties": {"kind": "Deployment"}
}Kustomize 覆盖层:
cypher
MATCH (overlay:Module)-[:IMPORTS]->(base:Resource)
WHERE overlay.type = 'kustomize'
RETURN overlay.name, COLLECT(base.name) as resourcesDockerfile 分析:
User: Find all services using Node 18json
{
"labels": ["Dockerfile"],
"code_pattern": "FROM node:18"
}Troubleshooting
故障排除
Indexing Issues
索引问题
Large repos timing out:
bash
undefined大型仓库索引超时:
bash
undefinedIncrease memory limit (default: 8GB)
Increase memory limit (default: 8GB)
codebase-memory-mcp config set max_memory_gb 16
codebase-memory-mcp config set max_memory_gb 16
Skip large files
Skip large files
codebase-memory-mcp config set max_file_size_mb 5
**Missing symbols:**
- Check `.cbmignore` — ensure source files aren't excluded
- Verify language support: `codebase-memory-mcp --languages`
- Re-index: `codebase-memory-mcp index --force /path/to/repo`
**Slow queries:**
```bashcodebase-memory-mcp config set max_file_size_mb 5
**符号缺失:**
- 检查 `.cbmignore`,确保源文件未被排除
- 验证语言支持情况:`codebase-memory-mcp --languages`
- 重新索引:`codebase-memory-mcp index --force /path/to/repo`
**查询缓慢:**
```bashRebuild indexes
Rebuild indexes
codebase-memory-mcp cli vacuum
codebase-memory-mcp cli vacuum
Check database size
Check database size
ls -lh ~/.cache/codebase-memory-mcp/graph.db
undefinedls -lh ~/.cache/codebase-memory-mcp/graph.db
undefinedMCP Connection Issues
MCP 连接问题
Agent can't find server:
- Verify installation:
which codebase-memory-mcp - Check agent config:
codebase-memory-mcp config verify - Restart agent completely
- Check logs:
~/.cache/codebase-memory-mcp/logs/
Tools not appearing:
bash
undefinedAgent 找不到服务器:
- 验证安装:
which codebase-memory-mcp - 检查 agent 配置:
codebase-memory-mcp config verify - 完整重启 agent
- 查看日志:
~/.cache/codebase-memory-mcp/logs/
工具未出现:
bash
undefinedReinstall agent configs
Reinstall agent configs
codebase-memory-mcp install --force
codebase-memory-mcp install --force
Verify MCP registration
Verify MCP registration
codebase-memory-mcp config show-mcp-config
undefinedcodebase-memory-mcp config show-mcp-config
undefinedPerformance
性能
High memory usage during indexing:
- Normal for large repos (Linux kernel uses ~6GB peak)
- Memory released after indexing completes
- Use flag to cap usage
--max-memory-gb
Slow semantic search:
bash
undefined索引期间内存占用过高:
- 对于大型仓库属于正常现象(Linux 内核峰值约占用 6GB)
- 索引完成后会释放内存
- 使用 参数限制用量
--max-memory-gb
语义搜索缓慢:
bash
undefinedRebuild embeddings index
Rebuild embeddings index
codebase-memory-mcp cli rebuild_embeddings
codebase-memory-mcp cli rebuild_embeddings
Reduce result limit
Reduce result limit
codebase-memory-mcp config set semantic_limit 10
undefinedcodebase-memory-mcp config set semantic_limit 10
undefinedFile Watcher
文件监视器
Changes not detected:
bash
undefined未检测到更改:
bash
undefinedCheck watcher status
Check watcher status
codebase-memory-mcp status
codebase-memory-mcp status
Restart watcher
Restart watcher
codebase-memory-mcp watch restart
codebase-memory-mcp watch restart
Increase file watch limit (Linux)
Increase file watch limit (Linux)
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
undefinedecho fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
undefinedCommon Workflows
常见工作流
Onboarding to New Codebase
熟悉新代码库
1. "Index this project"
2. "Show me the architecture"
3. "What are the entry points?"
4. "Find the main HTTP routes"
5. "Show me the most important functions" (hotspots)1. "Index this project"
2. "Show me the architecture"
3. "What are the entry points?"
4. "Find the main HTTP routes"
5. "Show me the most important functions" (hotspots)Refactoring
重构
1. "Find all callers of [function]"
2. "What's affected by my changes?" (after editing)
3. "Show me the call chain from [entry] to [target]"
4. "Find dead code"1. "Find all callers of [function]"
2. "What's affected by my changes?" (after editing)
3. "Show me the call chain from [entry] to [target]"
4. "Find dead code"Debugging
调试
1. "Trace execution from [function]"
2. "What calls this endpoint?" (for HTTP routes)
3. "Find similar functions to [name]"
4. "Show data flow through [function]"1. "Trace execution from [function]"
2. "What calls this endpoint?" (for HTTP routes)
3. "Find similar functions to [name]"
4. "Show data flow through [function]"Cross-Service Analysis
跨服务分析
1. "Find all external API calls"
2. "Show services that depend on [service]"
3. "Map HTTP routes to implementations"
4. "Find pub-sub channels across repos"1. "Find all external API calls"
2. "Show services that depend on [service]"
3. "Map HTTP routes to implementations"
4. "Find pub-sub channels across repos"MCP Tools Reference
MCP 工具参考
| Tool | Purpose |
|---|---|
| Index codebase into knowledge graph |
| Structural search by pattern, label, degree |
| Graph-augmented grep |
| Vector search with bundled embeddings |
| Full architectural summary |
| Find all callers of a symbol |
| Trace call chains (in/out) |
| Advanced graph queries |
| Detect unused functions |
| Git diff impact analysis |
| Architecture Decision Records |
| Context for specific symbols |
| All HTTP/gRPC/GraphQL routes |
| Cross-service dependency graph |
| 工具 | 用途 |
|---|---|
| 将代码库索引到知识图谱 |
| 按模式、标签和度数进行结构化搜索 |
| 图谱增强的 grep |
| 使用内置 embeddings 进行向量搜索 |
| 获取完整的架构摘要 |
| 查找符号的所有调用方 |
| 追踪调用链(入向/出向) |
| 执行高级图查询 |
| 检测未使用的函数 |
| Git diff 影响分析 |
| 管理架构决策记录 |
| 获取特定符号的上下文 |
| 列出所有 HTTP/gRPC/GraphQL 路由 |
| 构建跨服务依赖图 |
Updates
更新
bash
undefinedbash
undefinedCheck for updates
Check for updates
codebase-memory-mcp update
codebase-memory-mcp update
Auto-update check on startup (default: enabled)
Auto-update check on startup (default: enabled)
codebase-memory-mcp config set check_updates true
The server notifies on first tool call if a new release is available.codebase-memory-mcp config set check_updates true
如果有新版本可用,服务器会在首次调用工具时发出通知。Uninstall
卸载
bash
undefinedbash
undefinedRemove all agent configs and binary
Remove all agent configs and binary
codebase-memory-mcp uninstall
codebase-memory-mcp uninstall
Keep database (default)
Keep database (default)
Or remove database too:
Or remove database too:
rm -rf ~/.cache/codebase-memory-mcp/
undefinedrm -rf ~/.cache/codebase-memory-mcp/
undefined