Cursor integration
Mushi and Cursor close the development loop together: users report bugs, Mushi classifies them and builds fix briefs, Cursor agents read the briefs and write the patches, and the judge scores each fix so the lesson library gets smarter.
The three-line setup:
npx mushi-mushi login --api-key mushi_xxx --endpoint https://<ref>.supabase.co/functions/v1/api
npx mushi-mushi setup --ide cursor
# Restart CursorStep-by-step
Log in
npx mushi-mushi login \
--api-key mushi_xxx \
--endpoint https://<ref>.supabase.co/functions/v1/api \
--project-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxFind your credentials in the admin console → Settings → API Keys.
Wire Cursor
npx mushi-mushi setup --ide cursorThis writes .cursor/mcp.json with the mushi server block. If the file
already exists, the command merges the block without overwriting other entries.
(Optional) Add the evolution-loop coding rules
npx mushi-mushi setup --ide cursor --with-rulesWrites .cursorrules with rules telling the agent to:
- Call
get_fix_contextbefore writing a fix - Check the lesson library for patterns
- Call
submit_fix_resultafter pushing a branch
Download the template to inspect it first: cursor.cursorrules
Restart Cursor
Reload the window (Ctrl+Shift+P → “Developer: Reload Window”) or quit
and reopen. The Mushi tools appear in the MCP tools picker.
Verify
In Cursor chat, ask: “Use the Mushi MCP to list my recent reports”. You should see your most recent bug reports from the dashboard.
Available tools in Cursor
| Tool | What Cursor can do |
|---|---|
get_recent_reports | ”What are users hitting right now?” |
get_fix_context | ”Give me a fix brief for report abc-123” |
search_reports | ”Find all reports about the login button” |
get_blast_radius | ”What else does this component touch?” |
dispatch_fix | ”Dispatch the agentic fix for this report” |
triage_next_steps | ”What should I fix next?” |
run_nl_query | ”How many critical bugs landed this week?” |
Keep lessons current
# Pull the latest project lessons into .mushi/lessons.json
npx mushi-mushi sync-lessonsRun this in CI after each deploy so Cursor agents always have the most up-to-date anti-patterns from your project’s fix history.
Connecting GitHub for auto-PR
For Cursor to open draft PRs via dispatch_fix, install the Mushi GitHub
App on your repo. In the admin console, go to Repo and click
“Install Mushi on GitHub” — it handles the OAuth round-trip and stores
the installation token automatically.
Troubleshooting
Cursor shows no Mushi tools: Reload the window and check that
.cursor/mcp.json exists. Run mushi whoami to verify credentials.
[INSUFFICIENT_SCOPE] error: Your key needs mcp:write scope to
dispatch fixes. Rotate to a key with the right scope in Settings → API Keys.
Stale lessons: Run mushi sync-lessons to pull the latest rules.
See the MCP quickstart for a full tool catalog and the security docs for what data stays in your account.