Docs / Connect / Antigravity
Antigravity reads its MCP servers from one JSON file in your .gemini folder, and connecting ModelBrain means putting one entry in it.
After its first run the file exists but is completely empty, and an empty file is not valid JSON. Pasting a fragment into it breaks it, so the first thing to do is look at what yours holds.
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.
/Applications/ModelBrain.app/Contents/MacOS/mcp_server
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.
/home/you/.local/lib/modelbrain/mcp_server, with your own home folder. The install script puts ModelBrain in ~/.local/lib/modelbrain.
cat ~/.gemini/config/mcp_config.json. If it prints nothing, the file is empty. If it prints JSON, you already have settings to keep.mcpServers object, add only the modelbrain entry inside it, with a comma after the entry before it.{
"mcpServers": {
"modelbrain": {
"command": "/Applications/ModelBrain.app/Contents/MacOS/mcp_server"
}
}
}python3 -m json.tool ~/.gemini/config/mcp_config.json. It prints the file back if it is valid and an error with a line number if it is not.... menu, choose MCP Servers, then Manage MCP Servers. ModelBrain should be listed. Then ask the agent to remember something and recall it in a new chat.Available in 0.5.0. Setup for Antigravity is in ModelBrain 0.5.0 and later. Checked by hand on the released 0.5.0 macOS build: the wizard wrote a valid file, Antigravity loaded ModelBrain, and remember, recall, expand and forget ran without errors. The Windows build has not been tried. If anything differs on your machine, use the manual steps above and tell us through the Support page.
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.
Yes. Quit it completely first (Cmd+Q on a Mac), edit the file, then open it again, so it reads the new file and cannot overwrite your change.
Antigravity also reads a .agents/mcp_config.json file in a project folder. The global file in your home folder is the one this guide uses, and it applies everywhere.
By default it asks for approval each time a tool from a server runs. Antigravity has allow rules that skip that, but we suggest keeping the prompts for a tool that can change what your assistants remember.
Remove the modelbrain entry from the file, or restore a backup copy. Your memories are not stored in that file.
We tested this by hand on a Mac on 2026-10-19 with ModelBrain installed in Applications: ModelBrain loaded from this file and worked in Antigravity, and a session from Antigravity ran remember, recall, expand and forget with no errors. Other setups, such as Windows or Linux, have not been tested. If your result differs, tell us through the Support page and we will fix this guide.
A 10-minute walkthrough: add a folder, ask something that needs two notes, see the citation.
Quickstart →