Firebase Crashlytics MCP Server
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.
README
š„ Firebase Crashlytics MCP Server
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
- Clone the repository:
git clone https://github.com/your-username/mcp-crashlytics-server.git
cd mcp-crashlytics-server
- Install dependencies:
npm install
- Build the project:
npm run build
Configuration
- Create environment file:
cp .env.example .env
- Configure your environment variables:
# 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
-
Enable Crashlytics BigQuery Export:
- Go to Firebase Console ā Project Settings ā Integrations
- Enable BigQuery integration for Crashlytics
- Data will be exported to
firebase_crashlyticsdataset
-
Create Service Account:
- Go to Google Cloud Console
- Navigate to IAM & Admin ā Service Accounts
- Create service account with these roles:
BigQuery Data ViewerBigQuery Job User
- Download JSON key file
Register with AI Agents
Claude Code
# 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:
{
"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:
{
"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
// 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)
// 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 namelimit(optional): Number of issues (1-50, default: 10)
// 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:
# 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
npm run dev
Building
npm run build
Linting
npm run lint
Testing
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_IDis correct (usuallyfirebase_crashlytics) - Ensure crashes exist in your Firebase project
- Verify BigQuery export is working in Firebase Console
Debug Mode
Enable verbose logging:
DEBUG=mcp-crashlytics-server npm start
š¤ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
š License
This project is licensed under the MIT License - see the 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
.envto.gitignore(already included)
š Resources
- Model Context Protocol Documentation
- Claude Code Documentation
- Firebase Crashlytics
- BigQuery Documentation
š” Need Help?
- š Found a bug? Open an issue
- š¬ Have questions? Start a discussion
- š Want a feature? Request it here
Made with ā¤ļø for the MCP community
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.