{
  "markdown": "# mcp-crewd-rs\n\n[![CI](https://img.shields.io/github/actions/workflow/status/DioNanos/mcp-crewd-rs/ci.yml?branch=main&style=flat-square&logo=githubactions&logoColor=white&label=CI)](https://github.com/DioNanos/mcp-crewd-rs/actions/workflows/ci.yml)\n[![Tests](https://img.shields.io/badge/tests-214%20passing-2ea44f?style=flat-square)](https://github.com/DioNanos/mcp-crewd-rs/actions/workflows/ci.yml)\n[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square)](LICENSE)\n[![Rust](https://img.shields.io/badge/rust-1.85%2B-orange?style=flat-square&logo=rust)](https://www.rust-lang.org)\n[![MCP Registry](https://img.shields.io/badge/MCP-registry-111827?style=flat-square)](https://registry.modelcontextprotocol.io/v0/servers?search=crewd)\n\n**crewd** is a cell fabric daemon for AI agents: it lets one AI session\n(Claude Code, Codex CLI, or any MCP client) spawn, coordinate and message\nother AI worker sessions — *cells* — through a single MCP server. Rust,\none static binary per component, no network listener: everything runs over\na local Unix socket.\n\nPart of the `mcp-*-rs` family of Rust MCP servers.\n\n```\n┌────────────┐  MCP stdio   ┌──────┐   UDS (NDJSON)   ┌───────┐  spawns   ┌─────────────────┐\n│ Claude Code│─────────────▶│ crew │─────────────────▶│ crewd │──────────▶│ engine processes│\n│ / Codex CLI│  cell_* tools│ shim │  0600 socket     │daemon │           │ claude / codex  │\n└────────────┘              └──────┘                  └───────┘           │ / pi workers    │\n                                                                          └─────────────────┘\n```\n\n## Components\n\n| Binary | Role |\n|--------|------|\n| `crewd` | Daemon: cell registry, job scheduler, engine supervisor, message bus, SQLite (WAL) store, append-only hash-chained audit log |\n| `crew`  | Operator CLI (`status`, `inspect`, `audit verify`) + per-cell MCP stdio shim (`crew mcp`) |\n\n## MCP tools\n\nMounted per-cell via `crew mcp`:\n\n- **Fabric** — `cell_spawn` (launch a worker cell: engine + profile + task),\n  `cell_send_task`, `cell_status`, `cell_result`, `cell_cancel`, `cell_list`\n- **Bus** — `cell_send` (fire-and-forget), `cell_ask` / `cell_await`\n  (ask ticket + long-poll reply), `cell_reply`, `cell_broadcast`, `cell_inbox`\n\nWorker cells get the same shim with `--worker-mode`, which hides the spawn\nsurface (no uncontrolled nested fan-out).\n\n## Engines\n\n| Engine | How | Session continuity |\n|--------|-----|--------------------|\n| `claude` | Node shim on the Claude Agent SDK (`shim/claude-shim.mjs`) | resume by session id |\n| `codex`  | `codex app-server` JSON-RPC (v2 protocol) | reattach by thread id |\n| `pi`     | pi rpc | none (v0) |\n\nClaude profiles select where the engine gets its credentials. `max` (the\ndefault) uses the host's own Claude credentials and needs no extra config.\nAdditional profiles route the engine to an **Anthropic-compatible endpoint**,\nreading that profile's bearer token from `keys_env_path` (never from\n`crewd.toml`, argv or logs); the built-in ones are defined in the engine-claude\nadapter.\n\nA cell's identity is its **working directory**: the spawned engine loads\nwhatever `CLAUDE.md`, `.mcp.json`, memory and skills live in the `cwd` you\npass to `cell_spawn`. One daemon can therefore serve several \"personas\" by\nspawning cells in different project roots.\n\n## Install\n\n**Prebuilt binaries** (recommended) — download the archive for your platform\nfrom the [latest release](https://github.com/DioNanos/mcp-crewd-rs/releases/latest)\nand extract; it contains `crewd`, `crew` and the `shim/` directory:\n\n```bash\ntar xzf mcp-crewd-rs-x86_64-unknown-linux-gnu.tar.gz\ninstall -m755 mcp-crewd-rs-*/crewd mcp-crewd-rs-*/crew ~/.local/bin/\n```\n\nPrebuilt targets (Linux + Android): `x86_64-unknown-linux-gnu`,\n`x86_64-unknown-linux-musl`, `aarch64-unknown-linux-gnu`,\n`aarch64-unknown-linux-musl` (edge / ARM), `aarch64-linux-android` (Termux).\n\n**macOS**: no prebuilt binary is shipped (it would need Apple code-signing).\nBuild from source instead — macOS is CI-tested (peer auth uses\n`getpeereid` + `LOCAL_PEERPID` there instead of `SO_PEERCRED`):\n\n```bash\ngit clone https://github.com/DioNanos/mcp-crewd-rs && cd mcp-crewd-rs\ncargo build --release --locked\ninstall -m755 target/release/crewd target/release/crew ~/.local/bin/\n```\n\n**From source (any platform)** — Rust ≥ 1.85:\n\n```sh\ncargo build --release\ninstall -m 0755 target/release/crewd target/release/crew ~/.local/bin/\n```\n\nEngine runtime requirements: the claude engine needs Node ≥ 20 with\n`@anthropic-ai/claude-agent-sdk` installed next to the shim\n(`cd shim && npm install`); the codex engine needs the `codex` CLI on the\ndaemon's `PATH`.\n\n### Configuration\n\n`crewd.toml` (passed explicitly via `--config`, never cwd-derived):\n\n```toml\nruntime_dir = \"/home/you/.config/crewd/runtime\"   # socket, db, audit, tokens\nacl_path    = \"/home/you/.config/crewd/acl.toml\"\n# Optional: only for claude profiles that authenticate against an\n# Anthropic-compatible endpoint. A KEY=value env file holding that profile's\n# bearer token(s), e.g. `PROVIDER_API_KEY=...`. Omit for the default `max`.\nkeys_env_path = \"/home/you/.config/crewd/keys.env\"\n```\n\n`acl.toml` — one section per registered cell with its engine and\ncapabilities (`send`, `ask`, `reply`, `broadcast`, `read_inbox`,\n`list_cells`, `read_audit`, `spawn`):\n\n```toml\n[cell.coordinator]\nengine = \"claude\"\ncapabilities = [\"send\",\"ask\",\"reply\",\"broadcast\",\"read_inbox\",\"list_cells\",\"read_audit\",\"spawn\"]\n```\n\nPer-cell auth: a 0600 token file per cell (`L0` scheme). Mount the shim in\nyour MCP client config:\n\n```jsonc\n// .mcp.json (Claude Code) — one entry per cell identity\n{\n  \"mcpServers\": {\n    \"crew\": {\n      \"command\": \"crew\",\n      \"args\": [\"mcp\",\n        \"--runtime-dir\", \"/home/you/.config/crewd/runtime\",\n        \"--cell\", \"coordinator\",\n        \"--token-file\", \"/home/you/.config/crewd/coordinator.secret\"]\n    }\n  }\n}\n```\n\n### systemd\n\n```ini\n[Unit]\nDescription=crewd — cell fabric daemon\nAfter=network.target\n\n[Service]\nType=simple\nUser=you\nGroup=you\n# The claude shim path is resolved relative to this directory.\nWorkingDirectory=/path/to/mcp-crewd-rs\nExecStart=%h/.local/bin/crewd --config %h/.config/crewd/crewd.toml\n# IMPORTANT: the default systemd PATH does not include user-level bins.\n# Engine adapters spawn `codex` / `node` from the daemon's PATH:\nEnvironment=\"PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin\"\nRestart=on-failure\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\n```\n\n## Security model\n\n- Unix socket `0600` inside a `0700` runtime dir; bind refuses symlinks.\n- Kernel peer credentials checked at handshake (`SO_PEERCRED` on\n  Linux/Android, `getpeereid` + `LOCAL_PEERPID` on macOS), then a per-cell\n  token (file `0600`).\n- Engine children run with an **exact env allowlist** — secrets are read\n  from `keys_env_path` by the daemon and injected only into the child that\n  needs them; they never appear in logs or error messages.\n- Append-only, hash-chained audit log (`crew audit verify`).\n- Honest failure states: crashed/orphaned turns are recovered at boot as\n  `interrupted` / `failed_unknown`, never silently retried after engine\n  acceptance.\n\n**Scope honesty**: processes running under the *same UID* as the daemon can\nread the socket and token files — crewd separates *cells*, it is not a\nsame-user privilege boundary. See [THREAT_MODEL.md](THREAT_MODEL.md).\n\n## Platform\n\n| Platform | Status |\n|----------|--------|\n| Linux (x86_64 / aarch64, gnu + musl) | ✅ prebuilt + CI-tested |\n| Android / Termux (aarch64) | ✅ prebuilt (`aarch64-linux-android`), CI build-checked |\n| macOS (Apple Silicon / Intel) | ✅ from source, CI-tested (`getpeereid` peer auth) |\n| Windows | ❌ not supported (Unix sockets + peer credentials) |\n\nOn Termux there is no systemd: run `crewd` under\n[termux-services](https://wiki.termux.com/wiki/Termux-services) or a plain\n`nohup crewd --config … &`. On macOS use `launchd` or run it in a terminal.\n\n## Docs\n\n- [SPEC.md](SPEC.md) — normative protocol & behaviour spec\n- [THREAT_MODEL.md](THREAT_MODEL.md) — threat model and non-goals\n\n## Status\n\nPre-1.0 (`v0.1.x`): single-host fabric (UDS). Cross-host fabric, operator\ntoken CLI and warm engine reuse are on the roadmap.\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE).\n",
  "bytes": 8274,
  "sha": "5aa3adff388ba35ae3517abaab4a890fe5b50e0f0e573a613ccc6fece21f268f",
  "repo_slug": "dionanos/mcp-crewd-rs",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_dionanos_mcp_crewd_rs_e7a8358c/readme"
}