Tribal

السجل الرسمي البيانات وقواعدها

Self-hosted semantic memory over MCP for an engineering team's tacit knowledge. Needs Postgres.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

OCI package ghcr.io/tribal-memory/tribal:0.4.1
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
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "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>"
            }
        }
    }
}

متغيرات البيئة

  • 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__TRANSPORT Containerised transport: http or sse. The Docker image does not serve stdio; install the binary for stdio.
  • TRIBAL_SERVER__BIND_ADDRESS Address 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_URL The 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.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Tribal
  2. Prerequisites
  3. Setup
  4. Running
  5. Development
  6. Licence

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

الأسئلة الشائعة

ما هو Tribal؟

Self-hosted semantic memory over MCP for an engineering team's tacit knowledge. Needs Postgres.

كيف أثبّت Tribal؟

يعمل على جهازك. في 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. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Tribal إلى مفتاح API؟

نعم. يتطلب TRIBAL_DATABASE__URL, TRIBAL_PROJECT_REMOTE, TRIBAL_PROJECT_NAME, OPENAI_API_KEY, ANTHROPIC_API_KEY، وتضبطها في إعداداته.

هل Tribal مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون Tribal؟

ينشره tribal-memory. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.