Context7
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Description from the maker (original English)
Team experience database - let AI accumulate, retrieve and apply team knowledge across chats.
These three are never merged into one score: opinions, measurements and popularity are different things.
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
Pick the AI app you use, then copy the settings.
DATABASE_URL, TEAM_MEMORY_CONFIGValues marked secret are keys to your account. Never share them or paste them into a chat.
You need
Which app do you use?
Pick your app above. We remember it, so next time the button says “Install in …”.
Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json
{
"mcpServers": {
"team-memory": {
"command": "uvx",
"args": [
"team_memory"
],
"env": {
"DATABASE_URL": "your-value",
"TEAM_MEMORY_CONFIG": "your-value"
}
}
}
}Run this in your terminal
claude mcp add team-memory --env DATABASE_URL=your-value --env TEAM_MEMORY_CONFIG=your-value -- uvx team_memoryFill in the empty values before running it.
Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json
{
"mcpServers": {
"team-memory": {
"command": "uvx",
"args": [
"team_memory"
],
"env": {
"DATABASE_URL": "your-value",
"TEAM_MEMORY_CONFIG": "your-value"
}
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
Paste into .vscode/mcp.json in your project
{
"servers": {
"team-memory": {
"type": "stdio",
"command": "uvx",
"args": [
"team_memory"
],
"env": {
"DATABASE_URL": "your-value",
"TEAM_MEMORY_CONFIG": "your-value"
}
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.
Your choice stays on this device in a cookie; no account needed.
TEAM_MEMORY_CONFIG envThese settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 7, 2026
The registry name was verified with the GitHub account ysydhc, which owns the repo
We have not read this repo from GitHub yet
We have not read this repo from GitHub yet
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
You need to fill in: DATABASE_URL
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed –, and the latest version (0.1.2) reached the registry 8 months ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
In the same category: Context7, Codebase Memory, Exa
Servers in the same category from other makers, sorted by stars.
Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
mcp-name: io.github.ysydhc/team-memory
让 AI 拥有团队记忆 — 跨会话积累经验,像资深成员一样理解你的项目。
这是我学 AI 时萌生的一个想法。市面上已有类似产品,但总觉得不太贴合自己的使用习惯。做这个项目,既想通过和 AI 一起写代码来加深对大模型的理解,也希望能按自己的工作流,打磨出真正顺手的功能。
给 Agent / 贡献者:AGENTS.md · docs/README.md · MCP 实现 src/team_memory/server.py · 分层约束见 scripts/harness_import_check.py(LAYER_MAP)
用 Cursor、Claude 等 AI 助手写代码时,往往会遇到三个问题:
| 盲区 | 现象 |
|---|---|
| 无记忆 | 上周刚帮你修过的 Bug,这周遇到类似的,它完全不记得 |
| 只见代码,不懂决策 | 能看懂「是什么」,却不知道「为什么这么写」「上次踩过什么坑」 |
| 静态知识不够用 | Rules、Skills 管得了规范,管不住每天冒出来的隐性经验(接口坑、故障根因、被否掉的方案) |
TeamMemory 就是冲着这三个问题来的。 通过 MCP 把语义可搜索的经验库接进 AI:遇到问题自动查历史方案,解决后自动提炼并存下来,下次谁遇到同类问题,直接就能命中。既适合 3–10 人的技术团队共享,也适合部署在本地个人使用,配合 Cursor / Claude Desktop。
环境:Docker Desktop、Python 3.11+、Make
# 1. 初始化(Docker + 依赖 + 数据库)
make setup
export TEAM_MEMORY_API_KEY=$(openssl rand -hex 32) echo "API Key: $TEAM_MEMORY_API_KEY"
ollama pull qwen3-embedding:0.6b
make web
浏览器访问 http://localhost:9111 ,用上面的 API Key 登录即可。更完整的部署与用户流程见下文 按角色导航 与 快速开始。
除 MCP 外,所有 memory_* 工具也可通过 tm-cli 命令行调用:
# 搜索团队知识 / Search team knowledge
tm-cli recall --query "如何配置"
tm-cli save --title "Bug fix" --problem "连接超时" --solution "增加重试"
tm-cli context --file-paths "src/server.py"
tm-cli --help
# 显示当前生效配置及值来源 / Show effective config with source annotations
tm-cli config show
tm-cli config init
tm-cli setup --platform claude-code tm-cli setup --platform cursor tm-cli setup --platform hermes tm-cli setup --platform all
tm-cli setup --platform all --check
前提:make dev 启动服务 + TEAM_MEMORY_API_KEY 环境变量已设置(或已在 ~/.config/tm/config.toml 中配置)。
本仓库(克隆源码)推荐:不要把 API Key 写进 mcp.json。在仓库根维护 **.env(从 [example/env.team-memory.example](example/env.team-memory.example) 复制),其中至少设置 `TEAM_MEMORY_API_KEY`;MCP 配置为 `bash` + `scripts/run_mcp_with_dotenv.sh` + `cwd= 仓库根**。详见 [docs/guide/mcp-server.md](docs/guide/mcp-server.md)。**Cursor** 一般用 .cursor/mcp.json,**Claude Code** 可用根目录 .mcp.json`,两处内容建议保持一致。
项目名零配置:在项目根放置 .tm.toml(见 配置说明),或系统自动从 git 仓库名推断,无需传 --project 或设 TEAM_MEMORY_PROJECT。
仅 `pip install team_memory`、无本地仓库目录时,可在 .cursor/mcp.json 里用本机 Python 与环境变量(数据库与 Key 仍需提供):
{
"mcpServers": { "team_memory": { "command": "python3", "args": ["-m", "team_memory.server"], "env": { "TEAM_MEMORY_DB_URL": "postgresql+asyncpg://developer:devpass@localhost:5433/team_memory", "TEAM_MEMORY_API_KEY": "你的 API Key" } } } }
也可使用客户端配置 ~/.config/tm/config.toml(tm-cli config init 生成),避免在 JSON 中写入密钥。
(MCP 未注册 Resources / Prompts;**memory_* 七工具**:memory_save、memory_recall、memory_context、memory_get_archive、memory_archive_upsert、memory_feedback、memory_submit_response。详情见下文 MCP 工具列表(当前) 与 docs/guide/mcp-server.md。)
本机直连数据库时需要配 TEAM_MEMORY_DB_URL(或通过 config);从源码跑且项目里已有 config 的,可不单独设 DB_URL。
Web 内「架构」导航与 /api/v1/architecture/* 已移除(实现见 src/team_memory/web/static/js/pages.js)。若需要代码库图谱,请在本机单独使用 GitNexus(CLI / Bridge 等),与当前 TM Web 无集成。
| 角色 | 目标 | 入口 |
|---|---|---|
| 初次部署者 | 跑起 Web、拿到 API Key | 快速开始 → 一、初次部署者 |
| 初级使用者 | 在 Cursor/Claude 里接入 | 快速开始 → 二、初级使用者 |
| 贡献者 | 改代码、提 PR | 开发 |
安装与获取
pip install team_memory(推荐用于部署或本地 MCP 客户端)。AI 助手在项目中可用的知识分为三层,每一层解决不同的问题:
┌─────────────────────────────────────────────────────────┐
│ Rules / Skills(静态层) │ │ 已确定的规范和成熟的工作流,手动维护,变化频率低 │ │ 例:代码风格规范、部署流程、API 用法 │ ├─────────────────────────────────────────────────────────┤ │ TeamMemory(动态层) ← 本项目 │ │ 从日常开发中自动积累的团队经验,语义可搜索,持续演化 │ │ 例:Bug 根因分析、架构决策背景、接口的隐藏坑 │ ├─────────────────────────────────────────────────────────┤ │ 代码 + 文档(基础层) │ │ 项目源码和文档,AI 可直接读取 │ │ 例:函数定义、README、注释 │ └─────────────────────────────────────────────────────────┘
三层之间存在自然的知识生命周期:
日常开发会话
│ ▼ AI 自动提取经验 ──→ TeamMemory(动态积累) │ │ │ ▼ 模式稳定后 │ 固化为 Rules / Skills │ │ └──── 新问题 / 新变化 ←─┘
Rules/Skills 无法覆盖的知识,正是 TeamMemory 的价值所在:那些太碎、太多、变化太快,不适合写成规则,但恰恰是团队"老手"和"新手"之间最大差距的经验。
| 术语 | 说明 |
|---|---|
| 经验 | 单条问题-方案对,可被检索和复用 |
| 经验库 | 经验的集合 |
| scope | 作用域:global(全局)、team(团队)、personal(个人) |
| Embedding | 向量嵌入,用于语义搜索;配置项为 embedding |
| MCP | Model Context Protocol,让 AI 客户端调用 memory_recall、memory_save 等工具 |
AI 从对话和文档中自动提取结构化经验,无需手动录入:
**memory_save(content=...) 走 LLM 解析,从长对话中识别问题、方案、标签并写入(含质量门控);Web** 上亦支持粘贴文档或 URL 解析**group_key**(MCP / HTTP)将相关经验归组;复杂编排可在 Web 完成多层检索管线,确保 AI 找到最相关的历史方案:
config.tag_synonyms)、短查询自动降低 min_similarity(0.45);FTS 使用 simple 分词器 + jieba 中文分词 + hybrid AND/OR 策略(前 2 词 AND 保证精度,其余 OR 提升召回)summary 字段,LLM 可生成简短摘要;单条(POST /experiences/{id}/summarize)与批量(POST /experiences/batch-summarize)生成;MCP 搜索结果中每条经验可包含 summary,便于节省 Tokenuser_id 隔离;Lite 下由 **memory_save(..., content=...) 解析等路径可写入;`memory_context` 返回 `profile.static` / `profile.dynamic`(字符串列表)。Web 设置 → 用户画像 可分组查看、过滤 static/dynamic 并 删除** 错误条目(还可调 HTTP API profile_kind)。file_locations(路径 + 行范围,可选 snippet/file_mtime/file_content_hash);检索时可传 current_file_locations,与当前编辑位置匹配的经验会获得 location 加分,详见 src/team_memory/server.py 工具参数与 docs/guide/mcp-server.md。保存时可根据内容自动推荐经验类型(general/feature/bugfix/tech_design/incident/best_practice/learning),减少手动选择。
自动评估经验的活跃度和价值,让高质量经验脱颖而出:
memory_recall / Web 搜索管线)+2 分,获 4 星以上评价 +1 分不是随意堆放的笔记,而是有类型、有层级、有评分的经验体系:
多人共建共享的团队知识库:
project 参数隔离不同项目的经验,避免跨项目污染原生 MCP 协议支持,AI 助手通过 stdio 接入:
memory_context、memory_recall、memory_get_archive、memory_archive_upsert、memory_save、memory_feedback、memory_submit_response(见 MCP 工具列表)/docs HTTP API 为准旧文若仍写 **tm_* MCP 或任务看板等已下线能力,以 本文**、AGENTS.md 与 src/team_memory/server.py 为准。
后台守护进程,自动从 Obsidian vault 和 Agent 对话中采集经验:
tm-daemon(即 python -m team_memory.daemon),make daemon-start / make daemon-stop(launchd 托管),日志 /tmp/tm-daemon.logsrc/team_memory/daemon/(原 scripts/daemon/)基于 RAGAS 思路,用 LLM Judge 评估搜索结果是否被 Agent 真实使用:
make stats(Faithfulness 面板)、make faithfulness-eval --show 10、curl localhost:3901/status/faithfulness--model GLM-5-Turbo --base-url http://localhost:4000/v1从经验库自动编译知识 Wiki:
make wiki-compile、make entity-backfill、make detect-contradictions最小化上手成本:
make setup 一键完成全部安装以下从初次部署者(把 TeamMemory 跑起来的人)和初级使用者(在 Cursor/Claude 里连上已有服务的人)两种角色,按最小步骤说明。
| 依赖 | 确认方式 |
|---|---|
| Docker Desktop | docker --version |
| Python 3.11+ | python3 --version |
| Make | make --version(macOS/Linux 一般自带) |
| Ollama | ollama --version(首次 make web 前拉取模型用,见下) |
你是第一次在团队里部署,目标是:跑起 Web、拿到 API Key、并交给同事用。
1. 一键初始化
克隆仓库后,在项目根目录执行:
make setup
会完成:启动 Docker(PostgreSQL+pgvector、Ollama、Redis)、安装 Python 依赖、执行数据库迁移。成功时输出 ✔ Setup complete!。常见失败原因:Docker 未启动、5432/11434 端口被占用、pip 安装失败。
2. 改配置
默认使用仓库根目录 config.development.yaml。确认 database.url 与本地 Postgres 一致;auth.api_key 建议用环境变量注入:
设置环境变量作为管理员引导密钥(首次部署必须;勿提交 Git、勿明文写入配置文件):
export TEAM_MEMORY_API_KEY=$(openssl rand -hex 32)
echo "你的管理员 API Key: $TEAM_MEMORY_API_KEY"
首次登录
该 Key 仅在内存中生效(与 config 中的 auth.api_key 一样),重启服
Only the beginning is shown; read the rest in the repo