Download the PHP package dcodegroup/bugsnag-laravel-mcp without Composer
On this page you can find all versions of the php package dcodegroup/bugsnag-laravel-mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dcodegroup/bugsnag-laravel-mcp
More information about dcodegroup/bugsnag-laravel-mcp
Files in dcodegroup/bugsnag-laravel-mcp
Package bugsnag-laravel-mcp
Short Description Basic MCP for integrating Bugsnag into AI workflows
License MIT
Informations about the package bugsnag-laravel-mcp
Bugsnag Laravel MCP
A Laravel package that integrates Bugsnag error monitoring with Model Context Protocol (MCP), enabling AI assistants like Claude to access and analyze Bugsnag error data directly.
Features
- 🔗 MCP Server Integration: Exposes Bugsnag error data through the Model Context Protocol
- 🐛 Error Analysis: Fetch detailed error information including stack traces, events, and context
- 🤖 AI-Ready: Built for seamless integration with AI assistants and large language models
- 📋 Full Event History: Access the latest event details for any Bugsnag error
- 🔐 Secure: Uses personal access tokens for authentication with the Bugsnag API
Requirements
- PHP 8.1+
- Laravel 11+
- Bugsnag account with personal access token
Installation
Install the package via Composer:
Publish the configuration file:
Configuration
Add the following environment variables to your .env file:
You can also configure these settings in the config/bugsnag-mcp.php file:
Installing the MCP Server
After configuration, install the MCP server into your MCP client configuration:
This command will:
- Display the configuration snippet needed for your
.mcp.jsonormcp.jsonfile - Prompt you to automatically write it to the file (if one exists)
- Optionally write to a specific file using the
--writeoption
Manual Installation
If you prefer to manually add the configuration, add the following to your .mcp.json or mcp.json file:
Replace /path/to/your/laravel/app with the absolute path to your Laravel application.
Usage
Using with MCP Client
Once configured, the Bugsnag MCP Server will be available as a local MCP server named bugsnag. Connect your MCP client to use it.
Available Tools
GetBugsnagError
Fetches detailed information about a specific Bugsnag error, including the most recent event, stack traces, request context, breadcrumbs, and metadata.
Parameters:
error_id(string): The Bugsnag error ID to fetch
Response: The tool returns a JSON response containing:
error: Full error details (ID, message, status, severity, etc.)latest_event: The most recent event for the error with full contextinstructions_for_copilot: Suggested analysis steps for AI assistants
Example:
Architecture
Core Components
- BugsnagClient: HTTP client for communicating with the Bugsnag API using Saloon
- BugsnagServer: MCP Server definition that exposes tools and resources
- GetBugsnagError: Tool for fetching error data
- Data Models: Spatie Laravel Data models for type-safe error and event handling
API Integration
The package uses Saloon for HTTP requests and includes:
- Request/Response classes for each Bugsnag API endpoint
- Automatic DTO transformation using Spatie Laravel Data
- Fixture-based testing with mock responses
Testing
Run the test suite:
Run tests with coverage:
Run linting and static analysis:
Development
Local Development
Build the workbench:
Serve the application:
File Structure
Configuration Reference
bugsnag-mcp.php
Obtaining Bugsnag Credentials
-
Personal Access Token:
- Log in to Bugsnag
- Navigate to Settings → Personal Access Tokens
- Create a new token with
readscope
-
Organization ID:
- Found in your Bugsnag account Settings → Organization
- Project ID:
- Found in your project's Settings → General
Troubleshooting
Missing Configuration
Ensure all required environment variables are set:
BUGSNAG_PERSONAL_ACCESS_TOKENBUGSNAG_ORGANIZATION_IDBUGSNAG_PROJECT_ID
Authentication Errors
Verify your personal access token is valid and has the required permissions.
API Connection Issues
Check that:
- Your firewall allows outbound connections to
api.bugsnag.com - Your credentials are correct
- The Bugsnag API is accessible
Contributing
Contributions are welcome! Please feel free to submit pull requests.
License
This package is open-sourced software licensed under the MIT license.
About
Created by Dcode Group
Support
For issues and questions:
- GitHub Issues: Issues
- Email: [email protected]
All versions of bugsnag-laravel-mcp with dependencies
spatie/laravel-data Version ^4.23
saloonphp/saloon Version ^4.0
saloonphp/laravel-plugin Version ^4.0
saloonphp/pagination-plugin Version ^2.0