Setup command
What the dashboard’s Connect command runs, its flags, which file it writes for each tool, and how to undo it.
The HeyBrain MCP page shows a ready-made command for your tool and operating system. It downloads a small Node.js installer from HeyBrain and runs it once. Copy the command from the dashboard rather than typing it: the dashboard fills in your key and the right values.
The command#
curl -fsSL https://api.heybrain.io/agent-keys/connect.cjs | node - --key REPLACE_WITH_YOUR_KEY --mcp-url https://mcp.heybrain.io/mcp --brain-url https://api.heybrain.io --agent claude-code --os macos$f = Join-Path $env:TEMP 'aivm-connect.cjs'; Invoke-WebRequest -UseBasicParsing 'https://api.heybrain.io/agent-keys/connect.cjs' -OutFile $f; node $f --key REPLACE_WITH_YOUR_KEY --mcp-url https://mcp.heybrain.io/mcp --brain-url https://api.heybrain.io --agent claude-code --os windows; Remove-Item $fIt needs Node.js 18 or later. If your agent already runs MCP servers with npx, Node.js is installed.
Flags#
--keystringRequiredThe key generated on the HeyBrain MCP page. Use
--update-keyinstead to replace the key of a tool that is already connected.--mcp-urlURLRequiredThe HeyBrain MCP endpoint,
https://mcp.heybrain.io/mcp.--agentstringRequiredWhich tool to configure. One of the slugs in the table below.
--brain-urlURLThe HeyBrain API origin,
https://api.heybrain.io. The dashboard includes it.--osmacos | linux | windowsRecorded for the dashboard. The installer follows the operating system it actually runs on.
--mcp-bridgeflagRegisters HeyBrain through the
mcp-remotestdio bridge instead of a native HTTP entry. Slower; use it only when the dashboard offers it as the compatibility command (Codex).
What it writes#
The installer adds or updates one server entry named HeyBrain in your tool’s MCP configuration. It leaves your other servers alone, and running it again replaces the entry instead of adding a second one.
| Tool | --agent | File | Entry |
|---|---|---|---|
| Claude Code | claude-code | ~/.claude.json (user scope) | HTTP server with an Authorization header. Also allows HeyBrain’s tools in ~/.claude/settings.json. |
| Cursor | cursor | ~/.cursor/mcp.json | url and headers.Authorization |
| Codex | codex | ~/.codex/config.toml (permissions 0600) | [mcp_servers.HeyBrain] with url and http_headers |
| OpenClaw | openclaw | ~/.openclaw/openclaw.json, under mcp.servers | url, transport = streamable-http and the header |
| Hermes | hermes | ~/.hermes/config.yaml, under mcp_servers (%LOCALAPPDATA%\hermes on Windows) | url, the header and enabled: true. A one-time backup is saved as config.yaml.aivm-bak. |
| Claude desktop | claude-desktop | None | Claude desktop connects as a custom connector with browser sign-in. See Claude desktop and claude.ai. |
In key mode it also creates a local ~/heybrain/ folder with a short README. It does not install hooks, plugins or agent instruction files, and nothing records your conversations automatically.
Warning: The configuration file now contains your key. Keep it out of shared folders and version control.
After running it#
Fully quit and reopen the tool, not just a new tab or session. Tools read MCP configuration only at startup. OpenClaw reads it when its gateway starts, and Hermes when its process starts (for example hermes gateway restart).
If registration fails, the installer exits with status 1 before writing anything else.
Disconnect a tool#
- Revoke the key in Settings → API. The tool loses access on its next request.
- Remove the
HeyBrainentry from the file in the table above, then restart the tool.
There is no uninstall command. Revoking the key is what removes access; removing the entry only tidies the configuration.
Last checked against the product on November 25, 2026.