MCP Server
Connect AI coding agents to DebugBundle via the Model Context Protocol.
The DebugBundle MCP server exposes debugging tools that AI agents (GitHub Copilot, Cursor, Cline, and others) can call directly. Instead of switching between your IDE and a dashboard, your agent can query incidents, retrieve bundles, manage tokens, and run reproductions inline.
What is MCP?
The Model Context Protocol is an open standard for connecting AI assistants to external tools. MCP servers expose typed tool definitions that agents discover and invoke during conversations.
DebugBundle implements an MCP server that wraps the same domain services used by the API and CLI, ensuring consistent behavior across all interfaces.
Supported Node.js versions: 22.x through 26.x.
Official Registry
Available on the official MCP Registry as com.debugbundle/mcp.
- Registry listing: com.debugbundle/mcp
- API record:
/v0.1/servers/com.debugbundle%2Fmcp/versions/latest - Distribution status and marketplace listings: MCP Distribution
Install and Use
Run the MCP server directly with npm:
npx @debugbundle/mcpOr install it globally:
npm install -g @debugbundle/mcp
debugbundle-mcpThe package ships MCP Registry metadata as server.json with server name com.debugbundle/mcp.
DebugBundle does not currently publish a hosted Remote MCP connector. The supported public MCP path is the local stdio package.
Install Matrix
| Environment | Recommended Path | Notes |
|---|---|---|
| Generic local MCP client | npx @debugbundle/mcp | stdio transport |
| Claude Desktop local MCP | local MCP server config | uses local machine auth/config |
| Cursor | MCP config with npx @debugbundle/mcp | stdio transport |
| VS Code / GitHub MCP Registry | com.debugbundle/mcp | official registry metadata |
| OpenClaw / ClawHub | DebugBundle skill plus MCP config | use the published skill for workflow guidance |
| CI/headless agents | DEBUGBUNDLE_MEMBER_TOKEN | never use a project token |
| Self-hosted DebugBundle | DEBUGBUNDLE_API_URL plus member auth | points the server at your API base URL |
Authentication
The MCP server supports three authentication modes:
| Mode | How it Works | Use Case |
|---|---|---|
| Local | Uses CLI auth state from ~/.debugbundle/auth.json | Default for local development |
| Environment token | Reads DEBUGBUNDLE_MEMBER_TOKEN from the MCP server environment | Marketplace-managed, remote, and headless clients |
| Bearer Token | Pass bearerToken parameter on tool calls | CI/CD, remote agents, headless environments |
When running locally alongside the CLI, the MCP server automatically picks up your authenticated session. No additional configuration is required.
If the CLI is not authenticated yet, bootstrap it first with any of these paths:
debugbundle login
debugbundle login dbundle_mem_xxxxxxxxxxxx
debugbundle login --github
debugbundle login --github-devicedebugbundle login with no flags opens an interactive chooser in a TTY. --github first tries an existing gh auth token for a fully headless agent flow, then falls back to GitHub device flow when browser approval is needed. Email-code signup and manual token creation remain available in the web app for users who do not use GitHub.
For remote, marketplace-managed, or headless environments, prefer setting the member token in the MCP server environment:
{
"mcpServers": {
"debugbundle": {
"command": "npx",
"args": ["@debugbundle/mcp"],
"env": {
"DEBUGBUNDLE_MEMBER_TOKEN": "dbundle_mem_a1b2c3d4..."
}
}
}
}Use DEBUGBUNDLE_API_URL in the same environment block only for self-hosted or non-production API hosts. Individual tool calls can still pass a member token as bearerToken:
{
"tool": "list_incidents",
"arguments": {
"bearerToken": "dbundle_mem_a1b2c3d4...",
"limit": 5
}
}Configuration
VS Code (GitHub Copilot)
Add to your VS Code settings or .vscode/mcp.json:
{
"mcp": {
"servers": {
"debugbundle": {
"command": "npx",
"args": ["@debugbundle/mcp"]
}
}
}
}Cursor
Add to your Cursor MCP configuration:
{
"mcpServers": {
"debugbundle": {
"command": "npx",
"args": ["@debugbundle/mcp"]
}
}
}Generic MCP Client
Any MCP-compatible client can connect over stdio with the published package:
npx @debugbundle/mcpThe server communicates over stdin/stdout using the MCP JSON-RPC protocol.
Troubleshooting
| Symptom | Check |
|---|---|
| Node.js launch failure | Use Node.js 22.x through 26.x. If the client launches an older runtime, point the MCP command at a supported node or npx installation. |
| Missing local auth | Run debugbundle login on the same machine, or set DEBUGBUNDLE_MEMBER_TOKEN in the MCP server environment for headless and managed clients. |
| Invalid token | Use a member token that starts with dbundle_mem_. Project tokens are write-only SDK ingestion credentials and are not valid for MCP retrieval or management. |
| Wrong API host | Omit DEBUGBUNDLE_API_URL for DebugBundle Cloud. Set it only for self-hosted, staging, or other non-default API hosts. |
| Local repo not initialized | Run debugbundle setup in the repository before using local-only diagnostics, local bundle analysis, or generated project-skill workflows. Hosted incident and bundle retrieval can still work with member auth. |
Tool Categories
The MCP server provides approximately 95 tools organized into these categories:
| Category | Tools | Description |
|---|---|---|
| Setup & Diagnostics | 5 | Validate connectivity and local setup |
| Incident Retrieval | 7 | Query, inspect, and manage incidents |
| Token Management | 6 | Create and manage project/member tokens |
| Webhook Management | 7 | Configure webhook endpoints and deliveries |
| Alert Management | 4 | Create and manage alert rules |
| Weekly Reports | 4 | Generate and retrieve analysis reports |
| Services | 1 | List discovered services |
| Projects | 4 | Create, list, update, and delete projects |
| Health Checks | 8 | Manage hosted availability checks and retained status history |
| Probes | 3 | Activate, list, and deactivate debug probes |
| Capture Policy | 2 | Get and update capture policies |
| Billing | 5 | Manage subscriptions, trials, and capacity |
| Members | 6 | Manage project collaborators and invitations |
| Analysis | 1 | Deep incident analysis |
See the MCP Tools Reference for the complete tool catalog with parameters, and MCP Workflows for practical agent workflow patterns.
Next Steps
- MCP Distribution — Official package, registry, marketplace, and skill channels
- MCP Tools Reference — Complete tool catalog
- MCP Workflows — Agent workflow patterns
- CLI Cloud Workflow — CLI authentication (shared with MCP)