Curated Claude Code catalog
Updated 07.05.2026 · 19:39 CET
01 / Skill
firebase

firebase-tools

Quality
9.0

The Firebase CLI offers comprehensive command-line tools for managing, testing, and deploying Firebase projects, from hosting to authentication and database interactions. It includes an official MCP Server, empowering AI development tools with deep Firebase-specific capabilities and expertise for enhanced project management.

USP

This is the official Firebase CLI and MCP Server, providing unparalleled, direct integration and comprehensive control over all Firebase services, ensuring robust and reliable AI-assisted development.

Use cases

  • 01Deploying web apps and Cloud Functions
  • 02Managing Firebase project configurations
  • 03Local development and emulation of Firebase services
  • 04Automating CI/CD pipelines for Firebase projects
  • 05AI-assisted Firebase project management and development

Detected files (4)

  • .agent/skills/resolve-docker-vulnerabilities/SKILL.mdskill
    Show content (2630 bytes)
    ---
    name: resolve-docker-vulnerabilities
    description: Skill to resolve Docker vulnerabilities for the firebase-cli image. Use this skill when you need to check for vulnerabilities in the firebase-cli Docker image and address them.
    ---
    
    # Resolve Docker Vulnerabilities
    
    This skill guides you through the process of listing images, checking for vulnerabilities, planning remediation, and verifying the fixes by publishing to a staging repository.
    
    ## Workflow
    
    ### 1. Publish to Staging
    
    Run the build on `fir-tools-builds` and publish to the `staging` repository in `firebase-cli` to see the baseline vulnerabilities after the build's own updates.
    
    ```bash
    ./scripts/publish/firebase-docker-image/run.sh --build-project fir-tools-builds --repo staging --target firebase-cli
    ```
    
    ### 2. Check Vulnerabilities
    
    Check the vulnerability reports for the image just pushed to staging. You will need to find the digest of the image first.
    
    ```bash
    gcloud artifacts docker images list us-docker.pkg.dev/firebase-cli/staging/firebase
    ```
    
    Then check vulnerabilities using the digest:
    
    ```bash
    gcloud artifacts vulnerabilities list us-docker.pkg.dev/firebase-cli/staging/firebase@sha256:<DIGEST>
    ```
    
    To investigate which layers and file paths are causing the vulnerabilities, run the command with `--format=json`:
    
    ```bash
    gcloud artifacts vulnerabilities list us-docker.pkg.dev/firebase-cli/staging/firebase@sha256:<DIGEST> --format=json
    ```
    
    Look for `fileLocation` and `layerDetails` in the output to understand if the vulnerability is in:
    - Project dependencies (e.g., under `/usr/local/node_packages/node_modules`). Recommend updating the package.json and running the build again. You can use overrides as needed here to upgrade transitive dependencies to non-breaking versions.
    - Global tools (e.g., under `/usr/local/lib/node_modules/npm`). Recommend waiting for upstream fixes (which will be pulled in as soon as they are available).
    - External binaries (e.g., emulator JARs under `/root/.cache/firebase/emulators`). Recommend raising these issues to the team owning the emulator.
    
    ### 3. Plan Remediation
    
    For each vulnerable package identified:
    - Determine if it can be updated in the Dockerfile.
    - Check if a fix is available.
    - Create a plan to address it (e.g., upgrading the base image, upgrading the specific package).
    
    ### 4. Present Plan to User
    
    Present the proposed plan to the user for approval before making changes.
    
    ### 5. Apply Fix and Re-Verify
    
    After making changes to the Dockerfile or related files, repeat Step 1 and Step 2 to publish a new staged image and verify that the vulnerabilities have been resolved.
    
  • .agent/skills/update-pubsub-emulator/SKILL.mdskill
    Show content (2696 bytes)
    ---
    name: Update Pub/Sub Emulator
    description: How to update the Pub/Sub emulator
    ---
    
    # Update Pub/Sub Emulator
    
    1.  **Update Local Emulator**
        Run the following command to make sure you have the latest version of the pubsub emulator installed via gcloud:
        ```bash
        gcloud components update pubsub-emulator
        ```
    
    2.  **Locate Emulator Directory**
        The emulator represents a directory likely located at `<gcloud-install-path>/platform/pubsub-emulator`.
        You can find the exact path by running the emulator and checking the output, or by inspecting where `gcloud` is installed (e.g. `which gcloud` usually points to a bin directory, and the platform directory is a sibling of `bin`).
        Verify the version by running the emulator or checking the `VERSION` file if it exists.
    
    3.  **Package the Emulator**
        Zip the directory found in the previous step. Name it `pubsub-emulator-<version>.zip`.
        Ensure the zip structure is such that the top-level directory inside the zip is `pubsub-emulator`.
        *Note: The existing code expects the binary at `pubsub-emulator-<version>/pubsub-emulator/bin/cloud-pubsub-emulator` inside the cache, which usually means the zip contains a root folder `pubsub-emulator`.*
    
    4.  **Upload to Storage**
        Upload the zip file to the Firebase preview bucket:
        ```bash
        gcloud storage cp pubsub-emulator-<version>.zip gs://firebase-preview-drop/emulator/
        ```
        Make the file publicly readable if necessary (usually the bucket permissions handle this, or use `gcloud storage objects update ... --add-acl-grant=entity=allUsers,role=READER`).
    
        **Note:** For the version 0.8.27 update, this step was already done.
    
    5.  **Calculate Metadata**
        Calculate the file size in bytes, MD5 checksum, and SHA256 checksum of the zip file.
        ```bash
        # Size
        ls -l pubsub-emulator-<version>.zip
        
        # MD5 (macOS: `md5`, Linux: `md5sum`)
        md5 pubsub-emulator-<version>.zip
        
        # SHA256 (macOS: `shasum -a 256`, Linux: `sha256sum`)
        shasum -a 256 pubsub-emulator-<version>.zip
        ```
    
    6.  **Update Configuration**
        Edit `src/emulator/downloadableEmulatorInfo.json`:
        - Update `pubsub.version` to the new version.
        - Update `pubsub.expectedSize`.
        - Update `pubsub.expectedChecksum` (MD5).
        - Update `pubsub.expectedChecksumSHA256`.
        - Update `pubsub.remoteUrl` and `pubsub.downloadPathRelativeToCacheDir`.
    
    7.  **Verify**
        Run the emulators to ensure the new version is downloaded and starts correctly.
        ```bash
        firebase emulators:start --only pubsub
        ```
    
    8. **Add a Changelog Entry**
        Add a changelog entry to `CHANGELOG.md` like '- Updated Pub/Sub emulator to version <version>'
        
  • src/mcp/server.jsonmcp_server
    Show content (664 bytes)
    {
      "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
      "name": "io.github.firebase/firebase-mcp",
      "description": "Gives AI development tools Firebase-specific capabilities and expertise.",
      "repository": {
        "url": "https://github.com/firebase/firebase-tools",
        "source": "github",
        "subfolder": "src/mcp"
      },
      "version": "0.3.0",
      "packages": [
        {
          "registryType": "npm",
          "identifier": "firebase-tools",
          "runtimeHint": "npx",
          "runtimeArguments": [{"type": "positional", "value": "mcp"}],
          "version": "14.27.0",
          "transport": {
            "type": "stdio"
          }
        }
      ]
    }
    
  • .claude-plugin/marketplace.jsonmarketplace
    Show content (1470 bytes)
    {
      "name": "firebase",
      "owner": {
        "name": "Firebase",
        "email": "firebase-support@google.com"
      },
      "metadata": {
        "description": "Official Claude plugin for Firebase to help understand and manage your Firebase project, resources, and data",
        "version": "1.0.0"
      },
      "plugins": [
        {
          "name": "firebase",
          "description": "Claude plugin for Firebase that installs the Firebase MCP server and helps to manage Firebase projects, add backend services, add AI features, deploy & host apps, and more",
          "version": "1.0.0",
          "author": {
            "name": "Firebase",
            "url": "https://firebase.google.com/"
          },
          "homepage": "https://github.com/firebase/firebase-tools",
          "repository": "https://github.com/firebase/firebase-tools.git",
          "license": "MIT",
          "keywords": [
            "firebase",
            "mcp",
            "cloud",
            "firestore",
            "database",
            "hosting",
            "functions",
            "cli"
          ],
          "category": "development",
          "tags": ["firebase", "backend", "database", "cloud-services"],
          "mcpServers": {
            "firebase": {
              "description": "Firebase MCP server for understanding and managing your Firebase project, resources, and data",
              "command": "npx",
              "args": ["-y", "firebase-tools", "mcp", "--dir", "."],
              "env": {
                "IS_FIREBASE_MCP": "true"
              }
            }
          },
          "source": "./"
        }
      ]
    }
    

README

Firebase CLI and MCP Server Actions Status Node Version NPM version Install MCP Server

The Firebase Command Line Interface (CLI) Tools can be used to test, manage, and deploy your Firebase project from the command line. This repository is also the home of the official Firebase MCP Server. For more information, please see the Firebase MCP Server documentation.

  • Deploy code and assets to your Firebase projects
  • Run a local web server for your Firebase Hosting site
  • Interact with data in your Firebase database
  • Import/Export users into/from Firebase Auth

To get started with the Firebase CLI, read the full list of commands below or check out the documentation.

Installation

Node Package

You can install the Firebase CLI using npm (the Node Package Manager). Note that you will need to install Node.js and npm. Installing Node.js should install npm as well.

To download and install the Firebase CLI run the following command:

npm install -g firebase-tools

This will provide you with the globally accessible firebase command.

Standalone Binary

The standalone binary distribution of the Firebase CLI allows you to download a firebase executable without any dependencies.

To download and install the CLI run the following command:

curl -sL firebase.tools | bash

Commands

The command firebase --help lists the available commands and firebase <command> --help shows more details for an individual command.

If a command is project-specific, you must either be inside a project directory with an active project alias or specify the Firebase project id with the -P <project_id> flag.

Below is a brief list of the available commands and their function:

Configuration Commands

CommandDescription
loginAuthenticate to your Firebase account. Requires access to a web browser.
logoutSign out of the Firebase CLI.
login:ciGenerate an authentication token for use in non-interactive environments.
login:addAuthorize the CLI for an additional account.
login:listList authorized CLI accounts.
login:useSet the default account to use for this project
useSet active Firebase project, manage project aliases.
openQuickly open a browser to relevant project resources.
initSetup a new Firebase project in the current directory. This command will create a firebase.json configuration file in your current directory.
helpDisplay help information about the CLI or specific commands.

Append --no-localhost to login (i.e., firebase login --no-localhost) to copy and paste code instead of starting a local server for authentication. A use case might be if you SSH into an instance somewhere and you need to authenticate to Firebase on that machine.

Project Management Commands

CommandDescription
apps:createCreate a new Firebase app in a project.
apps:listList the registered apps of a Firebase project.
apps:sdkconfigPrint the configuration of a Firebase app.
projects:addfirebaseAdd Firebase resources to a Google Cloud Platform project.
projects:createCreate a new Firebase project.
projects:listPrint a list of all of your Firebase projects.

Deployment and Local Emulation

These commands let you deploy and interact with your Firebase services.

CommandDescription
emulators:execStart the local Firebase emulators, run a test script, then shut down the emulators.
emulators:startStart the local Firebase emulators.
deployDeploys your Firebase project. Relies on firebase.json configuration and your local project folder.
serveStart a local server with your Firebase Hosting configuration and HTTPS-triggered Cloud Functions. Relies on firebase.json.
setup:emulators:databaseDownloads the database emulator.
setup:emulators:firestoreDownloads the firestore emulator.

App Distribution Commands

CommandDescription
appdistribution:distributeUpload a release binary and optionally distribute it to testers and run automated tests.
appdistribution:testers:listList testers in project.
appdistribution:testers:addAdd testers to project (and group, if specified via flag).
appdistribution:testers:removeRemove testers from a project (or group, if specified via flag).
appdistribution:groups:listList groups (of testers).
appdistribution:groups:createCreate a group (of testers).
appdistribution:groups:deleteDelete a group (of testers).
appdistribution:testcases:exportExport test cases as a YAML file.
appdistribution:testcases:importImport test cases from YAML file.

Auth Commands

CommandDescription
auth:importBatch importing accounts into Firebase from data file.
auth:exportBatch exporting accounts from Firebase into data file.

Detailed doc is here.

Realtime Database Commands

CommandDescription
database:getFetch data from the current project's database and display it as JSON. Supports querying on indexed data.
database:setReplace all data at a specified location in the current project's database. Takes input from file, STDIN, or command-line argument.
database:pushPush new data to a list at a specified location in the current project's database. Takes input from file, STDIN, or command-line argument.
database:removeDelete all data at a specified location in the current project's database.
database:updatePerform a partial update at a specified location in the current project's database. Takes input from file, STDIN, or command-line argument.
database:profileProfile database usage and generate a report.
database:instances:createCreate a realtime database instance.
database:instances:listList realtime database instances.
database:settings:getRead the realtime database setting at path
database:settings:setSet the realtime database setting at path.

Extensions Commands

CommandDescription
extDisplay information on how to use ext commands and extensions installed to your project.
ext:configureConfigure an existing extension instance.
ext:infoDisplay information about an extension by name (extensionName@x.y.z for a specific version)
ext:installInstall an extension.
ext:sdk:installInstall and SDK for an extension so you can define the extension in a functions codebase.
ext:listList all the extensions that are installed in your Firebase project.
ext:uninstallUninstall an extension that is installed in your Firebase project by Instance ID.
ext:updateUpdate an existing extension instance to the latest version.

Cloud Firestore Commands

CommandDescription
firestore:deleteDelete documents or collections from the current project's database. Supports recursive deletion of subcollections.
firestore:indexesList all deployed indexes from the current project.

Cloud Functions Commands

CommandDescription
functions:logRead logs from deployed Cloud Functions.
functions:listList all deployed functions in your Firebase project.
functions:config:setStore runtime configuration values for the current project's Cloud Functions.
functions:config:getRetrieve existing configuration values for the current project's Cloud Functions.
functions:config:unsetRemove values from the current project's runtime configuration.
functions:config:cloneCopy runtime configuration from one project environment to another.
functions:secrets:setCreate or update a secret for use in Cloud Functions for Firebase.
functions:secrets:getGet metadata for secret and its versions.
functions:secrets:accessAccess secret value given secret and its version. Defaults to accessing the latest version.
functions:secrets:pruneDestroys unused secrets.
functions:secrets:destroyDestroy a secret. Defaults to destroying the latest version.
functions:deleteDelete one or more Cloud Functions by name or group name.
functions:shellLocally emulate functions and start Node.js shell where these local functions can be invoked with test data.

Hosting Commands

CommandDescription
hosting:disableStop serving Firebase Hosting traffic for the active project. A "Site Not Found" message will be displayed at your project's Hosting URL after running this command.

Remote Config Commands

CommandDescription
remoteconfig:getGet a Firebase project's Remote Config template.
remoteconfig:versions:listGet a list of the most recent Firebase Remote Config template versions that have been published.
remoteconfig:rollbackRoll back a project's published Remote Config template to the version provided by --version_number flag.
remoteconfig:experiments:getGet a Remote Config experiment.
remoteconfig:experiments:listGet a list of Remote Config experiments
remoteconfig:experiments:deleteDelete a Remote Config experiment.
remoteconfig:rollouts:getGet a Remote Config rollout.
remoteconfig:rollouts:listGet a list of Remote Config rollouts.
remoteconfig:rollouts:deleteDelete a Remote Config rollout.

Use firebase:deploy --only remoteconfig to update and publish a project's Firebase Remote Config template.

Authentication

General

The Firebase CLI can use one of four authentication methods listed in descending priority:

  • User Token - DEPRECATED: this authentication method will be removed in a future major version of firebase-tools; use a service account to authenticate instead - provide an explicit long-lived Firebase user token generated from firebase login:ci. Note that these tokens are extremely sensitive long-lived credentials and are not the right option for most cases. Consider using service account authorization instead. The token can be set in one of two ways:
    • Set the --token flag on any command, for example firebase --token="<token>" projects:list.
    • Set the FIREBASE_TOKEN environment variable.
  • Local Login - run firebase login to log in to the CLI directly as yourself. The CLI will cache an authorized user credential on your machine.
  • Service Account - set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to the path of a JSON service account key file. For more details, see Google Cloud's Getting started with authentication guide.
  • Application Default Credentials - if you use the gcloud CLI and log in with gcloud auth application-default login, the Firebase CLI will use them if none of the above credentials are present.

Multiple Accounts

By default firebase login sets a single global account for use on all projects. If you have multiple Google accounts which you use for Firebase projects you can authorize multiple accounts and use them on a per-project or per-command basis.

To authorize an additonal account for use with the CLI, run firebase login:add. You can view the list of authorized accounts with firebase login:list.

To set the default account for a specific Firebase project directory, run firebase login:use from within the directory and select the desired account. To check the default account for a directory, run firebase login:list and the default account for the current context will be listed first.

To set the account for a specific command invocation, use the --account flag with any command. For example firebase --account=user@domain.com deploy. The specified account must have already been added to the Firebase CLI using firebase login:add.

Cloud Functions Emulator

The Cloud Functions emulator is exposed through commands like emulators:start, serve and functions:shell. Emulated Cloud Functions run as independent node processes on your development machine which means they have their own credential discovery mechanism.

By default these node processes are not able to discover credentials from firebase login. In order to provide a better development experience, when you are logged in to the CLI through firebase login we take the user credentials and construct a temporary credential that we pass into the emulator through GOOGLE_APPLICATION_CREDENTIALS. We only do this if you have not already set the GOOGLE_APPLICATION_CREDENTIALS environment variable yourself.

Using behind a proxy

The CLI supports HTTP(S) proxies via environment variables. To use a proxy, set the HTTPS_PROXY or HTTP_PROXY value in your environment to the URL of your proxy (e.g. HTTP_PROXY=http://127.0.0.1:12345).

Using with CI Systems

The Firebase CLI requires a browser to complete authentication, but is fully compatible with CI and other headless environments.

Complete the following steps to run Firebase commands in a CI environment. Find detailed instructions for each step in Google Cloud's Getting started with authentication guide.

  1. Create a service account and grant it the appropriate level of access to your project.
  2. Create a service account key (JSON file) for that service account.
  3. Store the key file in a secure, accessible way in your CI system.
  4. Set GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json in your CI system when running Firebase commands.

To disable access for the service account, find the service account for your project in the Google Cloud Console, and then either remove the key, or disable or delete the service account.

Using as a Module

The Firebase CLI can also be used programmatically as a standard Node module. Each command is exposed as a function that takes positional arguments followed by an options object and returns a Promise.

So if we run this command at our command line:

$ firebase --project="foo" apps:list ANDROID

That translates to the following in Node:

const client = require("firebase-tools");
client.apps
  .list("ANDROID", { project: "foo" })
  .then((data) => {
    // ...
  })
  .catch((err) => {
    // ...
  });

The options object must be the very last argument and any unspecified positional argument will get the default value of "". The following two invocations are equivalent:

const client = require("firebase-tools");

// #1 - No arguments or options, defaults will be inferred
client.apps.list();

// #2 - Explicitly provide "" for all arguments and {} for options
client.apps.list("", {});

Note: when used in a limited environment like Cloud Functions, not all firebase-tools commands will work programatically because they require access to a local filesystem.