Cursor reads the exception you just hit
Start Buggregator with MCP_ENABLED=true and add it to Cursor's mcp.json with the command buggregator and the argument mcp. With this Cursor MCP setup, Cursor reads the Sentry error you just hit, with its stack trace, plus your variable dumps and profiles, from the Buggregator on your machine.
Steps
1. Turn MCP on
MCP is off by default. Start Buggregator with this variable, or set mcp.enabled: true in buggregator.yaml.
MCP_ENABLED=true2. Add the server to mcp.json
Cursor reads MCP servers from .cursor/mcp.json in your project, or from ~/.cursor/mcp.json for every project. The command and its argument go in separate fields. buggregator is the binary: the name works when it is on your PATH, otherwise give the full path.
{
"mcpServers": {
"buggregator": {
"command": "buggregator",
"args": ["mcp"]
}
}
}3. Use the HTTP URL if Buggregator runs in Docker
Run Buggregator with the HTTP transport, then give Cursor a url instead of command and args.
services:
buggregator:
image: ghcr.io/buggregator/server:latest
ports:
- 127.0.0.1:8000:8000
- 127.0.0.1:8001:8001 # MCP HTTP port
environment:
MCP_ENABLED: "true"
MCP_TRANSPORT: http
MCP_ADDR: ":8001"{
"mcpServers": {
"buggregator": {
"url": "http://localhost:8001/mcp"
}
}
}4. Ask about the error
Trigger the error, then ask Cursor about it. The assistant picks the tools.
"Show me the latest Sentry errors"
"What's the stack trace for this exception?"
"What value was dumped in the last VarDumper event?"Why it works
Buggregator has a built-in MCP server, and mcp.json is Cursor's own format (https://cursor.com/docs/mcp). sentry_event returns an error's message, severity, exception chain with stack traces and environment; vardump_get returns a dump as plain text; profiler_summary and profiler_top give the slowest functions. Cursor reads the data your app already sent, so nothing is copied by hand.
Docs: docs.buggregator.dev/config/mcp.html#cursor
Requires Buggregator v2.6.0+
Related tips
- MCP
Claude Code reads your app's errors over MCP
Add Buggregator as an MCP server in Claude Code. It lists your Sentry errors, opens stack traces and reads dumps and profiles. No copy-paste.
- Xdebug
Claude Code sets a breakpoint and steps through PHP
Turn on Buggregator's Xdebug proxy and MCP. With no IDE attached, Claude Code sets a breakpoint, waits for the request, reads variables and steps.
- Sentry
See what happened right before the exception
Point your Laravel Sentry DSN at Buggregator. Each error shows its breadcrumbs, request, tags and stack trace on your laptop.
Checked on with Buggregator v2.8.0