@debugai/mcp
Supports manual setup as an MCP client, with configuration instructions provided in the README.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@debugai/mcpdebug this TypeScript error"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@debugai/mcp
Give your coding agent a debugger instead of a grep loop.
Your agent hands an error to debug_error and gets back the root cause, the exact file and line, and up to 3 ranked fixes as ready-to-apply edits. Each fix is labeled with whether a mechanical check actually passed, so the agent knows which ones were checked and which are the model's own estimate.
Auto-configures Claude Code, Claude Desktop, Cursor, Windsurf, Zed, Gemini CLI, and Cline. Works in any other MCP client with a manual entry. Node 18 or later.
Setup
npx -y @debugai/mcp setupThat is the whole thing. It signs you in through your browser (no key to find or copy), writes the config for every MCP client it finds on this machine, then checks that all of it actually works.
Restart the clients it names and your agent has the tools.
Prefer to read first? debugai.io/start?src=npm walks the same thing per client.
What that command does to your machine
Worth knowing before you run something that edits your editor config:
Signs you in with a short code you confirm in the browser. Free account, 10 debugs a day, no card.
Stores your key in
~/.debugai/config.jsonwith0600permissions. That is the only file that ever holds it.Adds a
debugaientry to the config of each MCP client it detects. Every file is backed up first (<file>.debugai-backup-<timestamp>), every other setting in the file is preserved, and a file it cannot parse is left alone and reported instead. One caveat stated plainly: if your config contains comments, the rewrite drops them, because JSON has nowhere to put them. You get a warning before it happens and the backup still has them.Skips VS Code by default, because the DebugAI extension already registers this server there and a second entry would show every tool twice.
install --client=vscodedoes it anyway if you want the server without the extension.Never writes your key into a client config. Client configs get committed to repos. Keys should not.
Preview it without writing anything:
npx -y @debugai/mcp install --dry-runUndo all of it:
npx -y @debugai/mcp uninstall # removes the entry from every client config
npx -y @debugai/mcp logout # removes the stored keyCommands
Command | What it does |
|
|
| Browser sign-in. |
| Removes the stored key. |
| Which key and account are active right now. |
| Writes client configs. |
| Removes the entry from every client config. |
| Diagnoses a broken setup: key, API reachability, per-client wiring. |
npx -y @debugai/mcp install --list prints every supported client, where its config lives on your OS, and whether DebugAI is already in it.
Signing in from inside a chat
If your agent calls a DebugAI tool before you have signed in, the tool answers with a short code and a URL instead of an error. Confirm it in the browser, tell the agent to try again, and the call goes through. No config editing, and no client restart, because the key is re-read on every call.
Related MCP server: Moth
The tools
debug_error
Give it an error, get an analysis.
Input | Required | Description |
| yes | Full error message, exception, or stack trace. |
| no |
|
| no | Code around the failing line, if the agent has it. |
| no | Path to the file that threw. |
Returns the root cause, up to 3 fixes ranked by confidence, the detected framework, and whether the answer came from cache. Since 2.0 each fix also carries, where derivable: edits (exact old/new strings your agent's edit tool can apply directly), unified_diff, and verify_with (a syntax-level check command to run after applying). Read-only: it never touches your files. Applying a fix is your agent's call, and yours.
Every fix is labeled with its verification state, and there are three of them, not two: verified (a mechanical check passed, currently parse and import classes), failed check (confidence capped hard), or not verified (the confidence number is the model's own estimate, nothing checked it). We label the third case instead of hiding it.
report_outcome
Tell DebugAI whether an applied fix actually worked.
Input | Required | Description |
| yes | The |
| yes |
|
| no | Which ranked fix was applied (1-3). |
| no | If it failed: the error you saw after applying. |
Confirmed rank-1 fixes are remembered per project, so the next hit on the same error starts from the confirmed fix. Failed-fix follow-ups are the feedback that improves future answers. Agents are asked to call this once per applied fix, through the same pipeline human feedback flows through in the VS Code extension.
Example, in Claude Code:
Paste a traceback and ask "why is this failing?". Claude calls
debug_errorand gets back something like:Root cause:
db.sessionis used after the request context closed. Fix 1 (94% confidence): move the query inside the request handler...
Making your agent reach for it
The server tells connecting agents what it is for, but a rule in your project file is the deterministic version. Add this to CLAUDE.md, .cursorrules, or whatever your agent reads:
On any runtime error, exception, or failing test, call the debugai
debug_error tool before attempting your own fix. After applying a fix,
call report_outcome so the project's error memory stays accurate.VS Code
You do not need this package. The DebugAI extension registers the MCP server automatically (VS Code 1.101+) and adds one-click fix apply, proactive scan, and codebase indexing on top. It is on Open VSX too, for Cursor, Windsurf, and VSCodium.
Manual setup
setup covers this, and install --client=<id> covers the case where a client is installed somewhere unusual. If you would still rather edit the file yourself, the entry is the same everywhere:
{
"mcpServers": {
"debugai": {
"command": "npx",
"args": ["-y", "@debugai/mcp"]
}
}
}Where it goes:
Client | File |
Claude Code |
|
Claude Desktop | macOS |
Cursor |
|
Windsurf |
|
Gemini CLI |
|
Cline | VS Code globalStorage, |
Zed uses a different key and a nested command:
{
"context_servers": {
"debugai": {
"source": "custom",
"command": { "path": "npx", "args": ["-y", "@debugai/mcp"] }
}
}
}Then run npx -y @debugai/mcp login once to store your key. If you would rather set the key per client, DEBUGAI_API_KEY in that client's env block still works and still wins over the stored one.
Environment variables
Variable | Default | Description |
| (none) | Your API key. Overrides |
| DebugAI production | Override for self-hosted or staging setups. Falls back to |
|
| Per-request deadline. Deep analyses can take 30-90s. |
|
| Alternate config file location. Rarely needed. |
Limits and honesty
Free tier: 10 debugs/day. Pro ($12/mo): 1,000/mo soft cap, never hard-blocked at it.
When you hit the daily cap the tool says so and stops. It will not silently retry.
Simple errors route to a fast model. Ugly cross-file ones route to a stronger one on paid tiers. The
Model:badge in each response tells you which one answered.Analyses run on DebugAI's servers. The error text and any snippet you pass are sent there, and Claude (Anthropic) does the analysis. Privacy policy: debugai.io/privacy.
Troubleshooting
Run npx -y @debugai/mcp doctor first. It checks your Node version, whether a key is stored and where it came from, whether that key still authenticates against the API, the permissions on the config file, and which detected clients are missing the DebugAI entry. Most answers are in that output.
"authentication failed": the key was rotated or revoked. Run
npx -y @debugai/mcp login --force.Tools do not appear in the client: the client was not restarted, or it reads a different config file.
install --listshows which file was written.Nothing happens on
npx @debugai/mcp: correct. It is a stdio server waiting for an MCP client to speak first. Use--helpto verify the install.Timeouts: deep analyses can take up to 90s. If your client has its own tool timeout, raise it above that.
Changelog
2.1.1: metadata only. Adds mcpName for official MCP registry ownership verification, fixes the npm package page's repository link.
2.1.0: one-command setup. Browser sign-in over a device link (no key pasting), automatic client config writing with backups, doctor for diagnosing a broken setup, and in-conversation sign-in when an agent calls a tool before you have an account.
2.0.0: report_outcome tool, ready-to-apply edits per fix, and the three-state verification label.
Development
npm install
npm test # builds, then runs unit + spawned-process e2e testsSource
github.com/1shizaan/debugai-mcp is the source for this package, mirrored from the directory it is developed in. It carries the full commit history for these files, so git log and git blame work normally.
The client is MIT and complete: the stdio server, the device-link sign-in, the config writer, and the tests are all here. The analysis itself runs on DebugAI's servers and is not part of this package.
Issues and pull requests are welcome on that repository.
MIT © DebugAI
Available Tools
2 toolsdebug_errorDebug ErrorARead-only
Analyze a runtime error, exception, or stack trace and return root cause + ranked fixes. Use whenever the user pastes an error, asks "why is this failing", "what does this error mean", "debug this stack trace", "fix this exception", "analyze this traceback", or shows a Traceback / TypeError / ReferenceError / AttributeError. Works for Python, JavaScript, TypeScript, Go, Rust. Returns root cause explanation plus up to 3 ranked fixes with machine-applicable code edits. After applying a fix, report whether it worked via the report_outcome tool.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | No | Absolute or relative path to the file that threw the error, if known. | |
| language | No | Source language. Use "auto" to let DebugAI detect from the error. | auto |
| errorText | Yes | The full error message, exception, or stack trace text. | |
| codeSnippet | No | Surrounding code lines near where the error was thrown, if available. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true, and the description confirms this by stating it only analyzes and returns root cause and fixes. It adds context about the return format (up to 3 fixes with code edits) and supported languages. No contradictions or missing behavioral details that are critical.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose. It uses efficient sentences and a clear list of use cases. Every sentence adds value without redundancy, and the structure guides the agent on how to use the tool in sequence with a sibling.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 params, 1 required, no output schema), the description provides sufficient context: it explains the return value (root cause + ranked fixes), supported languages, and instructs the agent on the follow-up action (report_outcome). It is complete for the agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description does not add significant meaning beyond the schema; it mentions auto-detection for language and the need for full error text, but these are already in the schema descriptions. Therefore, it does not exceed baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's verb ('Analyze') and resource ('runtime error, exception, or stack trace') and distinguishes it from the sibling 'report_outcome' which is for reporting outcomes. It leaves no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly lists when to use the tool, including specific user phrasings and error types. It also provides a workflow instruction to report outcomes via the sibling tool. However, it does not explicitly mention when not to use it or list alternatives, keeping the score from being a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
report_outcomeReport Fix OutcomeAIdempotent
Report whether a DebugAI fix actually worked after you applied it. Call this ONCE after applying (or abandoning) a fix from debug_error, passing the debug_log_id from that response. If the fix failed, include the new error text — failed-fix follow-ups directly improve future answers for this codebase, and confirmed rank-1 fixes are remembered for the whole team.
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | "worked" = the fix resolved the error; "failed" = it did not (or made things worse). | |
| fixRank | No | Which ranked fix you applied (1-3). Rank 1 outcomes feed team error memory. | |
| newError | No | If result is "failed": the error observed AFTER applying the fix. | |
| debugLogId | Yes | The debug_log_id value from the debug_error response you are reporting on. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotation has idempotentHint=true, and the description advises calling once, which is consistent. The description adds behavioral context about the feedback loop ('failed-fix follow-ups directly improve future answers') and the memory effect for rank-1 fixes, going beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with purpose, no redundant information, and efficient. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers what, when, how, why, and references the sibling tool. It lacks the return value description, but there is no output schema. Given the tool's simplicity, the context is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description does not add new parameter details beyond schema, only contextualizes usage (e.g., 'passing the debug_log_id from that response'). No additional semantic depth.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Report whether a DebugAI fix actually worked'. It specifies the verb 'report' and resource 'fix outcome', and distinguishes from the sibling tool 'debug_error' by indicating it is a follow-up after applying a fix.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit instructions: 'Call this ONCE after applying (or abandoning) a fix from debug_error'. Provides context for when to use (post-fix) and why (to improve future answers and team memory). No ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v2.0.0- First observed
debug_error - First observed
report_outcome
TDQS
The two tools have completely distinct purposes: one for analyzing errors and one for reporting outcomes. There is no overlap or ambiguity.
Both tools use a consistent verb_noun naming pattern (debug_error, report_outcome), making their intent clear and predictable.
Only 2 tools is on the low side, but for a focused debugging utility it feels appropriate and not incomplete. The scope is narrow.
The set covers the core workflow: analyze an error and report the fix outcome. Missing a tool to fetch additional context or logs, but the primary loop is complete.
Maintenance
Related MCP Connectors
MCP-native AI SRE: ask what's broken in production, get a reviewed GitHub fix PR.
- AgentCatOAuthcom.agentcat
Analytics and debugging for your MCP server — explore usage and sessions, then root-cause errors.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA streamlined MCP server that provides essential AI-powered tools for interactive development chat and systematic root cause analysis. It supports multiple AI providers to help developers brainstorm technical solutions and perform evidence-based debugging.-
- AlicenseBqualityCmaintenanceA debugging workflow plugin for AI coding agents. Turns terminal failures into source-backed fixes via MCP and structured skills.2192MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that guides an AI agent through stack trace triage, from raw error to the commit and PR that introduced it.2MIT
- AlicenseNot gradedqualityAmaintenanceA source-aware MCP server that connects AI agents to browser and server runtimes, enabling real-time debugging, monitoring, and automatic fixes via WebSocket or HTTP.2MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1shizaan/debugai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server