Skip to main content
MCP server CX Codex

robrain — Claude Code MCP server: what it does, how to install

Stores engineering decisions and rejected alternatives in Postgres. Prevents coding agents from repeating approaches your team already dismissed.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env PERCEPTION_API_URL=<PERCEPTION_API_URL> --env PERCEPTION_API_KEY=<PERCEPTION_API_KEY> --transport stdio robrain -- npx -y robrain
Open on GitHub

What robrain does

The server monitors workspace sessions and extracts architectural decisions directly into Postgres. Records store the selected direction alongside a dedicated rejected[] field for discarded options. When an agent starts work in a new session, it pulls this background context and halts before proposing a dismissed pattern.

The pipeline uses two core parts: Perception extracts structured entries, while Synthesis performs batch checks across the whole database. Running npx robrain synth flags conflicts. You can also trace past reasoning for an individual file with npx robrain explain <path>.

Without an active Perception instance and valid PERCEPTION_API_KEY and PERCEPTION_API_URL values, the server cannot process queries. Self-hosting requires Docker for Postgres and API keys for both Anthropic and OpenAI under the default configuration.

What it helps with

  • prevent coding agents from proposing previously rejected design decisions
  • share architectural context across different teammates and editors
  • detect contradictory technical positions across sessions via synth
  • inspect why a specific file was modified using explain

Example prompts for the agent

  • Why did we decide against using Express for this microservice?
  • Check our recorded decisions before modifying the database migration.
  • List the alternative approaches we ruled out for user authentication.

How to install robrain

Platform CLI

claude mcp add --env PERCEPTION_API_URL=<PERCEPTION_API_URL> --env PERCEPTION_API_KEY=<PERCEPTION_API_KEY> --transport stdio robrain -- npx -y robrain

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about robrain

How do I install robrain in Claude Code?

Run `claude mcp add --env PERCEPTION_API_URL=<PERCEPTION_API_URL> --env PERCEPTION_API_KEY=<PERCEPTION_API_KEY> --transport stdio robrain -- npx -y robrain` in your terminal. Replace the placeholders with your Perception URL and API key.

What does robrain do?

It records engineering choices and rejected alternatives in a Postgres database. It informs your AI assistant when a suggested change contradicts an earlier team verdict.

What is needed to run the self-hosted version?

Start the database and Perception services by executing npx robrain@latest up. You will also need API keys for extraction and embeddings (Anthropic and OpenAI by default).

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor