Search DevTools

Jump to any tool or page

DebugBundle

Unexplored

DebugBundle MCP: runtime error reporting, incident response, health checks, and product analytics.

debugbundle6 stars0 forksAI & Agents
View source

Install

Terminal

$npx -y @debugbundle/mcp

mcp_config.json

{
  "mcpServers": {
    "com-debugbundle-mcp": {
      "env": {
        "DEBUGBUNDLE_API_URL": "${DEBUGBUNDLE_API_URL}",
        "DEBUGBUNDLE_MEMBER_TOKEN": "${DEBUGBUNDLE_MEMBER_TOKEN}"
      },
      "args": [
        "-y",
        "@debugbundle/mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

DebugBundle

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.

Works with AI coding agents including Codex, Claude Code, and Gemini CLI, as well as Cursor and GitHub Copilot. See the dedicated Codex, Claude Code, and Gemini CLI setup guides for native packages and direct MCP connections.

Why DebugBundle?

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:

  • Agent-native bundles: deterministic failure and improvement bundles with errors, requests, responses, logs, frontend context, deploy metadata, runtime details, and reproduction hints.
  • Interface parity: API, CLI, and MCP expose the same incident, bundle, probe, webhook, alert, project, and automation workflows.
  • Local-first setup: start without a cloud account by writing events to .debugbundle/local/events/, then connect to DebugBundle Cloud when ready.
  • Safe SDKs: SDK failures are swallowed internally, sensitive fields are redacted before transport, and duplicate storms are suppressed locally.
  • Self-hostable core: Compose-based stack for the web app, API, worker, Postgres, Redis, and S3-compatible object storage.

Quick Start

Choose the path that matches how you want to evaluate DebugBundle.

Cloud

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.

Local-only

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.

Install an SDK

SDKs share the same capture concepts through language-idiomatic APIs. Client constructors, framework configuration and plugin activation remain runtime-specific. Common operations include: init, captureException, captureError, captureLog, captureRequest, captureMessage, setContext, probe, and flush.

RuntimePackageInstallMain docs
Node.js@debugbundle/sdk-nodenpm install @debugbundle/sdk-nodeNode.js SDK
Browser@debugbundle/sdk-browsernpm install @debugbundle/sdk-browserBrowser SDK
Pythondebugbundle-pythonpip install debugbundle-pythonPython SDK
PHPdebugbundle/sdk-phpcomposer require debugbundle/sdk-phpPHP SDK
Rustdebugbundlecargo add debugbundleRust SDK
Javacom.debugbundle:debugbundle-spring-boot-starterMaven or Gradle dependencyJava SDK
.NETDebugBundle.AspNetCore / DebugBundle.Sdkdotnet add package DebugBundle.AspNetCore.NET SDK
Gogithub.com/debugbundle/debugbundle-go/v3go get github.com/debugbundle/debugbundle-go/v3Go SDK
Rubydebugbundlegem install debugbundleRuby SDK
Androidcom.debugbundle:debugbundle-androidMaven or Gradle dependencyAndroid SDK
iOSDebugBundleSwift Package Manager or CocoaPodsiOS SDK
React Native@debugbundle/sdk-react-nativenpm install @debugbundle/sdk-react-nativeReact Native SDK
WordPressdebugbundleWordPress.org plugin directoryWordPress plugin

Initialize once at application startup. These connected examples use a server environment token, a browser relay or an explicitly configured mobile ingestion token. Verification and lifecycle details are in each SDK guide.

Node.js

npm install @debugbundle/sdk-node
import { debugbundle } from "@debugbundle/sdk-node";

debugbundle.init({
  projectToken: process.env.DEBUGBUNDLE_PROJECT_TOKEN,
  environment: "production",
  service: "api"
});

Initialize once at server startup with DEBUGBUNDLE_PROJECT_TOKEN set in the server environment. Initialization registers the process exception and rejection hooks; request middleware belongs in the framework setup below.

Express, Fastify, Next.js, pino, winston, bunyan and browser relay handlers are supported. See the Node.js SDK guide.

Browser

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"
});

Initialize once in the browser entry point. Configure the matching backend relay route first; this relative URL does not create a server endpoint. Keep the backend project token on the server.

Browser-native capture works with React, Next.js client components, Vue, Angular, Svelte and vanilla applications. Use a backend browser relay for this setup. See the Browser SDK guide.

Python

pip install debugbundle-python
import os
import debugbundle

debugbundle.init(
    project_token=os.environ["DEBUGBUNDLE_PROJECT_TOKEN"],
    environment="production",
    service="api",
)

Initialize once at application startup with DEBUGBUNDLE_PROJECT_TOKEN set in the server environment. Initialization installs the exception hooks. Add logging and framework adapters in Integrations.

Django, Flask, FastAPI, Python logging, structlog, loguru and browser relay helpers are supported. See the Python SDK guide.

PHP

composer require debugbundle/sdk-php
<?php

use DebugBundle\DebugBundle;

DebugBundle::init([
    'projectToken' => getenv('DEBUGBUNDLE_PROJECT_TOKEN'),
    'environment' => 'production',
    'service' => 'api',
]);

Initialize in your application bootstrap after loading Composer’s autoloader. Set DEBUGBUNDLE_PROJECT_TOKEN in the server environment, initialization installs error, exception and shutdown hooks. Add framework and logger adapters in Integrations.

Laravel, Symfony, Monolog and browser relay adapters are supported. See the PHP SDK guide.

Rust

cargo add debugbundle
use debugbundle::Config;

let client = debugbundle::init(Config {
    project_token: std::env::var("DEBUGBUNDLE_PROJECT_TOKEN").unwrap_or_default(),
    environment: "production".into(),
    service: "api".into(),
    ..Config::default()
});

Run this in application startup and retain client for the application lifetime. Set DEBUGBUNDLE_PROJECT_TOKEN in the server environment. The example sets environment and service explicitly; ..Config::default() supplies the remaining options. Initialization starts the client; panic observation and framework capture are explicit integrations. Flush only when verifying an event or during controlled shutdown.

Tokio, Tower, Axum and Actix Web, composable tracing/log integrations and browser relays are supported. See the Rust SDK guide.

Java

<dependency>
  <groupId>com.debugbundle</groupId>
  <artifactId>debugbundle-spring-boot-starter</artifactId>
  <version>3.1.4</version>
</dependency>
debugbundle:
  project-token: ${DEBUGBUNDLE_PROJECT_TOKEN}
  environment: production
  service: api
  project-mode: connected

For Spring Boot 3, put this in application.yml and set DEBUGBUNDLE_PROJECT_TOKEN in the server environment. The starter initializes the client through Spring configuration. Other Java runtimes use the adapters below.

Spring Boot, servlet WARs, JAX-RS/RESTEasy, WildFly/JBoss, vanilla Java and the Java agent have runtime-specific setup. See the Java SDK guide.

.NET

dotnet add package DebugBundle.AspNetCore
using DebugBundle.AspNetCore;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDebugBundle(options =>
{
    options.ProjectToken = builder.Configuration["DEBUGBUNDLE_PROJECT_TOKEN"];
    options.Environment = builder.Environment.EnvironmentName;
    options.Service = "api";
});

var app = builder.Build();
app.UseDebugBundle();

Add this to ASP.NET Core Program.cs, with DEBUGBUNDLE_PROJECT_TOKEN in application configuration. Keep your endpoint mappings and app.Run() after the middleware. The hosted service handles application shutdown.

ASP.NET Core, Microsoft.Extensions.Logging, gRPC, Worker Service, Hangfire, Azure Functions isolated worker and logging adapters have dedicated integrations. See the .NET SDK guide.

Go

go get github.com/debugbundle/debugbundle-go/v3
import (
    "os"
    debugbundle "github.com/debugbundle/debugbundle-go/v3"
)

// Inside application startup:
client := debugbundle.New(debugbundle.Config{
    ProjectToken: os.Getenv("DEBUGBUNDLE_PROJECT_TOKEN"),
    Environment:  "production",
    Service:      "api",
})

Set DEBUGBUNDLE_PROJECT_TOKEN in the server environment and retain the client for your service lifetime. Add the imports to the file’s import block and create the client inside main or your bootstrap function. Use a bounded flush during controlled shutdown.

net/http, Gin, Echo, slog, zap, zerolog and browser relay handlers are supported. See the Go SDK guide.

Ruby

gem install debugbundle
require "debugbundle"

DebugBundle.init(
  project_token: ENV["DEBUGBUNDLE_PROJECT_TOKEN"],
  environment: "production",
  service: "api"
)

Initialize once at application startup with DEBUGBUNDLE_PROJECT_TOKEN set in the server environment. Initialization arms best-effort process exception capture. Add framework and logger adapters below.

Rails, Rack, Sidekiq, Ruby Logger, Semantic Logger and browser relay handlers are supported. See the Ruby SDK guide.

Android

dependencies {
    implementation(platform("com.debugbundle:debugbundle-android-bom:3.1.4"))
    implementation("com.debugbundle:debugbundle-android")
}
import com.debugbundle.android.DebugBundle
import com.debugbundle.android.DebugBundleConfig

// Inside Application.onCreate(), after super.onCreate():
DebugBundle.init(
    application = this,
    config = DebugBundleConfig(
        projectToken = BuildConfig.DEBUGBUNDLE_PROJECT_TOKEN,
        environment = "production",
        service = "android-app",
    ),
)

Call this from your registered Application.onCreate(). Define the app-owned BuildConfig.DEBUGBUNDLE_PROJECT_TOKEN field in Gradle. A token embedded in a mobile app is a public write-only ingestion credential, never a member token.

Native Android capture, crash/ANR replay, WorkManager, OkHttp, Ktor, Navigation, Compose and Timber integrations are available. See the Android SDK guide.

iOS

.package(
    url: "https://github.com/debugbundle/debugbundle-swift",
    from: "3.1.5"
)
import Foundation
import DebugBundle

DebugBundle.initialize(
    DebugBundleConfig(
        projectToken: Bundle.main.debugBundleProjectToken,
        environment: "production",
        service: "ios-app"
    )
)

Add the Swift Package dependency to your application target. Initialize once from SwiftUI app initialization or UIKit launch, with DebugBundleProjectToken in Info.plist. Mobile tokens are public write-only ingestion credentials, never member tokens.

UIKit, SwiftUI, URLSession, Alamofire, SwiftLog, crash replay and offline queueing are supported. See the iOS SDK guide.

React Native

npm install @debugbundle/sdk-react-native
cd ios && pod install
import { DebugBundle } from "@debugbundle/sdk-react-native";

DebugBundle.init({
  projectToken: process.env.EXPO_PUBLIC_DEBUGBUNDLE_TOKEN,
  environment: __DEV__ ? "development" : "production",
  service: "mobile-app"
});

Initialize once in the app entry point after completing native installation. This example uses Expo’s public environment-variable support; bare React Native apps supply the token through their own build configuration. Mobile tokens are public write-only ingestion credentials. Use a native development build: Expo Go cannot load the native SDK.

React error boundaries, React Navigation, scoped fetch/XHR instrumentation, Expo development builds and native Android/iOS queues are supported. See the React Native SDK guide.

WordPress

Install DebugBundle from the WordPress.org plugin directory, activate it, then open Settings -> DebugBundle and save your project token. The plugin bundles PHP and browser capture with a server-side relay. See the WordPress guide for integrations, first-event verification and configuration.

CLI, API, and MCP

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.

A separate OpenAI Plugin candidate pairs a debugging skill with an OAuth-protected, read-only remote MCP connection. It is available for owner-approved Developer Mode validation and is not yet publicly installable. See the OpenAI Plugin guide for candidate capabilities and validation status.

AnalyticsBundle

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.

  • Ask directly: API, CLI, and MCP expose aggregate metrics, journey patterns, opportunities, and generated AnalyticsBundles through the same project-authorized surface.
  • Generate by analysis unit: bundles describe a usage, funnel, route, friction, conversion, deploy, or incident-impact question. DebugBundle does not create one AnalyticsBundle per visit.
  • Keep evidence explainable: a generated bundle includes aggregate metrics, linked incidents/deploys, privacy-safe journey timelines, and deterministic journey-selection rank/basis for agent review.
  • Stay privacy- and cost-conscious: raw analytics inputs and retained journey samples expire; long-lived usage is aggregate rollups. Debug capture remains independent when analytics is disabled, unavailable, sampled out, quota-limited, or unhealthy.

See the repository public interface contract for API/CLI/MCP parity and the self-host guide for retention and upgrade behavior.

Public status pages

Project owners can publish selected health checks and their 30-day availability history on a public status page. Checks stay private until explicitly sel

Sourced from the repository README.

More in AI & Agents