Firebase MCP Server
Manage Firestore collections, query documents, and deploy Firebase rules from your AI coding assistant.
Last reviewed Mar 2, 2026
Install
claude mcp add firebase --transport stdio -- npx -y firebase-mcp-serverEnvironment variables required:
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.jsonAvailable tools
| Tool | Description |
|---|---|
| list_collections | List all top-level Firestore collections |
| query_firestore | Query documents in a Firestore collection with filters |
| get_document | Get a specific document by path |
| deploy_rules | Deploy Firestore security rules |
What it does
The Firebase MCP Server connects your AI coding assistant to your Firebase project, focusing primarily on Firestore database operations. It can list collections, query documents, retrieve specific records, and help manage security rules -- providing the assistant with full context about your Firebase data layer.
This server is essential for developers building applications with Firebase. It enables the assistant to understand your data model by exploring actual Firestore collections and documents, then generate accurate client-side code for data access patterns.
Use cases
- Explore Firestore collection structures and document schemas during development
- Query documents to debug data issues or verify that writes are working correctly
- Generate Firebase client code based on actual document structures and collection hierarchies
- Review and update Firestore security rules alongside your application code
- List collections to understand the data architecture of an existing Firebase project
Getting started
- Generate a Firebase Service Account key from the Firebase Console. Go to Project Settings > Service Accounts > Generate New Private Key. This downloads a JSON file.
- Set the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable to the absolute path of your service account JSON file. - Alternatively, if you have the Google Cloud CLI installed and authenticated (
gcloud auth application-default login), the server can use Application Default Credentials without a service account file. - Ensure your service account has the necessary Firebase permissions. The default Firebase Admin SDK service account has full access to Firestore.
Compatibility
Related MCP servers
AWS MCP Server
Interact with AWS services including S3, Lambda, CloudWatch, and ECS from your AI coding assistant.
Context7 MCP Server
Fetch up-to-date library documentation and code examples directly into your AI coding assistant.
Docker MCP Server
Manage Docker containers, images, and builds directly from your AI coding assistant.