Docs / Connect / VS Code
VS Code keeps MCP servers in an mcp.json file, and connecting ModelBrain means adding one entry to it.
VS Code uses a different top-level key from nearly every other client. Its file says servers where the others say mcpServers, so an entry pasted from another guide can sit in the file and do nothing.
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.
mcp.json for your profile, so ModelBrain is available in every workspace. For one project only, use .vscode/mcp.json in that project instead.servers. If the file is empty, this is the whole content. If it already has a servers object, add only the modelbrain entry inside it, with a comma after the entry before it.{
"servers": {
"modelbrain": {
"type": "stdio",
"command": "/Applications/ModelBrain.app/Contents/MacOS/mcp_server"
}
}
}VS Code's own format uses servers. Other clients use mcpServers. If you copy an entry from another guide, change the top-level key.
VS Code asks you to trust a server the first time, and you can reset those trust decisions with the MCP: Reset Trust command. Read the prompt before accepting it.
Remove the modelbrain entry, or stop the server from MCP: List Servers. Your memories are not stored in that file.
We have tested this configuration against sample files and the ModelBrain setup code, but not yet by hand on a real install of VS Code. If ModelBrain does not appear in VS Code after you follow these steps, 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 →