Claude Desktop
Add the DebugAI tools to the Claude Desktop app with one command, then tell it which project you mean.
Claude Desktop gets the three DebugAI tools: lookup_error, debug_error and report_outcome. You need Node.js 18.14.1 or later. node -v prints your version.
Run setup
npx -y @debugai/mcp setupIt signs you in through your browser with a short code (free account, 10 debugs a day, no card). Then it adds DebugAI to every MCP client it finds on this machine, Claude Desktop included, and finishes by running doctor to check the result.
To change Claude Desktop's config and nothing else:
npx -y @debugai/mcp login
npx -y @debugai/mcp install --client=claude-desktopAdd --dry-run to the install line to print the change without writing anything.
Quit and reopen Claude Desktop
Quit Claude Desktop completely, then open it again. Closing the window is not enough.
Check it works
Run npx -y @debugai/mcp doctor. Under MCP clients you want this line:
✓ Claude Desktop — debugai configuredThen hand Claude an error and ask for the lookup by name:
Use the debugai lookup_error tool on this error: TypeError: Cannot read properties of undefined (reading 'name')lookup_error makes no model call and does not count against your daily limit, so this check is free.
You'll know it worked when
Claude calls lookup_error and gets an answer back from DebugAI, such as Not seen before in this project (shop). Call debug_error with the full error for an analysis. An answer that starts DebugAI memory is off for this call also means the connection works. The server just does not know your project yet, which the next section fixes.
Tell it which project you mean
An agent in a terminal, like Claude Code, usually runs inside your repository, and DebugAI takes the project from that folder. Claude Desktop is an app with no project folder of its own, so the server may not know which repository you mean. It reads files only inside a project, and it never treats your home folder, a folder above it or the filesystem root as one. When it has no project, the footer of a debug_error answer says so:
No local files read: there is no usable project root (none named, or only your home directory, a folder above it or the filesystem root, which are never one). Pass projectRoot to name the project.Name the folder in your message, for example "the project is in /Users/you/shop", and Claude can pass it to the tools as projectRoot. An absolute path to a file inside the repository works too: the server takes the repository that file is in. With a project named, DebugAI reads the source files the stack trace names, and the error is filed under that project's memory.
The config it writes
setup adds one entry to mcpServers in claude_desktop_config.json, in Claude's folder under your system's app data:
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"debugai": {
"command": "npx",
"args": ["-y", "@debugai/mcp@latest"]
}
}
}- Your key is never written into this file. It lives in
~/.debugai/config.jsonwith0600permissions, and every MCP client on the machine reads it from there. - Before changing the file,
installsaves a copy beside it, namedclaude_desktop_config.json.debugai-backup-<timestamp>. Every other setting in the file is kept. - If the file has comments, the rewrite drops them, and
installwarns you when it does. The backup keeps them. npx -y @debugai/mcp uninstalltakes the entry out of every client config again.
setup adds Claude Desktop only when it finds Claude's folder under your app data. If its output does not list Claude Desktop, run npx -y @debugai/mcp install --client=claude-desktop, which writes the file either way.
Next
- Work with your agent: the lookup, debug and report loop, and how to point an answer at the right project.
- MCP server troubleshooting:
doctoroutput, sign-in from inside a chat, and the errors an agent can get back.