@bonniebuilds/codes
v1.3.0
Published
Bonnie Codes CLI: sign in to Bonnie and serve its defect and review tools to Claude Code, Codex and Cursor over MCP.
Readme
Bonnie Codes CLI
Connect Claude Code, Codex or Cursor to Bonnie Codes. Your agent can then start a review, work through the defects Bonnie finds, and have Bonnie check its fixes.
Install
Requires Node 22.19 or later.
npm install -g @bonniebuilds/codesYou can also skip the install and run it with npx -y @bonniebuilds/codes, which is fine for bonnie mcp in an MCP client config. For bonnie setup and bonnie setup runtime, install it globally: they record where bonnie is, and npm can clear the copy npx runs from.
Sign in
In Bonnie Codes, open Connect agent and copy the login command. Your token and company are already filled in:
bonnie login --company <company-id> --token <token>bonnie login signs in to https://codes.bonniebuilds.com unless you pass --app-url. A command with --foundation in it works too: since 1.2.0 that is the default.
Run bonnie foundation whoami to check it worked. Your login is saved in ~/.bonnie/config.json, not in your repo.
Add Bonnie to your agent
Claude Code
In a project, bonnie setup claude does this for you: it adds bonnie mcp to the project's .mcp.json and approves it in .claude/settings.local.json, keeping any other servers you have. Claude Code asks once whether you trust the folder; Bonnie's tools then load with no further approval. The entry runs bonnie by name, so it needs the global install. To add it by hand instead:
claude mcp add bonnie -- npx -y @bonniebuilds/codes mcpAdd --scope user to use it in every project.
Codex
codex mcp add bonnie -- npx -y @bonniebuilds/codes mcpCursor
Add this to .cursor/mcp.json, or ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"bonnie": {
"command": "npx",
"args": ["-y", "@bonniebuilds/codes", "mcp"]
}
}
}If you installed the CLI globally, use bonnie mcp in place of npx -y @bonniebuilds/codes mcp. It starts faster.
Bonnie's agent runtime
bonnie setup runtimeInstalls the runtime Bonnie's agents run on: a pinned Node and agent runtime, each checked against a pinned hash, under ~/.bonnie/tools. It needs no login and doesn't touch a Paseo you installed yourself. Run in a Bonnie project that has no choice yet, it asks how that project's agents run: in the macOS sandbox, or with no sandbox. bonnie setup stores does the same and also sets up the project's task store and palace; bare bonnie setup does both and adds Bonnie to your clients.
The runtime runs agents' tools from the bonnie that set it up, by its full path. Run it from a global install (npm i -g @bonniebuilds/codes), not through npx: npm can clear npx's cache, and then agents' tools can't start until you install the CLI globally and run bonnie setup runtime again. Do the same after you move or reinstall the CLI. The Bonnie Codes desktop app ships its own runtime and CLI, so it needs none of this.
Tools
| Tool | |
| --- | --- |
| start_review | Review a GitHub repo's default branch. A guided review costs 1 credit, a hosted one 2 |
| get_review | Check a review's progress and results |
| list_defects | List the defects a review found |
| get_defect | Get the details of one defect, including its root cause and how to reproduce it |
| report_result | Report your test results for a defect |
| check_fix | Have Bonnie verify a fix you've pushed to a branch |
| set_review_mode | Set your company's default review mode (owners and admins only) |
bonnie mcp --help lists everything the server offers, and bonnie --help lists every command.
License
Apache-2.0
