中文 MCP 工具栈,为 Claude Code / Cursor 提供代码上下文与团队记忆服务
Server has 6 tools with complete Pydantic input schemas and detailed Chinese descriptions. Naming follows verb_noun convention (index_codebase, search_code_context, add_team_memory, etc.). Descriptions are comprehensive (200-400 chars) with usage guidance and examples. However, output schemas are not formally documented, responses are free-text strings rather than structured objects. Error handling is minimal (no recovery guidance, no error categorization). Parameters lack validation constraints (e.g., top_k has min/max in schema but no enum for tags). No tool annotations (readOnlyHint, destructiveHint) despite clear risk levels (WRITE, DESTRUCTIVE operations present).
新增一条团队记忆或架构决策记录。 当需要记录团队的架构决策、技术选型、项目规范、重要讨论结论时使用此工具。适合场景:团队做出了一个值得记录的技术决定、确定了项目规范、需要沉淀经验教训。记录后可通过项目名称或标签检索回溯。
删除一条团队记忆记录。 当需要清除过时、错误或不再适用的决策记录时使用此工具。适合场景:某条决策已被推翻需要移除、记录内容有误需要删除后重新添加。⚠️ 删除操作不可逆,请确认 memory_id 正确后再调用。
查询指定项目的全部团队记忆与决策记录。 当需要回顾某项目的历史架构决策、技术规范、过往结论时使用此工具。适合场景:新成员加入项目需要了解历史决策、需要确认某项目的技术选型、开发前查阅项目已有的规范和约定。结果按更新时间倒序排列。
索引指定目录下的代码库,将代码文件切块并向量化存入数据库。 ⚠️ 这是一个高耗能操作:会递归遍历整个目录、读取所有支持的代码文件(.py/.js/.ts/.md)、进行文本切块和向量计算,可能耗时数分钟(取决于代码库大小)。 调用时机: - 首次接入一个新项目,需要建立代码库索引时 - 代码库发生重大变更(如大范围重构),需要更新全量索引时 不应在以下场景调用: - 只需查找某段代码(请用 search_code_context) - 频繁调用(索引完成后无需重复执行) - 代码仅做了少量修改(除非需要全量重建索引) 索引完成后,即可通过 search_code_context 进行语义检索。
根据自然语言描述,在已索引的代码库中语义检索最相关的代码片段。 这是日常开发中最常用的工具——通过自然语言描述你想要理解的代码逻辑,它会返回最相关的代码片段及其来源(文件路径 + 行号),帮助你快速定位代码。 典型使用场景: - 理解代码逻辑:「用户登录的认证流程是怎样的?」 - 查找功能实现:「处理支付回调的函数在哪里?」 - 定位 bug 相关代码:「文件上传失败时做了什么处理?」 - 了解架构设计:「路由是在哪里注册的?」 - 寻找配置来源:「Redis 连接参数是从哪里读取的?」 返回结果包含:代码片段内容、来源文件路径、起始行号。你可以根据 file_path 和 start_line 直接跳转到对应位置查看完整上下文。
Output schemas not documented. All tools return free-text strings instead of structured JSON objects. LLMs cannot parse results reliably or chain downstream tool calls. E.g., search_code_context returns markdown-formatted text; should return {results: [{file_path, start_line, content}], total_count}.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Tools marked WRITE and DESTRUCTIVE in metadata but not exposed to LLM via MCP schema. LLM cannot reason about side effects or retry safety.
Minimal error handling. No recovery guidance, error categorization, or actionable messages. E.g., 'code repository not indexed' returns a generic message; should suggest 'Call index_codebase(dir_path) first' with the expected directory path.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
按标签关键词搜索团队记忆。 当需要跨项目查找某类决策时使用此工具。例如:想知道团队在所有项目中关于"数据库"的决策、查找"性能"相关的优化记录、检索"安全"相关的规范。适合场景:跨项目横向检索、模糊回忆"好像之前讨论过某个话题"时定位记录。
tags parameter in add_team_memory is free-form string (comma-separated). Should be an array of enum values or constrained string pattern to prevent invalid tags and enable LLM to pick from known options.
delete_team_memory lacks confirmation/dry-run pattern. Destructive operation with no undo. Should support a confirm_before_execute pattern or require explicit confirmation parameter to prevent accidental deletion.