# gannonh/firebase-mcp [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/gannonh/firebase-mcp  
**GitHub Stars:** 247  
**npm Downloads (last month):** 5543  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gannonh-firebase-mcp

## Description
Firebase services including Auth, Firestore and Storage.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "firebase-mcp": {
    "command": "npx",
    "args": ["-y","@gannonh/firebase-mcp"],
    "env": {
      "SERVICE_ACCOUNT_KEY_PATH": "",
      "FIREBASE_STORAGE_BUCKET": "",
      "MCP_TRANSPORT": "",
      "MCP_HTTP_PORT": "",
      "MCP_HTTP_HOST": "",
      "MCP_HTTP_PATH": "",
      "DEBUG_LOG_FILE": ""
    }
  }
}
```

**Requires environment variables:** `SERVICE_ACCOUNT_KEY_PATH`, `FIREBASE_STORAGE_BUCKET`, `MCP_TRANSPORT`, `MCP_HTTP_PORT`, `MCP_HTTP_HOST`, `MCP_HTTP_PATH`, `DEBUG_LOG_FILE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What gannonh/firebase-mcp does

gannonh/firebase-mcp MCP server exposes selected Firebase operations to MCP-compatible AI clients. It connects to Firestore for document and collection operations, Firebase Storage for file management, and Firebase Authentication for retrieving users by ID or email.

The Firestore interface covers adding, listing, reading, updating, and deleting documents. It can also list root collections and query documents across subcollections with a shared collection ID. Storage tools list files, return file metadata and URLs, and upload content either directly or from a URL. Authentication provides a user lookup operation.

The project belongs in the Cloud Platforms category for workflows where an agent needs controlled access to an existing Firebase project rather than a separate database or file service.

## How it works

The server uses a Firebase service-account JSON key for initialization. MCP clients communicate with it through stdio by default. An HTTP transport is also available, allowing the server to run as a standalone service at a configurable endpoint. HTTP mode supports multiple clients by assigning each connection a session ID.

Clients can start the published package with `npx`, or run a locally built JavaScript entry point. After registration, an agent can call the exposed tools using their required parameters, such as a Firestore collection and document ID or a Storage file path.

## Setup and configuration

A Firebase project and a Node.js environment are required. Create a service-account key in Firebase Console under Project Settings and Service Accounts, then store the JSON file securely. Set `SERVICE_ACCOUNT_KEY_PATH` to its absolute path.

`FIREBASE_STORAGE_BUCKET` can specify the Storage bucket; when omitted, the server uses the project ID with the `appspot.com` suffix. For transport configuration, `MCP_TRANSPORT` accepts `stdio` or `http` and defaults to `stdio`. HTTP mode also supports `MCP_HTTP_PORT`, `MCP_HTTP_HOST`, and `MCP_HTTP_PATH`, which default to port 3000, `localhost`, and `/mcp` respectively.

For diagnostics, set `DEBUG_LOG_FILE` to `true` to write to `~/.firebase-mcp/debug.log`, or set it to a custom file path. The package can be launched with `npx -y @gannonh/firebase-mcp`, or installed from source with npm and built using the documented build command.

## Tools and capabilities

The gannonh/firebase-mcp MCP server provides these tool groups:

- **Firestore:** add, list, get, update, and delete documents; list root collections; query collection groups.
- **Storage:** list files in an optional directory, retrieve file information and a URL, upload content, and upload a file from a URL.
- **Authentication:** retrieve a user using an ID or email address.

Firestore queries may require a composite index. Firebase returns a link for creating the index when one is needed. The `firestore_list_collections` operation may also produce a Zod validation message in client logs even though the collection query returns its data successfully; the README identifies this as an MCP SDK validation issue.

## Limitations and notes

The server requires valid service-account credentials and appropriate Firebase permissions. Storage operations depend on the configured bucket existing; an incorrect bucket name causes initialization or storage errors. HTTP mode requires clients to connect to the configured MCP URL, while stdio mode is the default for local client configurations.

The documented authentication capability is limited to retrieving a user by identifier. Firestore operations may also depend on indexes configured in the Firebase project.

_Full upstream README: https://allmcps.com/mcp/gannonh-firebase-mcp/readme_

