MCP server
Ask Mendloop about an error from Claude Code, Cursor or any MCP client, without leaving your editor.
mendloop mcp serve runs Mendloop over the Model Context Protocol on stdio, so Claude Code, Cursor or any other
MCP client can ask what Mendloop knows about an error. It is read-only and scoped to one organization and one
mode (live or test), both fixed by the API key you give it.
1. Create a key#
Settings → API keys → New key, with the issues:read scope. Add projects:read if you want it to see every
project your membership covers. Copy the key (sk_live_… or sk_test_…); it is shown once.
2. Point your client at it#
Pass the key as MENDLOOP_API_KEY. The command runs where your Mendloop backend runs and needs the backend's own
environment (DATABASE_URL, REDIS_URL, the master and secret keys), the same as mendloop worker.
{
"mcpServers": {
"mendloop": {
"command": "uv",
"args": ["run", "--project", "backend", "mendloop", "mcp", "serve"],
"env": { "MENDLOOP_API_KEY": "sk_live_…" }
}
}
}{
"mcpServers": {
"mendloop": {
"command": "uv",
"args": ["run", "--project", "backend", "mendloop", "mcp", "serve"],
"env": { "MENDLOOP_API_KEY": "sk_live_…" }
}
}
}In Claude Code this goes in .mcp.json at the repository root (or use claude mcp add). In Cursor,
Settings → MCP → Add new MCP server, or ~/.cursor/mcp.json under mcpServers.mendloop.
3. Ask#
Reconnect the client (Claude Code: /mcp; Cursor: toggle the server off and on) and ask something like "what does
Mendloop know about src/cart/total.ts?" or "find the issue about cart is undefined and tell me its root
cause."
Tools#
| Tool | Returns |
|---|---|
find_issue(query, limit) |
Issues whose title, culprit or short id matches, most recently seen first |
get_root_cause_report(issue_id or report_id) |
The root cause, its evidence (cited code, commits, events, releases or past memories) and the fix plan |
ask_the_brain(question) |
A cited answer from your organization's memories, or the closest memories when nothing can be answered with a citation. Makes one model call. |
module_knowledge(path) |
What the Brain remembers about a file: hotspot score, owners, anchor |
fix_recipes(path, symbol?) |
Past fixes for a file (and, with symbol, ones that mention it), and what was tried and rejected before |
A key's scope and your role gate every tool exactly as they gate the matching page in the web app: a Viewer sees what a Viewer sees, and a test-mode key never sees live data. Nothing here writes: no tool files a comment, starts an investigation or approves a fix.