{"id":"28f0ff90-4d4c-4406-b790-24b0d41b6806","slug":"kinqsradiollc-brainrouter","kind":"mcp","name":"BrainRouter","summary":"BrainRouter is a cognitive memory and multi-agent orchestration platform for AI coding agents. It provides a first-party terminal CLI, MCP-based memory tools, layered recall, context compaction, graph","owner":"kinqsradiollc","repoUrl":"https://github.com/kinqsradiollc/BrainRouter","license":"MIT","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-05-15T10:37:07.000Z","addedAt":"2026-10-21T17:24:10.538Z","logoUrl":"https://avatars.githubusercontent.com/u/199692400?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["memory-knowledge","search","developer-tools"],"tags":["ai-agents","claude","codex","context-engineering","local-first","long-term-memory","memory","vector-search"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-25T20:43:09.417Z","sample":false,"url":"https://conduits.dev/tools/kinqsradiollc-brainrouter","language":"TypeScript","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# BrainRouter\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%233178c6.svg)](https://www.typescriptlang.org/)\n[![Protocol: MCP](https://img.shields.io/badge/Protocol-MCP-orange.svg)](https://modelcontextprotocol.io/)\n\n**Plan the day, run the meeting, write the doc, ship the change — and keep the thread.**\n\nBrainRouter is one workspace a whole team works in. Six things happen to a piece\nof work every week, and the useful part is not any one of them: it is that the\nsixth still knows what happened in the first.\n\nEngineering is the deepest surface here, not the whole product. The same task\ncontext runs through planning, meetings, documents, implementation, review, and\ndurable knowledge — so this is one workspace rather than six tools that agree to\nshare a login.\n\n## The loop\n\nAn item enters once and keeps its identity, owner, and evidence all the way\naround. Every stage is a real route in the product, not a diagram:\n\n| # | Stage      | What happens                                                             | Route       |\n| - | ---------- | ------------------------------------------------------------------------ | ----------- |\n| 1 | **Plan**   | Today assembles itself from your items plus whatever your trackers mirror in. | `/planner`  |\n| 2 | **Meet**   | The call is recorded, transcribed segment by segment, and summarized; action items come out with owners. | `/meetings` |\n| 3 | **Write**  | The decision is written down where the work is, with pages, databases, and backlinks. | `/notes`    |\n| 4 | **Build**  | An agent picks the item up with the context, permissions, and repository already in scope. | `/chat`     |\n| 5 | **Verify** | Code review, security review, or both — every finding naming the exact lines it came from. | `/reviews`  |\n| 6 | **Know**   | Next week the thread is still there, attributable rather than vaguely remembered. | `/knowledge`|\n\n**Know feeds Plan.** That is why it is a loop.\n\n## Four ways in\n\nThe loop is the product. These are the doors into it, and they share models,\npermissions, connected tools, workflows, and context:\n\n| Surface                       | Use it for                                                                                                                                        |\n| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Desktop**                   | The primary Chat · Code · Track workbench: projects, sessions, files, plans, requirements, tools, terminal, automations, connectors, and reviews. |\n| **CLI (`brainrouter`)**       | A TTY-native coding agent with the same runtime, routing, policy, memory, orchestration, workflows, and goal loop.                                |\n| **Dashboard**                 | Authenticated workspace: the loop above, plus organizations, account connections, providers, repositories, knowledge, review jobs, and operations. |\n| **Brain (`brainrouter-mcp`)** | PostgreSQL-backed MCP and REST services for cognition, tenancy, connectors, review jobs, triggers, and other clients.                             |\n| **Shared packages**           | Typed runtime, SDK, hooks, agent protocol, and public contracts used across every interface.                                                      |\n\n## Architecture\n\n```mermaid\nflowchart LR\n  Desktop[Desktop] --> Core[Shared agent runtime]\n  CLI[CLI] --> Core\n  Dashboard[Dashboard] --> API[Authenticated REST API]\n  MCP[MCP clients] --> Brain[Brain service]\n  Core --> Brain\n  API --> Brain\n  Brain --> PG[(PostgreSQL + pgvector)]\n  Brain --> Providers[Model providers]\n  Brain --> Connections[OAuth connectors]\n  Brain --> Reviews[Review and automation workers]\n```\n\nImportant boundaries:\n\n- model and integration credentials are stored server-side and sealed with `BRAINROUTER_SECRET_KEY`;\n- organizations, projects, workspaces, users, and sources are explicit scope—not a global browser cache;\n- account OAuth is the default API credential path, while webhook signing secrets only authenticate inbound events;\n- local tools still pass through the runtime permission, approval, sandbox, and path-policy layers;\n- review findings remain tied to repository evidence, checks, and attributable vulnerability intelligence.\n\n## Requirements\n\n- Node.js 22+\n- npm 10+\n- PostgreSQL with pgvector (the development stack is in [`deploy/postgres/`](deploy/postgres/))\n- macOS or Windows for the packaged desktop app; source development also works through Electron\n\n## Quick start from source\n\n> **Full guide:** [`deploy/README.md`](deploy/README.md) covers dev setup\n> (host or live-reload Docker), building the production stack from source, and\n> the dashboard-vs-`.env` configuration split. The essentials:\n\n```bash\ngit clone https://github.com/kinqsradiollc/BrainRouter.git\ncd BrainRouter\nnpm install\n\n# Start local PostgreSQL + pgvector.\ndocker compose -f deploy/postgres/docker-compose.yml up -d\n\n# Configure infrastructure and auth.\ncp brainrouter/.env.example brainrouter/.env\n# Set BRAINROUTER_DATABASE_URL, BRAINROUTER_SECRET_KEY,\n# BRAINROUTER_JWT_SECRET, and the first-boot admin values.\n\nnpm run build\n```\n\nRun the brain and dashboard:\n\n```bash\n# Terminal A — MCP + REST on http://localhost:3747\nnpm run dev:http -w @kinqs/brainrouter-mcp-server\n\n# Terminal B — dashboard on http://localhost:3000\nnpm run dev -w dashboard\n```\n\nSign in as the seeded admin (its API key prints once in the brain logs), then configure the organization’s LLM / embedding / reranker providers under **Intelligence → Models & providers**. Providers live in the database; `.env` holds only infrastructure + operational settings, never provider credentials. The embedding vector width is derived from the embedder automatically.\n\nRun a local client:\n\n```bash\n# Terminal workbench\nnpm run cli\n\n# Desktop workbench\nnpm run start -w brainrouter-desktop\n```\n\n## Deploy (build from source)\n\nThere is no published server image — the production stack is built from this\nrepo. Fill secrets and bring it up (Postgres + one-shot migrator + the\nservice-capable brain):\n\n```bash\ncd deploy/stack\ncp .env.example .env\ndocker compose up -d --build          # → brain on http://localhost:3747\n```\n\nPin a version by checking out a release tag before building\n(`git checkout v0.4.16 && docker compose … up -d --build`); update with\n`git pull && docker compose … up -d --build` (the migrator runs first). See\n[`deploy/README.md`](deploy/README.md) and [`brainrouter-docs/HOSTING.md`](brainrouter-docs/HOSTING.md).\n\n## Install published clients\n\n```bash\nnpm install -g @kinqs/brainrouter-cli\nnpm install -g @kinqs/brainrouter-mcp-server\n```\n\nPublished libraries include [`@kinqs/brainrouter-core`](https://www.npmjs.com/package/@kinqs/brainrouter-core), [`@kinqs/brainrouter-sdk`](https://www.npmjs.com/package/@kinqs/brainrouter-sdk), [`@kinqs/brainrouter-hooks`](https://www.npmjs.com/package/@kinqs/brainrouter-hooks), [`@kinqs/brainrouter-agent-protocol`](https://www.npmjs.com/package/@kinqs/brainrouter-agent-protocol), and [`@kinqs/brainrouter-types`](https://www.npmjs.com/package/@kinqs/brainrouter-types).\n\nThe CLI setup wizard configures its local model and brain connection. It can run with local tools when the remote brain is unavailable; use `--strict-mcp` when an offline fallback is not acceptable.\n\n## Connections and knowledge\n\nThe shared connection flow is:\n\n1. an organization admin configures the provider OAuth app in Dashboard → Connections;\n2. a user connects their account;\n3. the service seals the user token and exposes status/resources without returning it;\n4. server-side sync checkpoints the selected source into the owner’s memory;\n5. desktop and dashboard read the same connection and sync state.\n\nSupported OAuth sources include GitHub, GitLab, Slack, Google Drive, Gmail, Notion, and Linear. Additional runtime connectors include filesystem, web, Jira, Confluence, and MCP resources where their credential model applies.\n\nKnowledge and source requests carry organization, project, and workspace scope. Record ownership and source provenance stay attached to the returned evidence. Recall combines keyword, vector, file-path, freshness, reranking, and graph expansion, then returns attributable records instead of an opaque context blob.\n\n## Reviews and automation\n\n- Desktop and dashboard can inspect backend pull-request review jobs and findings; local uncommitted-change review remains a separate workspace action.\n- GitHub App installation credentials support repository linking, check-runs, and webhook-triggered review automation.\n- Track detects a repository from the active workspace remote and uses the signed-in account connection before any advanced local-token fallback.\n- CVE-, security-, advisory-, exploit-, and affected-version prompts automatically receive a bounded briefing from the continuously refreshed NVD catalog, enriched with CISA KEV and FIRST EPSS source/freshness metadata. Security and code reviews also receive exact repository matches produced from OSV plus stored inventory evidence.\n\nSee [`brainrouter-docs/setup/github-app-setup.md`](brainrouter-docs/setup/github-app-setup.md) for the GitHub trust boundaries and [`brainrouter-docs/automations.md`](brainrouter-docs/automations.md) for automation behavior.\n\n## Development\n\n```bash\n# Build packages before apps that consume their compiled output.\nnpm run build:packages\nnpm run build:apps\n\n# Repository-wide verification.\nnpm run typecheck\nnpm run test\nnpm run lint\n```\n\nDesktop verification rebuilds shared dependencies automatically:\n\n```bash\nnpm run test -w brainrouter-desktop\n```\n\nRead [`CLAUDE.md`](CLAUDE.md) and the relevant package rules before editing. The durable visual and interaction contract is [`design.md`](design.md).\n\n## Documentation\n\n- [`deploy/README.md`](deploy/README.md) — dev setup + build-from-source Docker deploy (start here to run it).\n- [`SETUP.md`](SETUP.md) — operator and maintainer setup/runbook.\n- [`BRAINROUTER.md`](BRAINROUTER.md) — brain, memory, REST, and MCP behavior.\n- [`SYSTEM_WORKFLOWS.md`](SYSTEM_WORKFLOWS.md) — end-to-end runtime flows.\n- [`SECURITY.md`](SECURITY.md) — security policy and trust boundaries.\n- [`BENCHMARKS.md`](BENCHMARKS.md) — reproducible evaluation commands and results.\n- [`brainrouter-docs/`](brainrouter-docs/) — configuration, architecture decisions, connectors, automation, and deep dives.\n- [`ROADMAP.md`](ROADMAP.md) and [`CHANGELOG.md`](CHANGELOG.md) — planned and shipped work.\n\n## License\n\nMIT — see [`LICENSE`](LICENSE).\n"}