Prerequisites
- Node.js 20 or newer
- Cursor 0.42 or later (MCP support)
- agentmako on PATH
$ npm install -g agentmako $ cd /path/to/your/project $ agentmako connect . --no-db $ agentmako doctor
Add to mcp.json
Per-project (recommended)
Create .cursor/mcp.json at your project root:
{ "mcpServers": { "mako-ai": { "command": "agentmako", "args": ["mcp"] } } }
Global
If you want Mako everywhere, put the same JSON in
~/.cursor/mcp.json instead.
Enable in settings
Open Cursor Settings → Features → MCP (or
Cursor Settings → MCP in newer builds). You should
see mako-ai with a green dot. If it's red, click it
to see the error.
While you're there: Cursor lets you toggle individual tools.
For most projects, leaving everything on is fine. If you want
to start small, enable just context_packet,
reef_scout, and repo_map.
First task
Open Composer (⌘ I / Ctrl I), switch to Agent mode, and try:
Use the mako-ai context_packet tool first. Task: "trace how a user lands on the dashboard after sign-in". Show me the packet, then walk me through the relevant files — don't grep until after.
You'll see Cursor make a single Mako tool call, get back the target file plus routes and findings, and use that as the starting point. Token usage on the trace is dramatically lower than the unguided version.
Cursor Rules: tell it when to use Mako
Cursor's Project Rules system lets you steer the agent. Add a
rule file at .cursor/rules/mako.mdc:
--- description: Use agentmako before grep alwaysApply: true --- When the user asks a question that requires locating code in this repo, call the mako-ai server's context_packet or reef_scout tool BEFORE issuing any grep / file reads. For natural-language repo questions, prefer reef_scout. For concrete coding tasks, prefer context_packet. Only fall back to grep if Mako returns no candidates.
Or paste the agentmako project's AGENTS.md as the body of the rule for the full guidance.
Troubleshooting
Red dot in MCP settings
Click the server entry to see the error message. Most common:
Cursor can't find agentmako on PATH because it was
launched before the install finished. Quit Cursor fully and
re-open.
Server starts but tools never get called
Cursor's auto-tool-selection is conservative. Add the project rule from section 05, or explicitly ask: "use the mako-ai context_packet tool for this." Once the agent uses it once and sees the value, it tends to keep reaching for it.
Windows: command not found
Use the absolute path. where agentmako in
PowerShell, then put the full .cmd path in
command.