Get the FREE Ultimate OpenClaw Setup Guide →

brain

Adaptive error memory & code intelligence MCP server with Hebbian synapse network, cross-project learning, and auto-error detection

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio timmeck-brain npx -y @timmeck/brain \
  --env BRAIN_LOG_LEVEL="info|debug|warn|error (optional)" \
  --env BRAIN_CONFIG_PATH="Path to MCP brain configuration file (optional)"

How to use

Brain is an adaptive MCP server that enhances Claude Code by adding memory, learning, and code intelligence capabilities. It uses On-Your-Device memory and persistent context to remember errors, patterns, and reusable code modules across projects. With its Error Memory, Code Intelligence, and Persistent Memory features, Brain can propose fixes faster, reuse existing solutions, and keep track of decisions and tasks over time. To start using it, install the CLI globally and run Brain setup, which configures MCP hooks and starts the daemon. Once running, Brain exposes an MCP interface (stdio + HTTP/SSE) that Claude Code and other clients can connect to for error analysis, solution retrieval, and context-aware code recommendations.

After setup, you can interact with Brain via its standard MCP endpoints and tooling. Brain can register reusable code modules across projects, track error fingerprints, suggest preventive patterns, and maintain a project-wide memory of decisions, goals, and lessons. When you report an error, Brain searches its hybrid index (TF-IDF + vector + synapse boost) for matching solutions, returns a confidence-scored recommendation, and can re-use modules from other projects to avoid rework. It also logs commits and changes that relate to the errors, enabling cross-project learning and better traceability over time.

How to install

Prerequisites

  • Node.js and npm installed on your system
  • Internet access to fetch the Brain package from npm

Installation steps

  1. Install Brain globally via npm: npm install -g @timmeck/brain

  2. Run the initial setup to configure MCP, hooks, and start the daemon: brain setup

  3. Verify Brain is running and accessible via MCP endpoints. If needed, customize environment variables or configuration as described in the additional notes.

Optional

  • If you want to run Brain in a container or via a package manager alternative, refer to the ecosystem monorepo for additional installation options.

Additional notes

Notes and tips:

  • The Brain MCP server is designed to work with Claude Code and related tooling via stdio and HTTP/SSE interfaces.
  • You can customize behavior with environment variables such as BRAIN_CONFIG_PATH to point to a config file, or BRAIN_LOG_LEVEL to control verbosity.
  • If you encounter slow startup or connection issues, ensure networking allows the MCP endpoints (stdio, plus any HTTP/SSE ports used by your setup).
  • Brain emphasizes learning over time: ensure you have ongoing projects indexed so Code Intelligence and Persistent Memory have material to learn from.
  • When upgrading, review the Change Logs in the brain ecosystem to understand new features like Semantic Changelog, Task/Goal Tracking, and Cross-Project Learning.

Related MCP Servers

Sponsor this space

Reach thousands of developers