Skip to content
Download

Connect it to your AI editor

For the AI to use the MCP tools, the client needs to know how to open the server: the command brasa_cli mcp --project <project folder>. Brasa writes that configuration into the project.

New project already creates the project ready for AI. Besides the game files, it writes:

File What it is for
AGENTS.md The project context for the AI: the folder structure, the file types, the names, the Lua (or C++) events and how to validate and run. Codex and Cursor read it on their own.
CLAUDE.md A single line that tells Claude Code to read AGENTS.md.
.mcp.json The brasa server for Claude Code.
.cursor/mcp.json The brasa server for Cursor.

Codex does not read project files for this: see Codex.

  1. Open the project in the editor.
  2. In the Project menu, choose Set up AI (MCP)….
  3. Click Write files.

The window writes the four files above. AGENTS.md and CLAUDE.md are only created if they do not exist yet. In the two configuration files, Brasa adds the brasa server and keeps the other servers that were already there. If one of them is not valid JSON, the window warns you and leaves it alone: fix or delete the file.

The window also shows the Codex snippet, with a Copy button.

The configuration file looks like this. The paths are absolute, because the client may open the server in another folder.

{
"mcpServers": {
"brasa": {
"command": "C:/Users/voce/AppData/Local/Programs/Brasa/brasa_cli.exe",
"args": ["mcp", "--project", "C:/Users/voce/Jogos/Meu Jogo"]
}
}
}

On Windows, the installer puts Brasa in %LOCALAPPDATA%\Programs\Brasa, with brasa_cli.exe next to the editor.

  1. Open the terminal in the project folder (the one with the project.brasa).

  2. Run claude.

  3. The first time, Claude Code asks whether you trust the brasa server from .mcp.json. Approve it.

  4. Type /mcp. The brasa server should show as connected, with the seven tools.

  1. Open the project folder in Cursor.

  2. Open the Cursor settings and go to MCP. The brasa server shows in the list, coming from .cursor/mcp.json.

  3. If it is off, turn on the switch next to the name.

  4. In the chat, use Agent mode: it is the one that calls the tools.

Codex reads its servers from the ~/.codex/config.toml file, not from the project. On Windows, the folder is %USERPROFILE%\.codex.

  1. In the editor, open Project › Set up AI (MCP)… and click Copy on the Codex snippet.

  2. Paste the snippet at the end of config.toml (create the file if it does not exist).

  3. Restart Codex.

The snippet has this format:

[mcp_servers.brasa]
command = "C:/Users/voce/AppData/Local/Programs/Brasa/brasa_cli.exe"
args = ["mcp", "--project", "C:/Users/voce/Jogos/Meu Jogo"]

The config.toml applies to the whole computer. For another project, change the --project or use a different server name ([mcp_servers.brasa_other]).

Any MCP client that opens servers over stdio works. The command is:

brasa_cli mcp --project <project folder>

The protocol is JSON-RPC over stdio, one message per line. Without --project, each tool accepts the project argument, with the project folder.

The configuration stores the path of brasa_cli and of the project folder. If you move the project or install Brasa somewhere else, open the project, run Project › Set up AI (MCP)… again and click Write files. Also update the Codex snippet and restart the client.