
Firebase MCP
Let AI assistants work directly with Firebase Firestore, Storage, and Authentication.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @gannonh/firebase-mcpPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"firebase-mcp": {
"command": "npx",
"args": [
"-y",
"@gannonh/firebase-mcp"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "/absolute/path/to/serviceAccountKey.json",
"FIREBASE_STORAGE_BUCKET": "your-project-id.firebasestorage.app"
}
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Firebase project with service account credentials
- Node.js environment
- FIREBASE_STORAGE_BUCKET (optional; defaults to [projectId].appspot.com)
About Firebase MCP
Firebase MCP enables AI assistants to work directly with Firebase services including Firestore (document database), Storage (file management), and Authentication (user management). It connects via the Firebase Admin SDK using a service account key and exposes tools over the Model Context Protocol. The server defaults to stdio transport but also supports a standalone HTTP transport with session management for multiple clients. It is compatible with MCP clients such as Claude Desktop, Augment Code, VS Code, and Cursor.
Tools & capabilities (12)
firestore_add_documentAdd a document to a collection. Required parameters: collection, data.
firestore_list_documentsList documents with filtering. Required parameter: collection.
firestore_get_documentGet a specific document. Required parameters: collection, id.
firestore_update_documentUpdate an existing document. Required parameters: collection, id, data.
firestore_delete_documentDelete a document. Required parameters: collection, id.
firestore_list_collectionsList root collections. No required parameters.
firestore_query_collection_groupQuery across subcollections. Required parameter: collectionId.
storage_list_filesList files in a directory. No required parameters (optional: directoryPath).
storage_get_file_infoGet file metadata and URL. Required parameter: filePath.
storage_uploadUpload file from content. Required parameters: filePath, content.
storage_upload_from_urlUpload file from a URL. Required parameters: filePath, url.
auth_get_userGet user by ID or email. Required parameter: identifier.
What this server can do
Firebase MCP provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Let an AI assistant read, write, update, and delete Firestore documents directly
- Query across Firestore subcollections using collection group queries
- Manage Firebase Storage files — list, inspect metadata, and upload from content or a URL
- Look up Firebase Authentication users by ID or email
- Run as a standalone HTTP service that multiple MCP clients can share
Security notes
Requires a Firebase service account key JSON file (set via SERVICE_ACCOUNT_KEY_PATH). The service account grants administrative access to your Firebase project via the Admin SDK — store the key securely and grant it only the permissions needed for the Firebase services you intend to use.
Firebase MCP FAQ
How do I install and configure it?
Add the server config to your MCP client settings (e.g. Claude Desktop, Cursor, VS Code/Augment). The recommended approach uses npx: set command to "npx" with args ["-y", "@gannonh/firebase-mcp"] and provide SERVICE_ACCOUNT_KEY_PATH (and optionally FIREBASE_STORAGE_BUCKET) as env vars. You can also run a local build with node pointing at dist/index.js.
What credentials does it need?
A Firebase service account key JSON file. Generate one in Firebase Console → Project Settings → Service Accounts → Generate new private key, then set SERVICE_ACCOUNT_KEY_PATH to its absolute path.
Does it support HTTP transport?
Yes. Set MCP_TRANSPORT=http (with optional MCP_HTTP_PORT, MCP_HTTP_HOST, MCP_HTTP_PATH) to run as a standalone HTTP service. Clients then connect via a url such as http://localhost:3000/mcp. HTTP transport supports session management for multiple concurrent clients.
Why do I see a Zod validation error with firestore_list_collections?
It is a known, erroneous validation error in the MCP SDK logs ("Expected object, received boolean"). It does not affect functionality — the query still returns the correct collection data.
Alternatives to Firebase MCP
Compare all alternatives →Google's official MCP server with prebuilt BigQuery tools, querying datasets via Application Default Credentials.
Read/write Postgres access plus index tuning, EXPLAIN plans, and database health analysis for AI agents.
Official Supabase server: manage tables, run SQL, branches, configs and edge functions from your AI client.
Compare Firebase MCP with: