Firebase MCP

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

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs SERVICE_ACCOUNT_KEY_PATH. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add firebase -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> -- npx -y @gannonh/firebase-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "firebase": {
      "command": "npx",
      "args": [
        "-y",
        "@gannonh/firebase-mcp"
      ],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "firebase": {
      "command": "npx",
      "args": [
        "-y",
        "@gannonh/firebase-mcp"
      ],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "firebase": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@gannonh/firebase-mcp"
      ],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.firebase]
command = "npx"
args = ["-y", "@gannonh/firebase-mcp"]

[mcp_servers.firebase.env]
SERVICE_ACCOUNT_KEY_PATH = "<SERVICE_ACCOUNT_KEY_PATH>"
Gemini CLITerminal
gemini mcp add --scope user -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> firebase npx -- -y @gannonh/firebase-mcp
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs SERVICE_ACCOUNT_KEY_PATH. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/gannonh/firebase-mcp
cd firebase-mcp
npm install
npm run build
Claude CodeTerminal
claude mcp add firebase -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "firebase": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "firebase": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "firebase": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "<SERVICE_ACCOUNT_KEY_PATH>"
      }
    }
  }
}
Codex~/.codex/config.toml
[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 CLITerminal
gemini mcp add --scope user -e SERVICE_ACCOUNT_KEY_PATH=<SERVICE_ACCOUNT_KEY_PATH> firebase node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'

Settings 7

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.

What it does

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.

What it needs

RuntimeNode.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.

Limits

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.

Who it suits

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.

Tools 12

firestore_add_document
Create a new document in a collection
firestore_list_documents
List a collection's documents with filters, ordering and paging (20 by default, 100 at most)
firestore_get_document
Fetch one document by its ID
firestore_update_document
Change fields of an existing document
firestore_delete_document
Remove a document by its ID
firestore_list_collections
List the project's root collections
firestore_query_collection_group
Query every subcollection that shares one ID, with filters and paging
storage_list_files
List the files under a folder in the bucket
storage_get_file_info
Get a file's metadata and a 15-minute signed link
storage_upload
Store a local file, a data URL or plain text at a bucket path
storage_upload_from_url
Fetch a file from a URL and store it in the bucket
auth_get_user
Look up an Auth user by UID or email

Similar servers