A Model Context Protocol (MCP) server for interacting with Bugsnag. This server allows LLM tools like Cursor and Claude to investigate and resolve issues in Bugsnag.
A Model Context Protocol (MCP) server for interacting with Bugsnag. This server allows LLM tools like Cursor and Claude to investigate and resolve issues in Bugsnag.
Setting up the Bugsnag MCP server is simple and doesn't require any installation or downloading source code.
Add the Bugsnag MCP server configuration:
{
"mcpServers": {
"bugsnag": {
"command": "npx",
"args": ["-y", "bugsnag-mcp-server"],
"env": {
"BUGSNAG_API_KEY": "your-bugsnag-api-key"
},
"disabled": false,
"alwaysAllow": []
}
}
}
Replace your-bugsnag-api-key
with your Bugsnag API key
Add the Bugsnag MCP server configuration:
{
"mcpServers": {
"bugsnag": {
"command": "npx",
"args": ["-y", "bugsnag-mcp-server"],
"env": {
"BUGSNAG_API_KEY": "your-bugsnag-api-key"
},
"disabled": false,
"alwaysAllow": []
}
}
}
Replace your-bugsnag-api-key
with your Bugsnag API key
To use this MCP server, you'll need a Bugsnag API key:
Once configured, you can use the Bugsnag MCP server with your LLM tool. Here are some example prompts:
List all my Bugsnag organizations
Show me all projects in organization "org_12345"
List the open errors in my Bugsnag project "project_12345"
Show me the details for Bugsnag error ID "error_12345"
Show me the detailed stacktrace for event "event_12345" in project "project_12345"
View the exception chain for event "event_12345" in project "project_12345"
Search for Bugsnag issues in project "project_12345" related to "NullPointerException"
List all events for error "error_12345" in project "project_12345"
The Bugsnag MCP server provides the following tools:
Lists available Bugsnag organizations.
Parameters:
Lists projects in an organization.
Parameters:
organization_id
(required): Bugsnag organization IDLists errors in a project with filtering options.
Parameters:
project_id
(required): Bugsnag project IDstatus
: Filter by error status ("open", "fixed", "ignored")sort
: Sort order for errors ("newest", "oldest", "priority")limit
: Maximum number of errors to returnGets detailed information about a specific error.
Parameters:
error_id
(required): Bugsnag error IDLists events (occurrences) for a specific error.
Parameters:
project_id
(required): Bugsnag project IDerror_id
(required): Bugsnag error IDlimit
: Maximum number of events to returnViews the latest event for an error.
Parameters:
error_id
(required): Bugsnag error IDViews detailed information about a specific event.
Parameters:
project_id
(required): Bugsnag project IDevent_id
(required): Bugsnag event IDExtracts and formats stacktrace information from an event.
Parameters:
project_id
(required): Bugsnag project IDevent_id
(required): Bugsnag event IDinclude_code
: Include source code context if available (default: true)Views the full chain of exceptions for an event.
Parameters:
project_id
(required): Bugsnag project IDevent_id
(required): Bugsnag event IDSearches for issues using various criteria.
Parameters:
project_id
(required): Bugsnag project IDquery
: Search queryerror_class
: Filter by error classapp_version
: Filter by app versionYou can test if your Bugsnag API key is valid using:
npx bugsnag-mcp-server test-api-key your-bugsnag-api-key
If your API key is valid, this will display a list of your Bugsnag projects with their IDs.
While using npx
is recommended for most users, you can also install the package globally if you prefer:
npm install -g bugsnag-mcp-server
If you're interested in contributing or modifying the code:
Clone the repository:
git clone https://github.com/yourusername/bugsnag-mcp.git
cd bugsnag-mcp
Install dependencies:
npm install
Build the project:
npm run build
Run tests:
npm test
Run tests with coverage:
npm run test:coverage
Format code:
npm run format
npm run format:check
This project uses GitHub Actions for continuous integration. The workflows automatically:
You can view the workflow configurations in:
.github/workflows/test.yml
- For running tests.github/workflows/prettier.yml
- For checking code formattingMIT