Firebase MCP Server
OFFICIAL SERVERFirebase's own MCP server, run from the Firebase CLI, for managing projects, data and deploys
Firestore documents, Cloud Storage files and Auth user lookups for one Firebase project
By Gannon Hall (individual) TypeScript Local · stdio DatabasesCloud platformsFiles and storage
27 popularity score ★ 247 ↓ 1.8k/wk
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs SERVICE_ACCOUNT_KEY_PATH. Replace each <NAME> with your value.
claude mcp add firebase -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> -- npx -y @gannonh/firebase-mcp{
"mcpServers": {
"firebase": {
"command": "npx",
"args": [
"-y",
"@gannonh/firebase-mcp"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
}
}
}
}{
"mcpServers": {
"firebase": {
"command": "npx",
"args": [
"-y",
"@gannonh/firebase-mcp"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
}
}
}
}{
"servers": {
"firebase": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@gannonh/firebase-mcp"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
}
}
}
}[mcp_servers.firebase]
command = "npx"
args = ["-y", "@gannonh/firebase-mcp"]
[mcp_servers.firebase.env]
SERVICE_ACCOUNT_KEY_PATH = "<SERVICE_ACCOUNT_KEY_PATH>"gemini mcp add --scope user -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> firebase npx -- -y @gannonh/firebase-mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs SERVICE_ACCOUNT_KEY_PATH. Replace each <NAME> with your value.
git clone https://github.com/gannonh/firebase-mcp
cd firebase-mcp
npm install
npm run buildclaude mcp add firebase -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'{
"mcpServers": {
"firebase": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
}
}
}
}{
"mcpServers": {
"firebase": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
}
}
}
}{
"servers": {
"firebase": {
"type": "stdio",
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
}
}
}
}[mcp_servers.firebase]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"]
[mcp_servers.firebase.env]
SERVICE_ACCOUNT_KEY_PATH = "<SERVICE_ACCOUNT_KEY_PATH>"gemini mcp add --scope user -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> firebase node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'SERVICE_ACCOUNT_KEY_PATH |
Required: Absolute path to the Firebase service account key JSON; no tool works without it. |
|---|---|
FIREBASE_STORAGE_BUCKET |
Optional: Storage bucket name, for example your-project-id.firebasestorage.app; needed for the Storage tools. |
MCP_TRANSPORT |
Optional: stdio (default) or http. |
MCP_HTTP_PORT |
Optional: Port for HTTP mode, 3000 by default. |
MCP_HTTP_HOST |
Optional: Host for HTTP mode, localhost by default. |
MCP_HTTP_PATH |
Optional: Path for HTTP mode, /mcp by default. |
DEBUG_LOG_FILE |
Optional: true to log to ~/.firebase-mcp/debug.log, or a file path to log there. |
Firebase MCP is a Node.js server that connects an MCP client to a single Firebase project through the Firebase Admin SDK, signing in with a service account key file. It covers three products: Firestore (add, read, update, delete and list documents, list root collections, query a collection group), Cloud Storage (list files, read file metadata, upload content or a file fetched from a URL) and Authentication (look up one user by ID or email).
The code at version 1.4.9 registers 12 tools. The two Firestore list tools return 20 documents by default and at most 100 per call, with a page token for the next batch (src/index.ts). Uploads return a token-less firebasestorage.googleapis.com link, which only opens if your Storage rules allow public reads, plus a signed link that expires after 15 minutes (src/lib/firebase/storageClient.ts).
It speaks stdio by default. With MCP_TRANSPORT=http it serves streamable HTTP on localhost:3000/mcp, so several clients can share one instance. It is a community project by Gannon Hall, not a Google or Firebase product.
| Runtime | Node.js |
|---|
Node.js (the package declares >=16) to run it with npx. You need a Firebase project and a service account private key JSON file, created in the Firebase Console under Project Settings > Service Accounts. The account needs permissions for Firestore, Storage and Auth. To use the Storage tools, the project needs a Storage bucket.
The Firestore list and collection-group tools return 20 documents per call by default, up to 100 with `limit`. Auth access only looks up users: it cannot create, change or delete them. The Storage tools cannot delete files. The server works on one project, the one in the key file. The makers note that `firestore_list_collections` may log a Zod validation error in the client, but the results are still correct. A query that needs a composite index fails until you create that index in the Firebase Console. The README says the bucket defaults to [projectId].appspot.com, but the code passes no bucket when FIREBASE_STORAGE_BUCKET is unset, so newer projects on *.firebasestorage.app should set it.
It suits developers who want an assistant to inspect and edit Firestore data, or move files into Storage, in a dev or test project they control. It runs locally with an admin key, so it is a poor fit where you cannot hand out a service account key. If you want a server published by Firebase itself, look at Google's firebase-tools package, which we also list.
firestore_add_documentfirestore_list_documentsfirestore_get_documentfirestore_update_documentfirestore_delete_documentfirestore_list_collectionsfirestore_query_collection_groupstorage_list_filesstorage_get_file_infostorage_uploadstorage_upload_from_urlauth_get_user