DebugBundle

DebugBundle

DebugBundle helps AI agents investigate production incidents with deterministic debug bundles, reproductions, health checks, and diagnostics. It exposes incident inspection, bundle retrieval, and ops management tools over MCP.

Category
访问服务器

README

DebugBundle

Production debugging bundles for AI agents.

CI CLI MCP License Community

DebugBundle captures runtime failures, groups them into incidents, and publishes deterministic debug bundles for humans and AI agents.

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

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 GitHub Release ZIP WordPress plugin

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',
});

debugbundle.captureExceptions();
debugbundle.captureRejections();

Express, Fastify, Next.js, pino, winston, bunyan, local file transport, remote capture policy, probes, and browser relay handlers are supported.

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',
});

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.

Python

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.

PHP

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.

Ruby

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.

Java

<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

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.

WordPress

Install the plugin ZIP from the debugbundle-wordpress GitHub Release, 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.

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.

Repository Layout

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.

Local Development

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.

Self-Hosting

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.

Documentation

Release Model

The canonical public product release is the root debugbundle repository tag and GitHub Release (v*). Package-specific releases are separate:

  • cli-v* for @debugbundle/cli
  • mcp-v* for @debugbundle/mcp
  • shared-js-v* for @debugbundle/shared-types and @debugbundle/redaction

Standalone SDK repositories publish and version their own release surfaces independently:

  • debugbundle-js for @debugbundle/sdk-node and @debugbundle/sdk-browser
  • debugbundle-python for debugbundle-python
  • debugbundle-php for debugbundle/sdk-php
  • debugbundle-java for Maven artifacts
  • debugbundle-go for Go modules
  • debugbundle-wordpress for the WordPress plugin

The v1 release train publishes dependency roots before dependent wrappers:

  1. Publish @debugbundle/shared-types and @debugbundle/redaction from the core repo first.
  2. Publish @debugbundle/sdk-node and @debugbundle/sdk-browser from debugbundle-js after the matching shared-package version exists on npm.
  3. Publish independent SDK and package families whose artifacts do not bundle another DebugBundle SDK.
  4. Publish React Native after the Android and iOS native SDK versions it delegates to are live and smoke-tested.
  5. Publish WordPress after the PHP SDK and browser SDK versions it requires are live and smoke-tested, then rebuild the bundled browser asset.
  6. Bump hosted dogfooding manifests only after the referenced registry versions exist.
  7. Create the canonical core GitHub Release after package-specific release workflows pass.

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.

Contributing

Read CONTRIBUTING.md before opening a pull request. The short version:

  • Keep app/package boundaries strict.
  • Add or update tests for behavior changes.
  • Run make lint, make typecheck, make test, and make build before asking for review.
  • Update docs, contracts, and public interface references when behavior changes.

Security

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.

License

DebugBundle is licensed under AGPL-3.0-only. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选