Tribal
Self-hosted semantic memory over MCP for an engineering team's tacit knowledge. Needs Postgres.
Install
Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).
ghcr.io/tribal-memory/tribal:0.4.1claude mcp add tribal -e 'TRIBAL_DATABASE__URL=<TRIBAL_DATABASE__URL>' -e 'TRIBAL_PROJECT_REMOTE=<TRIBAL_PROJECT_REMOTE>' -e 'TRIBAL_PROJECT_NAME=<TRIBAL_PROJECT_NAME>' -e 'TRIBAL_SERVER__TRANSPORT=http' -e 'TRIBAL_SERVER__BIND_ADDRESS=0.0.0.0:8725' -e 'TRIBAL_PUBLIC_MCP_URL=http://127.0.0.1:8725/mcp' -e 'OPENAI_API_KEY=<your openai_api_key>' -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- docker run -i --rm ghcr.io/tribal-memory/tribal:0.4.1
{
"mcpServers": {
"tribal": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/tribal-memory/tribal:0.4.1"
],
"env": {
"TRIBAL_DATABASE__URL": "<TRIBAL_DATABASE__URL>",
"TRIBAL_PROJECT_REMOTE": "<TRIBAL_PROJECT_REMOTE>",
"TRIBAL_PROJECT_NAME": "<TRIBAL_PROJECT_NAME>",
"TRIBAL_SERVER__TRANSPORT": "http",
"TRIBAL_SERVER__BIND_ADDRESS": "0.0.0.0:8725",
"TRIBAL_PUBLIC_MCP_URL": "http://127.0.0.1:8725/mcp",
"OPENAI_API_KEY": "<your openai_api_key>",
"ANTHROPIC_API_KEY": "<your anthropic_api_key>"
}
}
}
}
Environment variables
TRIBAL_DATABASE__URLrequired Postgres (pgvector) connection string. Tribal is self-hosted; you provide the database. The supported, complete deployment is docker-compose.yml.TRIBAL_PROJECT_REMOTErequired First-run only: the git remote that identifies the project bootstrapped on first start.TRIBAL_PROJECT_NAMErequired First-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_KEYsecret Optional; only if an ingest or retrieval stage is configured to use OpenAI (defaults target a local Ollama).ANTHROPIC_API_KEYsecret Optional; only if a stage is configured to use Anthropic.
Documentation
From the project's README on GitHub, refreshed weekly. Links open on GitHub.
Tribal
A personal knowledge context engine for software development. Tribal captures learnings, debugging insights, heuristics, and decision rationale from development work, then makes that knowledge retrievable by coding agents via MCP (Model Context Protocol).
Prerequisites
- Rust (stable toolchain, 1.89+)
- Rust nightly (for rustfmt —
rustup toolchain install nightly) - Docker (for local Postgres and test containers)
- just —
cargo install just - sqlx-cli —
cargo install sqlx-cli --no-default-features --features postgres - cargo-deny —
cargo install cargo-deny
Setup
git clone git@github.com:samfolo/tribal.git
cd tribal
just db-up
just db-migrate
just check
just test
Running
# Run the MCP server (stdio transport)
just serve
# Run with a specific project
just serve-project <project_id>
Development
# 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
Licence
MIT
Frequently asked questions
What is Tribal?
Self-hosted semantic memory over MCP for an engineering team's tacit knowledge. Needs Postgres.
How do I install Tribal?
It runs on your machine. In Claude Code: claude mcp add tribal -e 'TRIBAL_DATABASE__URL=<TRIBAL_DATABASE__URL>' -e 'TRIBAL_PROJECT_REMOTE=<TRIBAL_PROJECT_REMOTE>' -e 'TRIBAL_PROJECT_NAME=<TRIBAL_PROJECT_NAME>' -e 'TRIBAL_SERVER__TRANSPORT=http' -e 'TRIBAL_SERVER__BIND_ADDRESS=0.0.0.0:8725' -e 'TRIBAL_PUBLIC_MCP_URL=http://127.0.0.1:8725/mcp' -e 'OPENAI_API_KEY=<your openai_api_key>' -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- docker run -i --rm ghcr.io/tribal-memory/tribal:0.4.1. For other clients, paste the JSON configuration from this page into their MCP settings.
Does Tribal need an API key?
Yes. It expects TRIBAL_DATABASE__URL, TRIBAL_PROJECT_REMOTE, TRIBAL_PROJECT_NAME, OPENAI_API_KEY, ANTHROPIC_API_KEY, which you set in its configuration.
Is Tribal open source?
Its code is public on GitHub, but the repository does not declare a standard license.
Who maintains Tribal?
It is published by tribal-memory. AI.tn lists it but does not maintain or endorse it.
From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.