DebugBundle MCP: runtime error reporting, incident response, health checks, and product analytics.
Production debugging bundles for AI agents, with runtime error reporting and incident response.
DebugBundle provides runtime error reporting, crash reporting, incident response, endpoint health checks, and product analytics for humans and AI agents. It captures runtime failures, groups them into incidents, and publishes deterministic debug bundles. Its monitoring scope is customer-facing runtime behavior and endpoint health, not generic infrastructure metrics.
Modern AI agents are useful only when they get enough trustworthy context. DebugBundle packages the facts around a production incident into a versioned bundle instead of leaving agents to scrape dashboards, logs, traces, and chat threads.
Key properties:
.debugbundle/local/events/, then connect to DebugBundle Cloud when ready.AnalyticsBundle extends debugging from incident evidence to product-usage evidence without turning DebugBundle into a long-term raw-event store. It is opt-in browser analytics for the questions a human or agent needs to improve a product: visits and active users, routes and funnels, device/browser/OS/language segments, feature use, friction markers, incident impact, and bounded structured journey replay.
See the repository public interface contract for API/CLI/MCP parity and the self-host guide for retention and upgrade behavior.
Choose the path that matches how you want to evaluate DebugBundle.
Use Cloud when you are preparing a hosted deployment or want team-visible incidents, alerts, webhooks, GitHub automation, API access, and MCP access.
npm install -g @debugbundle/cli
debugbundle setup
debugbundle login
debugbundle connect
debugbundle connect creates or selects a cloud project, creates a write-only project token, and updates .debugbundle/local/connection.json. Put the shown project token in your hosted environment:
DEBUGBUNDLE_PROJECT_TOKEN=dbundle_proj_xxxxxxxxxxxx
Add the smallest SDK or ingestion path that matches your app, deploy it with the token configured, then verify ingestion:
debugbundle verify cloud --project-id proj_01HXYZ... --trigger-5xx
debugbundle incidents --source cloud
debugbundle inspect inc_01HXYZ...
See the full Cloud quickstart and connect-to-cloud guide.
Use local-only mode when you want captured data and bundles to stay on the machine or storage volume where the SDK and CLI run.
npm install -g @debugbundle/cli
debugbundle setup --project-mode local-only
Initialize an SDK in local mode where supported, or use debugbundle watch for existing logs. After triggering a test error:
debugbundle process
debugbundle incidents --source local
debugbundle inspect inc_local_...
Local events are written under .debugbundle/local/events/; generated bundles are written under .debugbundle/bundles/. See the local-only guide.
All SDKs follow the same universal interface: init, captureException, captureError, captureLog, captureRequest, captureMessage, setContext, probe, and flush.
| Runtime | Package | Install | Main docs |
|---|---|---|---|
| Node.js | @debugbundle/sdk-node | npm install @debugbundle/sdk-node | Node.js SDK |
| Browser | @debugbundle/sdk-browser | npm install @debugbundle/sdk-browser | Browser SDK |
| Python | debugbundle-python | pip install debugbundle-python | Python SDK |
| PHP | debugbundle/sdk-php | composer require debugbundle/sdk-php | PHP SDK |
| Java | com.debugbundle:debugbundle-spring-boot-starter | Maven or Gradle dependency | Java SDK |
| .NET | DebugBundle.AspNetCore / DebugBundle.Sdk | dotnet add package DebugBundle.AspNetCore | .NET SDK |
| Go | github.com/debugbundle/debugbundle-go | go get github.com/debugbundle/debugbundle-go | Go SDK |
| Ruby | debugbundle | gem install debugbundle | Ruby SDK |
| Android | com.debugbundle:debugbundle-android | Maven or Gradle dependency | Android SDK |
| iOS | DebugBundle | Swift Package Manager or CocoaPods | iOS SDK |
| React Native | @debugbundle/sdk-react-native | npm install @debugbundle/sdk-react-native | React Native SDK |
| WordPress | debugbundle-wordpress | WordPress.org plugin directory | WordPress plugin |
npm install @debugbundle/sdk-node
import { debugbundle } from "@debugbundle/sdk-node";
debugbundle.init({
projectToken: process.env.DEBUGBUNDLE_PROJECT_TOKEN,
environment: "production",
service: "api"
});
debugbundle.captureExceptions();
debugbundle.captureRejections();
Express, Fastify, Next.js, pino, winston, bunyan, local file transport, remote capture policy, probes, and browser relay handlers are supported.
npm install @debugbundle/sdk-browser
import { createDebugBundleBrowserSdk } from "@debugbundle/sdk-browser";
const debugbundle = createDebugBundleBrowserSdk();
debugbundle.init({
transportMode: "relay",
endpoint: "/debugbundle/browser",
environment: "production",
service: "web"
});
For full-stack apps, prefer a backend browser relay so project tokens stay server-side. Same-origin relay paths are simplest; split frontend/backend deployments can use explicit browser relay mode with an absolute backend relay URL and backend origin allowlisting. Frontend-only deployments can send directly to DebugBundle Cloud with a dedicated public write-only token and an allowed-origin restriction. See Browser Relay Setup.
pip install debugbundle-python
import os
import debugbundle
debugbundle.init(
project_token=os.environ["DEBUGBUNDLE_PROJECT_TOKEN"],
environment="production",
service="api",
)
debugbundle.capture_exceptions()
debugbundle.capture_logging()
Django, Flask, FastAPI, Python logging, structlog, loguru, local file transport, remote capture policy, probes, and browser relay helpers are supported.
composer require debugbundle/sdk-php
<?php
use DebugBundle\DebugBundle;
DebugBundle::init([
'projectToken' => getenv('DEBUGBUNDLE_PROJECT_TOKEN'),
'environment' => 'production',
'service' => 'api',
]);
DebugBundle::captureErrors();
DebugBundle::captureExceptions();
DebugBundle::captureShutdown();
Laravel, Symfony, Monolog, local file transport, remote capture policy, probes, and browser relay adapters are supported.
gem install debugbundle
require "debugbundle"
DebugBundle.init(
project_token: ENV["DEBUGBUNDLE_PROJECT_TOKEN"],
environment: "production",
service: "api"
)
DebugBundle.capture_exceptions
Rails, Rack, Sidekiq, Ruby Logger, Semantic Logger, local file transport, remote capture policy, probes, and browser relay handlers are supported.
<dependency>
<groupId>com.debugbundle</groupId>
<artifactId>debugbundle-spring-boot-starter</artifactId>
<version>0.1.0</version>
</dependency>
debugbundle:
project-token: ${DEBUGBUNDLE_PROJECT_TOKEN}
environment: production
service: api
project-mode: connected
The Spring Boot starter supports servlet request capture, MVC exception capture, Logback capture, remote config, probes, and an optional browser relay route.
go get github.com/debugbundle/debugbundle-go
client := debugbundle.New(debugbundle.Config{
ProjectToken: os.Getenv("DEBUGBUNDLE_PROJECT_TOKEN"),
Environment: "production",
Service: "api",
})
defer func() { _ = client.Flush(context.Background()) }()
net/http, Gin, Echo, slog, zap, zerolog, local file transport, remote capture policy, probes, and browser relay handlers are supported.
Install DebugBundle from the WordPress.org plugin directory, then open Settings -> DebugBundle and save your project token. The plugin bundles backend PHP capture, frontend browser capture, and a WordPress REST relay so the project token stays server-side.
The CLI is the daily operational entry point:
npm install -g @debugbundle/cli
debugbundle setup
debugbundle doctor
debugbundle verify local
debugbundle verify cloud --trigger-5xx
debugbundle incidents
debugbundle inspect <incident-id>
Automation can use the HTTP API directly or the MCP server for agent workflows:
Marketplace-managed MCP clients can run npx @debugbundle/mcp and provide DEBUGBUNDLE_MEMBER_TOKEN in the MCP server environment. The official MCP Registry name is com.debugbundle/mcp; project tokens are SDK write-only ingestion credentials and must not be used for MCP retrieval or management.
The separate OpenAI Plugin 1.0.0 production candidate combines a tailored skill with an OAuth-protected twenty-three-tool read-only remote projection plus the owner-approved existing-app consent, synthetic-reviewer, and Settings revocation surfaces. Its nine analytics tools expose bounded aggregate usage, route, device, acquisition, action, funnel, journey-pattern, and incident-impact metrics while excluding individual journeys, custom dimensions, analytics bundles/opportunities, and mutations. It is active at the permanent https://mcp.debugbundle.com/mcp origin for owner-approved Developer Mode validation, preserves the stdio/OpenClaw surface, and is not submitted, published, or publicly installable.
For local visual review without a real provider interaction, run make dev-openai-plugin-preview and open http://localhost:5291/__dev/openai-plugin. The opt-in development route uses the production UI components with deterministic synthetic data and provides every consent/reviewer/Settings state, all 64 scope subsets, and 390 px, 768 px, and 1280 px iframe viewports. Its actions stay in browser memory and never call OAuth, reviewer, grant, or revocation APIs. The route is absent from production builds, and preview evidence does not replace manual accessibility, MCP Inspector, outside-network reviewer, ChatGPT Developer Mode, deployed, submission, or publication validation.
apps/
api/ Fastify ingestion and retrieval API
worker/ BullMQ processing worker for normalization, grouping, bundles, alerts, and webhooks
cli/ @debugbundle/cli command-line interface
mcp/ @debugbundle/mcp server for agent workflows
web/ React/Vite app for interactive project and incident management
packages/
auth/ Auth, sessions, token generation, token hashing
bundle-engine/ Deterministic bundle assembly
event-normalizer/ Event validation, normalization, classification, fingerprinting
log-parser/ CLI log ingestion parser registry
redaction/ Sensitive data scrubbing
retrieval-client/ Shared retrieval API client used by CLI and MCP
shared-types/ Zod schemas, TypeScript types, bundle/event contracts
storage/ Postgres, Redis, S3-compatible storage adapters and migrations
sdks/
debugbundle-js/ Local clone of the JS SDK repo
debugbundle-python/ Local clone of the Python SDK repo
debugbundle-php/ Local clone of the PHP SDK repo
debugbundle-java/ Local clone of the Java SDK repo
debugbundle-go/ Local clone of the Go SDK repo
debugbundle-wordpress/ Local clone of the WordPress plugin repo
debugbundle-ruby/ Local clone of the Ruby SDK repo
site/
Public docs, marketing, reference, and blog site clone
The SDKs are standalone repositories under the debugbundle GitHub organization. This core repository owns the product services, shared contracts, CLI/MCP surfaces, and core-owned shared JS packages.
Use the Make targets so routine commands run in Docker-scoped environments.
make install
make infra-up
make infra-bootstrap
make dev
Local services:
| Service | Default |
|---|---|
| Web app | http://localhost:5291 |
| API | http://localhost:3003 |
| Postgres | localhost:5434 |
| Redis | localhost:6380 |
| LocalStack S3 | localhost:4567 |
Useful checks:
make lint
make typecheck
make test
make build
make ci
make dev requires DEBUGBUNDLE_PROBE_TRIGGER_SECRET and ANALYTICS_HASH_SECRET in .env. Start from .env.example, then keep local-only overrides in .env.local when needed.
The supported self-host bootstrap lives in deploy/selfhost/.
git clone https://github.com/debugbundle/debugbundle.git
cd debugbundle/deploy/selfhost
cp .env.example .env
docker compose up -d
The self-host stack includes the web app, API, worker, PostgreSQL, Redis, and LocalStack S3. See Self-Hosting and deploy/selfhost/README.md.
The canonical public product release is the root debugbundle repository tag and GitHub Release (v*). Package-specific releases are separate:
cli-v* for @debugbundle/climcp-v* for @debugbundle/mcpshared-js-v* for @debugbundle/shared-types and @debugbundle/redactionStandalone SDK repositories publish and version their own release surfaces independently:
debugbundle-js for @debugbundle/sdk-node and @debugbundle/sdk-browserdebugbundle-python for debugbundle-pythondebugbundle-php for debugbundle/sdk-phpdebugbundle-java for Maven artifactsdebugbundle-go for Go modulesdebugbundle-wordpress for the WordPress pluginThe v1 release train publishes dependency roots before dependent wrappers:
@debugbundle/shared-types and @debugbundle/redaction from the core repo first.@debugbundle/sdk-node and @debugbundle/sdk-browser from debugbundle-js after the matching shared-package version exists on npm.Our own hosted/source-deployed dogfooding surfaces intentionally consume published packages rather than implicit workspace links. After a successful registry publish, bump the pinned versions in the root package.json, hosted app apps/web/package.json, and public-site site/package.json before running hosted validation or deployment.
Read CONTRIBUTING.md before opening a pull request. The short version:
make lint, make typecheck, make test, and make build before asking for review.Do not report vulnerabilities in public issues. Use GitHub private vulnerability reporting for this repository:
https://github.com/debugbundle/debugbundle/security/advisories/new
See SECURITY.md for scope and response expectations.
DebugBundle is licensed under AGPL-3.0-only. See LICENSE.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @debugbundle/mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"com-debugbundle-mcp": {
"command": "npx",
"args": [
"-y",
"@debugbundle/mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceDebugBundle works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.