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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。