关于 Tribal
Tribal 是面向软件开发的个人知识上下文引擎,供需要检索开发经验的编码 Agent 使用。它记录调试心得、经验法则和决策依据,并通过 MCP 提供检索。
主要功能
- 01记录开发经验和调试心得
- 02保存经验法则与决策依据
- 03供编码 Agent 检索知识
- 04通过 stdio 运行 MCP 服务
适用场景
- 01回忆工程决策背后的原因
- 02处理新问题时查找过往调试心得
- 03检索有用的开发经验法则
MCP 相关
通过使用 stdio 传输的 MCP 服务,让编码 Agent 检索已记录的开发知识。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
mcp.json · 通用配置
启动命令
docker run -i --rm -e TRIBAL_DATABASE__URL -e TRIBAL_PROJECT_REMOTE -e TRIBAL_PROJECT_NAME -e TRIBAL_SERVER__TRANSPORT -e TRIBAL_SERVER__BIND_ADDRESS -e TRIBAL_PUBLIC_MCP_URL -e OPENAI_API_KEY -e ANTHROPIC_API_KEY ghcr.io/tribal-memory/tribal:0.4.1需要配置的环境变量
TRIBAL_DATABASE__URLPostgres (pgvector) connection string. Tribal is self-hosted; you provide the database. The supported, complete deployment is docker-compose.yml.TRIBAL_PROJECT_REMOTEFirst-run only: the git remote that identifies the project bootstrapped on first start.TRIBAL_PROJECT_NAMEFirst-run only: the name of the project bootstrapped on first start.TRIBAL_SERVER__TRANSPORTContainerised transport: http or sse. The Docker image does not serve stdio; install the binary for stdio.TRIBAL_SERVER__BIND_ADDRESSAddress the server binds inside the container. Must be 0.0.0.0 (not the loopback default) for the published port to be reachable.TRIBAL_PUBLIC_MCP_URLThe URL clients use to reach the server (for example http://127.0.0.1:8725/mcp). Needed for OAuth dynamic client registration once the server binds a routable interface.OPENAI_API_KEY密钥Optional; only if an ingest or retrieval stage is configured to use OpenAI (defaults target a local Ollama).ANTHROPIC_API_KEY密钥Optional; only if a stage is configured to use Anthropic.本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。
安装包
oci
ghcr.io/tribal-memory/tribal:0.4.1Streamable HTTP工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Tribal
面向软件开发的个人知识上下文引擎。Tribal 会捕获开发工作中的经验、调试见解、启发式方法和决策依据,然后通过 MCP(Model Context Protocol)让编码 Agent 检索这些知识。
前置要求
- Rust(stable 工具链,1.89+)
- Rust nightly(用于 rustfmt —
rustup toolchain install nightly) - Docker(用于本地 Postgres 和测试容器)
- just —
cargo install just - sqlx-cli —
cargo install sqlx-cli --no-default-features --features postgres - cargo-deny —
cargo install cargo-deny
设置
git clone [email protected]:samfolo/tribal.git
cd tribal
just db-up
just db-migrate
just check
just test
运行
# Run the MCP server (stdio transport)
just serve
# Run with a specific project
just serve-project <project_id>
开发
# Format code (requires nightly rustfmt)
just fmt
# Lint and format check
just check
# Run all tests
just test
# Run unit tests only (no database required)
just test-unit
# Full pre-push check (format, lint, test)
just pre-push
# Regenerate sqlx offline query metadata
just sqlx-prepare
许可证
MIT
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。