MCPcopy Index your code
hub / github.com/buggregator/server

github.com/buggregator/server @v2.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.3.1 ↗ · + Follow
892 symbols 2,935 edges 137 files 356 documented · 40%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Debug everything. Install nothing.

Twitter Support me on Patreon CI Downloads SSL Certificate

Buggregator - The Ultimate Debugging Server for PHP | Product Hunt

One binary. Exceptions, dumps, emails, profiling, logs — all in one real-time UI. Works with the SDKs you already have. No cloud account. No code changes. No runtime dependencies.

Buggregator v2.0 is a complete rewrite in Go — a single self-contained binary with an embedded SQLite database, web UI, and WebSocket server. No PHP runtime, no RoadRunner, no Centrifugo, no external database.

Server v2.0.0
Frontend v1.30.0

Looking for the PHP version? See the 1.x branch.

Watch our introduction video on YouTube

Quick Start

docker run --pull always \
  -p 127.0.0.1:8000:8000 \
  -p 127.0.0.1:1025:1025 \
  -p 127.0.0.1:9912:9912 \
  -p 127.0.0.1:9913:9913 \
  ghcr.io/buggregator/server:latest

Open http://127.0.0.1:8000 and start debugging. That's it.

Standalone Binary

# Download the latest release
curl -sL https://github.com/buggregator/server/releases/latest/download/buggregator-linux-amd64 -o buggregator
chmod +x buggregator
./buggregator

No Docker? No binary? Use Buggregator Trap — a lightweight PHP CLI alternative.

Key Features

Xhprof Profiler

Watch our intro video about profiler on YouTube.

xhprof

Symfony VarDumper Server

var-dumper

Spatie Ray Debug Tool

ray

Fake SMTP Server

smtp

Sentry Compatibility

sentry

Monolog Server

monolog

Inspector Compatibility

inspector

HTTP Requests Dump Server

http dumps

Supported Modules

Module Type Transport Description
Sentry sentry HTTP Error tracking (gzip, envelope format)
Ray ray HTTP Debug tool for PHP
VarDumper var-dump TCP :9912 Symfony VarDumper (embedded PHP parser)
Inspector inspector HTTP APM monitoring
Monolog monolog TCP :9913 Logging (newline-delimited JSON)
SMTP smtp TCP :1025 Email capture (RFC822, multipart, attachments)
SMS sms HTTP /sms SMS gateway capture (41 providers)
HTTP Dump http-dump HTTP Catch-all HTTP request capture
Profiler profiler HTTP XHProf profiling (call graph, flame chart, top functions)
Webhooks webhooks HTTP POST notifications when events are received

Configuration

The server works with zero configuration. Optionally, create a buggregator.yaml:

server:
  addr: ":8000"

database:
  driver: sqlite
  dsn: ":memory:"           # or "data.db" for persistence

# Prometheus metrics (optional)
metrics:
  enabled: true
  addr: ":9090"             # separate server, or empty to use main HTTP

tcp:
  smtp:
    addr: ":1025"
  monolog:
    addr: ":9913"
  var-dumper:
    addr: ":9912"

# Authentication (disabled by default)
# Supports: auth0, google, github, keycloak, gitlab, oidc (generic)
auth:
  enabled: true
  provider: auth0
  provider_url: https://your-tenant.us.auth0.com
  client_id: your-client-id
  client_secret: your-client-secret
  callback_url: http://localhost:8000/auth/sso/callback
  scopes: openid,email,profile
  jwt_secret: your-secret-for-signing-tokens

# MCP — AI assistant integration (disabled by default)
mcp:
  enabled: true
  transport: socket              # "socket" or "http"
  socket_path: /tmp/buggregator-mcp.sock

# Enable/disable modules (all enabled by default)
modules:
  sentry: true
  ray: true
  var-dump: true
  inspector: true
  monolog: true
  smtp: true
  sms: true
  http-dump: true
  profiler: true

# Webhooks — HTTP POST notifications on events
webhooks:
  - event: "*"
    url: https://slack.example.com/webhook
    headers:
      Authorization: "Bearer token"
    verify_ssl: false
    retry: true
  - event: sentry
    url: https://pagerduty.example.com/alert

# Pre-defined projects
projects:
  - key: my-app
    name: My Application

Configuration Priority

  1. CLI flags (--http-addr :9000)
  2. Environment variables (HTTP_ADDR=:9000)
  3. Config file (buggregator.yaml)
  4. Defaults

Environment Variables

Variable Default Description
HTTP_ADDR :8000 HTTP listen address
DATABASE_DSN :memory: SQLite DSN
SMTP_ADDR :1025 SMTP listen address
MONOLOG_ADDR :9913 Monolog TCP address
VAR_DUMPER_ADDR :9912 VarDumper TCP address
CLIENT_SUPPORTED_EVENTS all Comma-separated list of enabled modules
METRICS_ENABLED false Enable Prometheus metrics
METRICS_ADDR Separate metrics server address
AUTH_ENABLED false Enable OAuth2/OIDC authentication
AUTH_PROVIDER oidc Provider: auth0, google, github, keycloak, gitlab, oidc
AUTH_PROVIDER_URL OIDC issuer URL
AUTH_CLIENT_ID OAuth2 client ID
AUTH_CLIENT_SECRET OAuth2 client secret
AUTH_CALLBACK_URL OAuth2 callback URL
AUTH_SCOPES openid,email,profile Comma-separated OAuth2 scopes
AUTH_JWT_SECRET Secret for signing internal JWT tokens
MCP_ENABLED false Enable MCP server
MCP_TRANSPORT socket socket (local) or http (remote)
MCP_SOCKET_PATH /tmp/buggregator-mcp.sock Unix socket path
MCP_ADDR :8001 HTTP listen address for MCP
MCP_AUTH_TOKEN Bearer token for HTTP MCP transport

PHP Client Configuration

Laravel / Symfony

# .env
SENTRY_LARAVEL_DSN=http://sentry@localhost:8000/default
RAY_HOST=ray@localhost
RAY_PORT=8000
VAR_DUMPER_SERVER=localhost:9912
LOG_SOCKET_URL=localhost:9913
MAIL_HOST=localhost
MAIL_PORT=1025
INSPECTOR_URL=http://inspector@localhost:8000
INSPECTOR_API_KEY=test
PROFILER_ENDPOINT=http://profiler@localhost:8000
HTTP_DUMP_ENDPOINT=http://http-dump@localhost:8000
SMS_ENDPOINT=http://localhost:8000/sms

MCP (Model Context Protocol)

Buggregator includes a built-in MCP server that lets AI assistants (Claude Code, Cursor, etc.) query and analyze debugging data directly.

AI Assistant --stdio--> buggregator mcp --unix socket--> buggregator (main process)

Setup

Claude Code (~/.claude.json or project settings):

{
  "mcpServers": {
    "buggregator": {
      "command": "./buggregator",
      "args": ["mcp"]
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "buggregator": {
      "command": "./buggregator",
      "args": ["mcp"]
    }
  }
}

Available Tools

Tool Description Key Parameters
events_list List captured events type, project, limit (default 20, max 100)
event_get Get full event payload uuid
event_delete Delete an event uuid
profiler_summary Profile overview: totals, slowest function, memory hotspot uuid
profiler_top Top functions sorted by metric uuid, metric, limit
profiler_call_graph Filtered call graph with significant paths uuid, metric, percentage, threshold
sentry_event Structured error: exception chain, stack traces, tags uuid
vardump_get Variable value with HTML stripped uuid

Building from Source

Prerequisites

  • Go 1.22+
  • PHP 8.1+ with Composer (for VarDumper module)
  • Make
make build          # Full build: downloads frontend, builds PHP parser, compiles binary
make run            # Build and run
make build-cross GOOS=darwin GOARCH=arm64   # Cross-compile

Documentation

See the documentation for detailed installation and usage instructions.

Contributing

We enthusiastically invite you to contribute to Buggregator Server! Whether you've uncovered a bug, have innovative feature suggestions, or wish to contribute in any other capacity, we warmly welcome your participation. Simply open an issue or submit a pull request on our GitHub repository to get started.

Read more about how to contribute here.

License

Buggregator is open-sourced software licensed under the MIT License.

Extension points exported contracts — how you extend this code

HTTPIngestionHandler (Interface)
HTTPIngestionHandler decides if an HTTP request belongs to a module. [6 implementers]
internal/module/module.go
PreviewMapper (Interface)
PreviewMapper transforms full event payloads into preview/searchable form. [10 implementers]
internal/event/preview.go
ConnectionHandler (Interface)
ConnectionHandler handles a single TCP connection. [2 implementers]
internal/server/tcp/server.go
EventStorer (Interface)
EventStorer is the interface for storing events from TCP connections. [1 implementers]
modules/monolog/module.go
EventStorer (Interface)
(no doc) [1 implementers]
modules/proxy/module.go
EventStorer (Interface)
(no doc) [1 implementers]
modules/smtp/module.go
EventStorer (Interface)
(no doc) [1 implementers]
modules/vardumper/module.go
Module (Interface)
Module is the interface every event module must implement. Embed BaseModule to get no-op defaults for optional methods.
internal/module/module.go

Core symbols most depended-on inside this repo

Run
called by 135
internal/app/app.go
ServeHTTP
called by 89
internal/server/http/ingestion.go
Get
called by 69
internal/event/preview.go
Scan
called by 65
internal/storage/sqlite.go
scanNullString
called by 44
modules/sentry/api.go
nullIfEmpty
called by 34
modules/sentry/store_error.go
IsEnabled
called by 26
internal/app/config.go
Run
called by 24
internal/storage/migrator.go

Shape

Function 459
Method 260
Struct 157
Interface 12
FuncType 2
TypeAlias 2

Languages

Go98%
TypeScript2%
PHP1%

Modules by API surface

internal/server/http/ingestion_test.go36 symbols
internal/server/ws/hub.go30 symbols
modules/sentry/types.go29 symbols
modules/smtp/api.go23 symbols
internal/module/module.go22 symbols
modules/smtp/handler.go21 symbols
internal/app/config.go21 symbols
modules/smtp/api_test.go19 symbols
modules/sentry/handler_test.go19 symbols
modules/sentry/handler.go18 symbols
modules/profiler/api.go17 symbols
modules/sentry/api_test.go15 symbols

For agents

$ claude mcp add server \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact