Docs / Connect / Gemini CLI

Connect ModelBrain to Gemini CLI

Gemini CLI reads MCP servers from the mcpServers object in its settings.json, so connecting ModelBrain is one entry in a file you already have.

The one setting worth refusing is the one that looks convenient: Gemini CLI can mark a server as trusted to skip its confirmation prompts. A memory tool that reads and writes your notes should keep the prompts on.

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 ~/.gemini/settings.json. Run Gemini CLI once first if the file does not exist yet.
  3. Add ModelBrain inside the mcpServers object. The file usually already holds other settings, such as a security block that Gemini CLI writes on first run. Keep them, and put a comma after the last one before your new block. Keep any servers already listed, and do not add a trust line.
    {
      "security": {
        "auth": {
          "selectedType": "oauth-personal"
        }
      },
      "mcpServers": {
        "modelbrain": {
          "command": "/Applications/ModelBrain.app/Contents/MacOS/mcp_server"
        }
      }
    }
    The security block above is only an example of an existing setting. Leave whatever your own file has.
  4. Check the file is valid JSON. In a terminal run python3 -m json.tool ~/.gemini/settings.json. It prints the file back if it is valid and an error with a line number if it is not.
  5. Check it is connected. In a terminal run gemini mcp list. ModelBrain should show as Connected. Start a new Gemini CLI session afterwards so it picks the change up.
Or use the setup wizard

Available in 0.5.0. Setup for Gemini CLI is in ModelBrain 0.5.0 and later. We checked the manual config by hand (gemini mcp list showed ModelBrain connected), but we have not yet clicked this button on a real install. If anything differs on your machine, use the manual steps above and tell us through the Support page.

  1. Open Setup guide from the ModelBrain menu bar or tray icon.
  2. Find the Gemini CLI card and click Set up Gemini CLI. The card appears only when you have run Gemini CLI at least once, so its ~/.gemini folder exists. The wizard never creates a client's folders for you.
  3. Let it write the entry. It adds modelbrain to ~/.gemini/settings.json, keeps your other servers, and saves a one-time copy of the original file next to it with the suffix .bak-original. If the file cannot be read as valid, the wizard stops and leaves it alone.
  4. Start a new Gemini CLI session, then run gemini mcp list and look for modelbrain.

Running the wizard twice is safe: it recognises its own entry and does nothing. The uninstaller removes only the entry that points at ModelBrain.app.

Questions

Can I sign in to Gemini CLI with my Google account?

Not as an individual right now. When we tried, Gemini CLI said that sign-in is no longer supported for individuals and pointed to Google's Antigravity products. Connecting ModelBrain does not need a sign-in, and gemini mcp list works without one. To chat with Gemini you will need another route, such as an API key.

Why leave trust off?

With trust off, Gemini CLI asks before it runs a ModelBrain tool. That is a small cost for a tool that can change what your assistants remember about you.

Does this also connect Antigravity?

No. Antigravity keeps its own file at ~/.gemini/config/mcp_config.json, separate from the settings.json used here. It has its own guide.

How do I undo it?

Remove the modelbrain entry from mcpServers. Your memories are not stored in that file.

Has this been tested?

We checked this by hand on Gemini CLI 0.64.0 on macOS on 2026-10-19: after adding the entry, gemini mcp list showed modelbrain as Connected. We have not yet tested remembering and recalling through Gemini, because Google sign-in is not available to individuals. If your result differs, 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 →