Skip to content
Download

Brasa with AI

MCP (Model Context Protocol) is a standard for connecting an AI to external tools. brasa_cli has a built-in MCP server: with it, Claude Code, Cursor and Codex test what they did in your Brasa project.

Tool What the AI does
project_info Reads the project summary: rooms, objects and their events, sprites, sounds, interfaces.
validate Checks the project without running the game: invalid JSON, broken references and Lua syntax errors, with file and line.
run_game Runs the game without a window for a few frames and gets the errors (file and line) and what the game printed.
screenshot Sees the game image after a few frames.
render_ui Sees the preview of an interface (HUD, menu).
lua_api Looks up the Lua API names and the documentation instead of guessing.
export_game Exports the game for Windows or Linux.

Each one has its arguments described in MCP tools.

A Brasa project is made of text files: JSON for rooms, objects, sprites and interfaces, and Lua (or C++) for the code. Any AI that edits files can already change it, with no MCP at all. MCP adds what is missing: testing. Without it, the AI writes the code and hands it over without knowing whether the game opens; with it, it validates, runs, reads the error and fixes it.

  • The game runs hidden, without sound and with --no-save: the player’s save is neither read nor written.
  • The server talks to the client only through standard input and output (stdio). It opens no network port and sends nothing out of the machine.
  • What the AI reads from the project files follows the rules of the client you use (Claude Code, Cursor, Codex): that program is what talks to the AI service.
  • The AI edits real files and export_game writes to a folder. Use Git in the project so you can undo.
  1. Connect it to your AI editor: new project, existing project and the steps for each client.
  2. How to ask: ready-made requests and tips.
  3. Problems: when something does not work.