
Tribal is a self-hosted semantic memory layer for capturing engineering knowledge that doesn't make it into code or tickets. It runs as an MCP server backed by Postgres with pgvector, ingests text on demand, and exposes a graph of items connected by support, contradiction, or refinement relationships. Your agent can query the graph, traverse connections, and rate retrieval quality through standard MCP tools. Bootstrap it inside a git repository and it registers the project, mints bearer tokens, and emits the config snippet your harness needs. Works with local Ollama or cloud providers for embeddings and inference. Reach for it when your team has tacit knowledge worth preserving beyond the immediate context of a ticket or sprint.
Sponsors
TRIBAL_DATABASE__URL*Postgres (pgvector) connection string. Tribal is self-hosted; you provide the database. The supported, complete deployment is docker-compose.yml.
TRIBAL_PROJECT_REMOTE*First-run only: the git remote that identifies the project bootstrapped on first start.
TRIBAL_PROJECT_NAME*First-run only: the name of the project bootstrapped on first start.
TRIBAL_SERVER__TRANSPORTdefault: httpContainerised transport: http or sse. The Docker image does not serve stdio; install the binary for stdio.
TRIBAL_SERVER__BIND_ADDRESSdefault: 0.0.0.0:8725Address 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_URLdefault: http://127.0.0.1:8725/mcpThe 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_KEYsecretOptional; only if an ingest or retrieval stage is configured to use OpenAI (defaults target a local Ollama).
ANTHROPIC_API_KEYsecretOptional; only if a stage is configured to use Anthropic.
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).
rustup toolchain install nightly)cargo install justcargo install sqlx-cli --no-default-features --features postgrescargo install cargo-denygit clone git@github.com: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
ghcr.io/tribal-memory/tribal:0.3.1