Docs / Connect / Roo Code

Connect ModelBrain to Roo Code

Roo Code keeps MCP servers in a settings file that it opens for you from its MCP panel, so connecting ModelBrain means adding one entry to it.

Roo Code lets a project file override your global one for the same server name, and a project file can be committed to a repository. If ModelBrain behaves differently in one project, look for a .roo/mcp.json there before anything else.

Where the program lives

This client needs the full path to ModelBrain's mcp_server program. The commands and snippets on this page show the macOS path; on Windows or Linux, put the path for your system in the same place. Write the full path rather than a variable such as %LOCALAPPDATA% or ~, because a client may not expand it.

macOS

/Applications/ModelBrain.app/Contents/MacOS/mcp_server

Windows

C:\Users\you\AppData\Local\Programs\ModelBrain\mcp_server.exe (that is %LOCALAPPDATA%\Programs\ModelBrain\mcp_server.exe, with your own user name). Inside JSON, TOML or a quoted YAML string, double each backslash.

Linux

/home/you/.local/lib/modelbrain/mcp_server, with your own home folder. The install script puts ModelBrain in ~/.local/lib/modelbrain.

Steps
  1. Install ModelBrain if you haven't yet (macOS, Windows or Linux).
  2. Open the global file from inside Roo Code. Click the MCP icon at the top of the Roo Code pane, scroll to the bottom, and choose Edit Global MCP. That opens mcp_settings.json, which applies to every workspace.
  3. Add ModelBrain under mcpServers. Keep any servers already listed.
    {
      "mcpServers": {
        "modelbrain": {
          "command": "/Applications/ModelBrain.app/Contents/MacOS/mcp_server"
        }
      }
    }
    Do not add an alwaysAllow list. Without one, Roo Code asks before each ModelBrain tool runs.
  4. Save the file. Roo Code picks up the change and lists ModelBrain in its MCP panel.
  5. Check it is connected. Ask Roo Code to remember something, then recall it in a new task.
Questions

What about the project file?

Choosing Edit Project MCP opens .roo/mcp.json in the project, creating it if needed. If the same server name is in both files, the project one wins. Use it only if you want ModelBrain in one project.

Will Roo Code ask before using ModelBrain's tools?

Auto approval is off by default and works per tool. It stays off unless you turn on the Use MCP servers option and tick Always allow beside a tool.

How do I undo it?

Remove the modelbrain entry, or set disabled to true. Your memories are not stored in that file.

Has this been tested?

We have tested this configuration against sample files and the ModelBrain setup code, but not yet by hand on a real install of Roo Code. If ModelBrain does not appear in Roo Code after you follow these steps, tell us through the Support page and we will fix this guide.

Not installed yet?

Start with the install guide.

Install ModelBrain →
Then

A 10-minute walkthrough: add a folder, ask something that needs two notes, see the citation.

Quickstart →