Unison Brain - MCP Server
unison-labs-ai/unison-brain
Base de conhecimento compartilhada na nuvem para todos os seus agentes
Ver no GitHubUm servidor MCP que expõe uma base de conhecimento em nuvem compartilhada para agents Claude, Cursor e outros agentes. Permite que múltiplos agentes leiam e escrevam em um repositório centralizado de decisões, convenções e soluções anteriores, eliminando silos de conhecimento entre diferentes ferramentas e máquinas.
Instalação
npx convez-ai unison-labs-ai/unison-brain1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Compartilhar contexto de projeto entre múltiplos agentes de IA
- Centralizar decisões arquiteturais e padrões de código
- Manter histórico de soluções para problemas recorrentes
- Fornecer continuidade de contexto entre sessões de agentes
Veredito

Solução sólida e open-source para o problema real de perda de contexto entre sessões de agentes. O design em camadas (CLI, SDK, MCP, Skill) oferece flexibilidade, mas requer um backend em nuvem pago para funcionar — avalie o custo e a dependência de serviço fechado.
README
A tradução para o português deste README ainda está na fila.
Unison Brain
Your agents have the memory of a goldfish.
One brain, every agent. A cloud brain that Claude Code, Cursor, Codex — and your research, ops, and personal agents — read from and write back to, on any machine, for every teammate. Not another per-tool memory silo; the one source of truth they all share.
Why • Quickstart • Install • For agents • SPEC
🤖 Reading this as an AI agent? Go straight to
AGENTS.md— it self-onboards you onto the brain in four steps (install → auth → skill → verify), then teaches the search-first / write-back loop.
Every agent starts each session blank — the context window resets the moment you
close the terminal. The usual patches only half-fix it: a CLAUDE.md here, Cursor's
memory there, a local notes.md in one repo, a wiki nobody syncs. The knowledge
survives, but it's trapped — scoped to one tool, one repo, one machine, one person.
It never travels. The decisions and the hard-won why end up everywhere except where
your next agent can reach them.
The Unison brain is a hosted knowledge base — decisions, conventions, architecture, prior fixes, people — that any agent reads from and writes back to, from any machine, with one command:
unison search "why did we pick device-flow auth"
It's not only for coding agents: the same brain backs your research, ops, and personal agents too. It's a knowledge graph of documents, entities, and bitemporal facts — not a codebase index — so anything worth remembering lives in one place every agent shares. Coding agents are just the sharpest first example.
This repo is the open-source client: a CLI, an SDK, an MCP server, and an agent
skill. No local database, no vector index to run, no framework to adopt — the brain
lives in the cloud and every surface speaks one API. It's open source so you can read
exactly what it sends before you pipe it into an agent with shell access; the backend
that stores and searches your data is a separate, closed service (SPEC.md
is the contract this client speaks).
What's in the box
| Package | Install as | What it is |
|---|---|---|
@unisonlabs/cli | unison | The CLI: search, get, write, list, status, auth. |
@unisonlabs/sdk | @unisonlabs/sdk | Typed HTTP client the CLI and MCP server are built on. |
@unisonlabs/mcp | unison-brain-mcp | A Model Context Protocol server for agents without shell access. |
skill/SKILL.md | — | Drop-in Agent Skill that teaches an agent to use the CLI. |
The SDK is the core; the CLI and MCP server are thin wrappers over it, and the skill wraps the CLI — one API contract, four surfaces.
With the brain vs. without
| 🐟 Without a brain | 🧠 With Unison |
|---|---|
| "Why did we switch to device-flow auth?" → the agent greps, guesses, or asks you for the third time | unison search "why device-flow auth" → the actual decision and its reasoning, in one second |
| New laptop, new repo, new teammate → re-explain the whole architecture from scratch | One brain. Every agent, every machine, every teammate reads the same source of truth |
CLAUDE.md / .cursorrules go stale the day after you write them | Agents write back what they learn, so the brain stays current on its own |
| mem0 / Letta / Zep are frameworks you build an agent with | Plugs into the agents you already use — nothing to host, no migration |
| A flat log of past chat messages | A knowledge graph: entities (people, projects) + bitemporal facts — who, what, and what changed when |
Quickstart
unison auth login # opens your browser to sign in
unison status # confirm you're connected
unison search "auth decision" # search the brain
unison get /tenant/projects/architecture.md # read a document
echo "We chose X because Y." | unison write /private/notes/x.md # paths end in .md
unison edit /private/notes/x.md --old "X" --new "Z" # surgical in-place edit
unison entity resolve "Daniel" # knowledge-graph lookup
unison fact ls --entity <id> # facts about an entity
Documents: search, grep, cat/get, ls, tree, find, write, edit,
rm, tag, share, neighbors, links, link. Graph: entity …, fact …,
timeline. Work (tasks/docs/tables/records/views): work apply, work query,
work search, work tree, … Admin: review …, jobs …. Add --json to any
command. Full surface and the backend contract are in SPEC.md.
Browse the brain like a filesystem
The brain is path-addressable (/private/, /tenant/, /teams/<slug>/,
/system/), so it navigates with the commands you already know:
unison ls # entries at the root (dirs + files)
unison ls /private # entries under /private
unison ls /tenant/people --docs # documents with titles instead of the dir view
unison tree /private # recursive tree under /private
unison find '/private/**auth*' # paths matching a glob
unison cat /tenant/projects/architecture.md # read a document (alias of `get`)
unison cat --raw '/system/...' # read any tier, including synthetic ones
unison grep "TODO" --json # regex scan over document bodies
Query the knowledge graph
Beyond documents, the brain has entities (canonical people/projects/companies) and bitemporal facts about them:
id=$(unison entity resolve "Daniel" --json | jq -r .entity.id)
unison fact ls --entity "$id" # what the brain knows about Daniel
unison timeline "$id" # facts over time
unison fact add "$id" works_at "Joined Unison in 2026" --confidence 0.9
unison neighbors /tenant/projects/architecture.md # linked documents
For agents
Self-onboarding: point your agent at AGENTS.md — it walks any
agent (Claude Code, Cursor, Codex, or any MCP/CLI-capable agent) from zero to a
working brain in four steps, then teaches the search-first / write-back loop.
Pass --json for machine output: results are JSON on stdout (compact when
piped); errors are a JSON envelope on stderr with a nonzero exit code
(4 auth, 3 not found, 5 conflict, 1 other). Destructive commands (rm,
fact rm, review merge) require --yes in non-interactive shells. Drop the
skill in with unison skill install, or run unison --help / unison <cmd> --help — the help is written to be read by an agent.
unison search "rate limiting" -k 5 --json | jq '.[].doc.path'
unison get /tenant/projects/architecture.md --json
Authentication
unison auth login opens your browser to our sign-in page (PKCE loopback,
RFC 8252 + 7636) — the same one-command, no-credentials-in-the-terminal flow as
gh auth login / vercel login. Account creation happens in the browser; the CLI
just receives and stores the token at ~/.config/unison/config.json (mode 0600).
On a headless/SSH box, use unison auth login --device for the code-based flow.
For CI and headless agents, skip the browser — set an API key:
export UNISON_TOKEN="usk_live_..." # overrides the stored credential
export UNISON_API_URL="https://api.unisonlabs.ai" # optional; this is the default
UNISON_TOKEN always takes precedence over the stored file.
Install
npm i -g @unisonlabs/cli # or: pnpm add -g / bun add -g / npx @unisonlabs/cli
unison auth login # sign in (opens your browser)
Distributed via npm as three packages: @unisonlabs/cli (the unison binary),
@unisonlabs/sdk (the typed client library), and @unisonlabs/mcp (the MCP
server). The published binaries are plain compiled JS with a
#!/usr/bin/env node shebang — they run on Node or Bun, no runtime to install.
Use it from an agent
Claude Code / Cursor / Codex (with a shell): install the CLI, then install the
skill so the agent knows when and how to use the brain (or just point the agent at
AGENTS.md and let it self-onboard):
unison skill install # writes the skill to ~/.claude/skills/unison-brain/
Agents without a shell: register the MCP server.
{
"mcpServers": {
"unison-brain": {
"command": "npx",
"args": ["-y", "@unisonlabs/mcp"],
"env": { "UNISON_TOKEN": "usk_live_...", "UNISON_API_URL": "https://api.unisonlabs.ai" }
}
}
}
Shell completion
source <(unison completion bash) # bash — add to ~/.bashrc
source <(unison completion zsh) # zsh — add to ~/.zshrc
unison completion fish > ~/.config/fish/completions/unison.fish
SDK
import { BrainClient } from "@unisonlabs/sdk";
const u = new BrainClient({ baseUrl: "https://api.unisonlabs.ai", token: process.env.UNISON_TOKEN });
// Brain: search, write, and surgically edit knowledge.
const hits = await u.search("auth decision", { limit: 5 });
await u.write({ path: "/private/notes/auth.md", bodyMd: "We chose device-flow because …" });
await u.editDoc({ path: "/private/notes/auth.md", oldStr: "device-flow", newStr: "PKCE device-flow" });
// Work: one apply endpoint takes the operation DSL (tasks/docs/tables/records/views).
await u.work.apply({
operations: [{ op: "record.upsert", tableId: { ref: "tasks" }, primaryText: "Ship SDK v1" }],
});
const tasks = await u.work.search({ query: "ship", limit: 5 });
See examples/ for more.
Development
Requires Bun.
bun install
bun test # unit tests (SDK + CLI)
bun lint # Biome
bun run packages/cli/src/index.ts --help # run the CLI from source
bun run build # bundle each package to dist/
node packages/cli/dist/index.js --help # run the built (node) binary
This is a Bun workspace monorepo: packages/* resolve each other by name during
development. bun run build bundles the CLI and MCP server into self-contained
dist/index.js files (the SDK is bundled in; only npm deps stay external).
The hosted brain is live at https://api.unisonlabs.ai (the default). To develop
against a different backend, point the client with UNISON_API_URL /
UNISON_APP_URL or unison auth login --api-url <url>.
Star it
If the brain saves your agent one "wait, why did we do it this way?" — star it. ⭐
Contributing & security
Contributions welcome — see CONTRIBUTING.md and the
CHANGELOG.md. Found a vulnerability? See
SECURITY.md — please report privately, not via a public issue.
License
MIT © Unison Labs