# adelinamart/robrain [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/adelinamart/robrain  
**GitHub Stars:** 81  
**npm Downloads (last month):** 932  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/adelinamart-robrain

## Description
Self-hosted decision memory for AI coding agents. Passively captures architectural decisions with the alternatives you rejected (structured rejected[]), then warns the agent before it re-proposes a rejected approach. Postgres + pgvector; cross-tool across Claude Code, Cursor, Copilot, and Codex. Install: npx robrain up && npx robrain install.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "robrain": {
    "command": "npx",
    "args": ["-y","robrain@latest"],
    "env": {
      "ANTHROPIC_API_KEY": "",
      "OPENAI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `ANTHROPIC_API_KEY`, `OPENAI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What adelinamart/robrain MCP server does

adelinamart/robrain gives coding agents shared decision memory with explicit records of alternatives that a team rejected. It is designed to prevent an agent from repeatedly suggesting an approach that was already ruled out, even when the original decision was made in another editor or by another teammate.

The system focuses on two functions: capturing decisions from session activity and applying judgment to the stored corpus. Captured decisions can include a structured `rejected[]` field containing the alternatives and rationale that should inform future work. Memory is shared across supported tools through the same backend rather than being tied to one editor.

Self-hosted installations keep the database, API keys, and processing on the user's machine. A managed Rory Plans option handles hosting and extraction for paid-plan users, with team or individual memory spaces depending on the plan.

## How it works

Sensing observes session turns and sends them through Perception, which classifies and extracts decisions into Postgres. The default provider setup uses Anthropic for extraction and OpenAI for embeddings, while the project also describes OpenAI-only, Gemini, alternative embedding, and fully local arrangements.

After installation, `init-project` adds project instructions for Claude Code, Codex CLI, and Cursor. Sessions then load an always-on summary, and capture occurs without requiring users to tag each turn. The capture classifier can be adjusted per project with natural-language instructions, confidence thresholds, capture modes, and additional memory kinds.

Synthesis examines the complete decisions table rather than capturing new entries. Its passes look for stance drift, incompatible decisions from different sessions, and recurring tools or patterns that can be condensed into planning blocks. Findings are written back as flags and edges for review.

## Setup and configuration

The self-hosted path starts with `npx robrain@latest up`, which starts Postgres and the Perception service and generates stack credentials under `~/.robrain/stack/.env`. The default setup requires Anthropic and OpenAI API keys. Run `npx robrain install --self-hosted` to connect the Sensing MCP component to editors.

For a project, run `npx robrain init-project` from the repository root. This writes `CLAUDE.md`, `AGENTS.md`, and a Cursor rule file. `npx robrain doctor` helps investigate missing captures, while `npx robrain review` provides a way to inspect and approve captured rows. The Claude Code plugin adds hook-based capture and pre-task warnings for self-hosted users.

The managed route uses `npx robrain install`, followed by an API token from Rory Plans. It avoids local Docker, Postgres, LLM keys, and embedding keys; extraction and search run remotely. The cloud setup is available on paid Rory Plans subscriptions.

## Tools and capabilities

- Passively capture decisions from agent session turns.
- Store rejected alternatives in structured `rejected[]` records.
- Load prior decision summaries when a session starts.
- Warn agents before they re-propose rejected approaches.
- Explain the decision history associated with a file.
- Review captured rows before accepting them.
- Tune capture instructions, confidence, modes, and memory kinds.
- Scan the corpus for drift and contradictions.
- Promote recurring entities into planning blocks.

## Limitations and notes

Synthesis is available locally through the self-hosted setup; managed installations run judgment server-side. Only decisions carry vetoes, while additional memory kinds represent changing state or other project-specific information. The repository describes coding as the first supported vertical, although the underlying architecture is intended for longer-lived agent decisions more broadly.

Self-hosted operation depends on a running Postgres and Perception stack, as well as credentials for the selected extraction and embedding providers. After changing installation or generated project configuration, editors may need a full restart.

_Full upstream README: https://allmcps.com/mcp/adelinamart-robrain/readme_

