Setup

Claude Code

Add it to Claude Code.

Claude Code talks to B.R.A.I.N. through a small local program called an MCP server. You install the client once, paste a short config, and restart Claude Code. You never put your key in the chat.

Before you start

Install the B.R.A.I.N. client first, so the brain-mcp command exists, and so your key is saved privately.

In a terminal, brain-mcp --help should print a short help message. If it does not, finish the Mac or Windows guide first, including the PATH step.

1. Open your project folder

In Claude Code, open the project you want to use with B.R.A.I.N. The config file lives in that folder, and is named .mcp.json.

2. Create or open the config file

In the project folder, create a file named .mcp.json if it is not there already. You can do this in the editor, or in a terminal with nano .mcp.json or Notepad.

3. Paste this config and save

Paste the block below into .mcp.json. If the file already has other servers, add the "brain" entry next to them, and keep the commas valid in JSON. Save the file.

Paste into .mcp.json
{
  "mcpServers": {
    "brain": { "command": "brain-mcp" }
  }
}

If Claude Code cannot find brain-mcp, use the Python form instead. On a Mac, set "command" to python3 and "args" to ["/Users/YOU/.local/bin/brain-mcp"], with your home folder in place of YOU. On Windows, use python and ["C:\\Users\\YOU\\AppData\\Local\\brain-hosted\\brain-mcp.py"].

Restart Claude Code after you save the file. If it shows the B.R.A.I.N. server as pending approval, approve it when asked. The tools will not appear until you do.

4. Check that it works

This is the quick test. Use any harmless fact you will recognize, or use this one.

This chat

Ask: Remember that the staging deploy runs on Fridays. Let it save that to B.R.A.I.N.

A brand new chat

Open a new chat, with no earlier messages. Ask: When does the staging deploy run? It should say Fridays.

If the new chat does not know, restart the app and use the fixes below. Do not paste your key into the chat.

If something goes wrong

The tools do not appear

Confirm brain-mcp --help works in a terminal. If Claude Code shows the server as pending approval, approve it, then restart. If the command is not on PATH, switch to the Python form above.

It cannot connect

Run brain selftest in a terminal. If that fails, your key may be missing or revoked. Get a new key from the dashboard and run the installer again. Do not paste the key into Claude Code's chat. If you must put it in the config, add an "env" block next to command and keep that file out of source control.

The new chat does not remember

In the first chat, confirm the fact was actually saved. Try asking it to "save this to B.R.A.I.N." then retry the new chat.

Other ways to install

All paths · AI bots, including Grok Bot · Mac · Windows · Claude Code · Cursor · Claude Desktop · Gemini CLI · Direct API · Developers

Keep your key private

Never paste an API key into a chat, a ticket, or a note. Each bot has its own key, and you can pause or revoke it in the dashboard. Questions? Contact us.