← Back to leaderboard
79
/100
B β—‰ Complete 55

mcp-crashlytics-server

# πŸ”₯ Firebase Crashlytics MCP Server [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Node.js](https://img.shields.io/badge/node.js-18%2B-green)](https://nodejs.org/) [![MCP](https://img.shields.io/badge/MCP-Compatible-blue)](https://modelcontextprotocol.io/) A clean, simple **Model Context Protocol (MCP)** server that integrates Firebase Crashlytics with BigQuery for AI-powered crash analysis. Built for use with Claude Code and other MCP-compatible AI assistants. ## ✨ Features - πŸ” **Simple Tools**: Clean, single-responsibility tools for crash analysis - πŸ“± **App Discovery**: Automatically discover all apps in your Firebase project - πŸ’₯ **Fatal Crash Analysis**: Get detailed fatal crashes with stack traces - πŸ› **ANR Issue Detection**: Analyze Application Not Responding issues - πŸ”§ **Easy Setup**: Simple configuration with environment variables - πŸ€– **AI-Optimized**: Structured output perfect for AI analysis and debugging ## πŸš€ Quick Start ### Prerequisites - Node.js 18+ - Firebase project with Crashlytics enabled - BigQuery export enabled for Crashlytics - Google Cloud service account with BigQuery access ### Installation 1. **Clone the repository:** ```bash git clone https://github.com/your-username/mcp-crashlytics-server.git cd mcp-crashlytics-server ``` 2. **Install dependencies:** ```bash npm install ``` 3. **Build the project:** ```bash npm run build ``` ### Configuration 1. **Create environment file:** ```bash cp .env.example .env ``` 2. **Configure your environment variables:** ```bash # Google Cloud Service Account (choose one method) GOOGLE_SERVICE_ACCOUNT_KEY=/path/to/your-service-account.json # OR base64-encoded: GOOGLE_SERVICE_ACCOUNT_KEY=eyJhbGciOiJIUzI1... # Your Firebase project settings BIGQUERY_PROJECT_ID=your-firebase-project-id BIGQUERY_DATASET_ID=firebase_crashlytics # Optional: Default limit for crash queries DEFAULT_CRASH_LIMIT=10 ``` ### Setup Firebase & BigQuery 1. **Enable Crashlytics BigQuery Export:** - Go to Firebase Console β†’ Project Settings β†’ Integrations - Enable BigQuery integration for Crashlytics - Data will be exported to `firebase_crashlytics` dataset 2. **Create Service Account:** - Go to [Google Cloud Console](https://console.cloud.google.com/) - Navigate to IAM & Admin β†’ Service Accounts - Create service account with these roles: - `BigQuery Data Viewer` - `BigQuery Job User` - Download JSON key file ### Register with AI Agents #### Claude Code ```bash # Register the MCP server claude mcp add crashlytics -- node /path/to/mcp-crashlytics-server/dist/index.js # Verify it's working claude mcp list ``` #### Cursor Add to your `.cursorrules` or cursor settings: ```json { "mcpServers": { "crashlytics": { "command": "node", "args": ["/path/to/mcp-crashlytics-server/dist/index.js"], "env": { "GOOGLE_SERVICE_ACCOUNT_KEY": "/path/to/your-service-account.json", "BIGQUERY_PROJECT_ID": "your-firebase-project-id", "BIGQUERY_DATASET_ID": "firebase_crashlytics" } } } } ``` #### Windsurf Add to your Windsurf settings or `.windsurfrules`: ```json { "mcp": { "servers": { "crashlytics": { "command": "node", "args": ["/path/to/mcp-crashlytics-server/dist/index.js"], "env": { "GOOGLE_SERVICE_ACCOUNT_KEY": "/path/to/your-service-account.json", "BIGQUERY_PROJECT_ID": "your-firebase-project-id", "BIGQUERY_DATASET_ID": "firebase_crashlytics" } } } } } ``` #### Other MCP-Compatible IDEs For other MCP-compatible tools, add this server configuration: - **Command**: `node` - **Args**: `["/path/to/mcp-crashlytics-server/dist/index.js"]` - **Environment Variables**: Same as above (.env file values) ## πŸ› οΈ Available Tools ### 1. `list_available_apps` **Discover all apps** in your Firebase Crashlytics dataset. - **Parameters**: None - **Returns**: List of apps with crash counts ```javascript // Usage in Claude Code/Cursor "What apps are available in my crashlytics data?" ``` ### 2. `get_fatal_crashes` **Get fatal crashes** for a specific app. - **Parameters**: - `app_package` (required): App package name (e.g., "com.example.myapp") - `limit` (optional): Number of crashes (1-50, default: 10) ```javascript // Usage in Claude Code/Cursor "Get the 10 most recent fatal crashes for com.example.myapp" ``` ### 3. `get_anr_issues` **Get ANR (Application Not Responding)** issues for a specific app. - **Parameters**: - `app_package` (required): App package name - `limit` (optional): Number of issues (1-50, default: 10) ```javascript // Usage in Claude Code/Cursor "Show me ANR issues for com.example.myapp, limit to 5" ``` ## πŸ“‹ Example Usage Once set up, you can ask Claude Code natural questions like: ```bash # Discover your apps "What apps do I have crash data for?" # Get fatal crashes "Show me the latest fatal crashes for my Android app" "Get 5 fatal crashes for com.mycompany.myapp" # Analyze ANR issues "What ANR issues does my app have?" "Show ANR problems for com.mycompany.myapp from the last week" ``` ## πŸ—οΈ Project Structure ``` mcp-crashlytics-server/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ index.ts # Main MCP server β”‚ β”œβ”€β”€ bigquery-client.ts # BigQuery integration β”‚ β”œβ”€β”€ crash-processor.ts # Crash data processing β”‚ β”œβ”€β”€ impact-analyzer.ts # Impact analysis β”‚ └── types.ts # TypeScript definitions β”œβ”€β”€ dist/ # Built JavaScript files β”œβ”€β”€ package.json β”œβ”€β”€ tsconfig.json β”œβ”€β”€ .env.example # Environment template └── README.md ``` ## πŸ”§ Development ### Running in Development Mode ```bash npm run dev ``` ### Building ```bash npm run build ``` ### Linting ```bash npm run lint ``` ### Testing ```bash npm test ``` ## πŸ› Troubleshooting ### Common Issues **1. "No MCP servers configured"** - Make sure to register the server: `claude mcp add crashlytics -- node /path/to/dist/index.js` - Restart Claude Code/Cursor IDE **2. "Authentication Failed"** - Verify service account JSON file path is correct - Ensure service account has BigQuery permissions - Check project ID matches your Firebase project **3. "No crashes returned"** - Confirm Crashlytics BigQuery export is enabled - Wait 24-48 hours for initial data export - Verify your app is actually sending crash data **4. "Table not found"** - Check that `BIGQUERY_DATASET_ID` is correct (usually `firebase_crashlytics`) - Ensure crashes exist in your Firebase project - Verify BigQuery export is working in Firebase Console ### Debug Mode Enable verbose logging: ```bash DEBUG=mcp-crashlytics-server npm start ``` ## 🀝 Contributing 1. Fork the repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Make your changes 4. Add tests for new functionality 5. Commit your changes (`git commit -m 'Add amazing feature'`) 6. Push to the branch (`git push origin feature/amazing-feature`) 7. Open a Pull Request ## πŸ“„ License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## πŸ”’ Security Considerations - ⚠️ **Never expose service account credentials** in logs or version control - πŸ” Use **least-privilege permissions** for service accounts - πŸ”‘ Store credentials securely using environment variables - 🚫 Add `.env` to `.gitignore` (already included) ## πŸ“š Resources - [Model Context Protocol Documentation](https://modelcontextprotocol.io/) - [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code) - [Firebase Crashlytics](https://firebase.google.com/products/crashlytics) - [BigQuery Documentation](https://cloud.google.com/bigquery/docs) ## πŸ’‘ Need Help? - πŸ› **Found a bug?** [Open an issue](https://github.com/your-username/mcp-crashlytics-server/issues) - πŸ’¬ **Have questions?** [Start a discussion](https://github.com/your-username/mcp-crashlytics-server/discussions) - πŸš€ **Want a feature?** [Request it here](https://github.com/your-username/mcp-crashlytics-server/issues/new?template=feature_request.md) --- **Made with ❀️ for the MCP community**

AI & Machine Learning by tjdam007 ★ 1 Last commit: 9Β months, 2Β weeks ago
Anthropic BigQuery Exa Firebase GitHub npm
MCP Surface Tools: 5
Ambiguous Schemas
β—‰
Complete visibility — 5/5 applicable dimensions scored
✓ Schema Quality ✓ Protocol — Reliability ✓ Docs & Maintenance ✓ Security Hygiene ✓ Schema Interpretability
Schema Quality
94
42% weight
Protocol Compliance
N/A
Local server
Reliability
N/A
Local server
Docs & Maintenance
43
25% weight
Security Hygiene
95
33% weight
Schema Interpretability
53
15% weight
30-Day Trend

Score History

Category Trends

Static Analysis

Metric Score Rating
Schema Completeness 90 Good
Description Quality 100 Good
Documentation Coverage 50 Fair
Maintenance Pulse 16 Poor
Dependency Health 55 Fair
License Clarity 100 Good
Version Hygiene β€” Poor
Analyzed 2Β months, 3Β weeks ago

Protocol Compliance

5
Tools Found
1ms
Tools/List
Pass
Schema Valid
83/100
Error Handling
100/100
Fuzz Score
Probed 2Β months, 3Β weeks ago
Embed Badge

Add this to your README to display your MCP Scoreboard grade:

MCP Score Badge
[![MCP Score](https://mcpscoreboard.com/badge/11f61d22-e242-4025-9f5e-9116d1823892.svg)](https://mcpscoreboard.com/server/11f61d22-e242-4025-9f5e-9116d1823892/)