icon for mcp server

Firebase

STDIOOfficial

Firebase MCP server enabling AI tools to manage Firebase projects, databases, authentication, and deployments

Firebase MCP Server

License Install MCP Server

The Firebase Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Firebase projects and your app's codebase. The Firebase MCP server works with any tool that can act as an MCP client, including: Firebase Studio, Gemini CLI, Claude Code, Cline, Cursor, VS Code Copilot, Windsurf, and more!

Features

An editor configured to use the Firebase MCP server can use its AI capabilities to help you:

  • Create and manage Firebase projects - Initialize new projects, list existing ones, and manage Firebase apps
  • Manage Firebase Authentication users - Retrieve, update, and manage user accounts
  • Work with Cloud Firestore and Firebase Data Connect - Query, read, write, and manage database documents
  • Retrieve Firebase Data Connect schemas - Generate schemas and operations with AI assistance
  • Understand security rules - Validate and retrieve security rules for Firestore, Cloud Storage, and Realtime Database
  • Send messages with Firebase Cloud Messaging - Send push notifications to devices and topics
  • Access Crashlytics data - Debug issues, view crash reports, and manage crash analytics
  • Deploy to App Hosting - Monitor backends and retrieve logs
  • Work with Realtime Database - Read and write data in real-time
  • Query Cloud Functions logs - Retrieve and analyze function execution logs
  • Manage Remote Config - Get and update remote configuration templates

Some tools use Gemini in Firebase to help you:

  • Generate Firebase Data Connect schema and operations
  • Consult Gemini about Firebase products

Important: Gemini in Firebase can generate output that seems plausible but is factually incorrect. It may respond with inaccurate information that doesn't represent Google's views. Validate all output from Gemini before you use it and don't use untested generated code in production. Don't enter personally-identifiable information (PII) or user data into the chat.
Learn more about Gemini in Firebase and how it uses your data.

Installation and Setup

Prerequisites

Make sure you have a working installation of Node.js and npm.

Basic Configuration

The Firebase MCP server can work with any MCP client that supports standard I/O (stdio) as the transport medium. When the Firebase MCP server makes tool calls, it uses the same user credentials that authorize the Firebase CLI in the environment where it's running.

Here are configuration instructions for popular AI-assistive tools:

Gemini CLI

Install the Firebase extension for Gemini CLI:

gemini extensions install https://github.com/gemini-cli-extensions/firebase/

Claude Code

To configure Claude Code to use the Firebase MCP server, run the following command under your app folder:

claude mcp add firebase npx -- -y firebase-tools@latest mcp

You can verify the installation by running:

claude mcp list

It should show:

firebase: npx -y firebase-tools@latest mcp - ✓ Connected

Cursor

Add to .cursorrules in your project directory or configure in Cursor settings:

{ "mcpServers": { "firebase": { "command": "npx", "args": ["-y", "firebase-tools@latest", "mcp"] } } }

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{ "mcpServers": { "firebase": { "command": "npx", "args": ["-y", "firebase-tools@latest", "mcp"] } } }

Firebase Studio

To configure Firebase Studio to use the Firebase MCP server, edit or create the configuration file: .idx/mcp.json

{ "mcpServers": { "firebase": { "command": "npx", "args": ["-y", "firebase-tools@latest", "mcp"] } } }

Usage

Once configured, the MCP server will automatically provide Firebase capabilities to your AI assistant. You can:

  • Ask the AI to help set up Firebase services
  • Query your Firestore database
  • Manage authentication users
  • Deploy to Firebase Hosting
  • Debug Crashlytics issues
  • And much more!

For a complete list of available tools and resources, see the Server Capabilities section below.

Documentation

For more information, visit the official Firebase MCP server documentation.

Server Capabilities

The Firebase MCP server provides three types of capabilities: Tools (functions that perform actions), Prompts (reusable command templates), and Resources (documentation files for AI models).

Tool NameFeature GroupDescription
firebase_logincoreUse this to sign the user into the Firebase CLI and Firebase MCP server. This requires a Google Account, and sign in is required to create and work with Firebase Projects.
firebase_logoutcoreUse this to sign the user out of the Firebase CLI and Firebase MCP server.
firebase_validate_security_rulescoreUse this to check Firebase Security Rules for Firestore, Storage, or Realtime Database for syntax and validation errors.
firebase_get_projectcoreUse this to retrieve information about the currently active Firebase Project.
firebase_list_appscoreUse this to retrieve a list of the Firebase Apps registered in the currently active Firebase project. Firebase Apps can be iOS, Android, or Web.
firebase_list_projectscoreUse this to retrieve a list of Firebase Projects that the signed-in user has access to.
firebase_get_sdk_configcoreUse this to retrieve the Firebase configuration information for a Firebase App. You must specify EITHER a platform OR the Firebase App ID for a Firebase App registered in the currently active Firebase Project.
firebase_create_projectcoreUse this to create a new Firebase Project.
firebase_create_appcoreUse this to create a new Firebase App in the currently active Firebase Project. Firebase Apps can be iOS, Android, or Web.
firebase_create_android_shacoreUse this to add the specified SHA certificate hash to the specified Firebase Android App.
firebase_get_environmentcoreUse this to retrieve the current Firebase environment configuration for the Firebase CLI and Firebase MCP server, including current authenticated user, project directory, active Firebase Project, and more.
firebase_update_environmentcoreUse this to update environment config for the Firebase CLI and Firebase MCP server, such as project directory, active project, active user account, accept terms of service, and more. Use firebase_get_environment to see the currently configured environment.
firebase_initcoreUse this to initialize selected Firebase services in the workspace (Cloud Firestore database, Firebase Data Connect, Firebase Realtime Database, Firebase AI Logic). All services are optional; specify only the products you want to set up. You can initialize new features into an existing project directory, but re-initializing an existing feature may overwrite configuration. To deploy the initialized features, run the firebase deploy command after firebase_init tool.
firebase_get_security_rulescoreUse this to retrieve the security rules for a specified Firebase service. If there are multiple instances of that service in the product, the rules for the defualt instance are returned.
firebase_read_resourcescoreUse this to read the contents of firebase:// resources or list available resources
firestore_delete_documentfirestoreUse this to delete a Firestore documents from a database in the current project by full document paths. Use this if you know the exact path of a document.
firestore_get_documentsfirestoreUse this to retrieve one or more Firestore documents from a database in the current project by full document paths. Use this if you know the exact path of a document.
firestore_list_collectionsfirestoreUse this to retrieve a list of collections from a Firestore database in the current project.
firestore_query_collectionfirestoreUse this to retrieve one or more Firestore documents from a collection is a database in the current project by a collection with a full document path. Use this if you know the exact path of a collection and the filtering clause you would like for the document.
auth_get_usersauthUse this to retrieve one or more Firebase Auth users based on a list of UIDs or a list of emails.
auth_update_userauthUse this to disable, enable, or set a custom claim on a specific user's account.
auth_set_sms_region_policyauthUse this to set an SMS region policy for Firebase Authentication to restrict the regions which can receive text messages based on an ALLOW or DENY list of country codes. This policy will override any existing policies when set.
dataconnect_builddataconnectUse this to compile Firebase Data Connect schema, operations, and/or connectors and check for build errors.
dataconnect_generate_schemadataconnectUse this to generate a Firebase Data Connect Schema based on the users description of an app.
dataconnect_generate_operationdataconnectUse this to generate a single Firebase Data Connect query or mutation based on the currently deployed schema and the provided prompt.
dataconnect_list_servicesdataconnectUse this to list existing local and backend Firebase Data Connect services
dataconnect_executedataconnectUse this to execute a GraphQL operation against a Data Connect service or its emulator.
storage_get_object_download_urlstorageUse this to retrieve the download URL for an object in a Cloud Storage for Firebase bucket.
messaging_send_messagemessagingUse this to send a message to a Firebase Cloud Messaging registration token or topic. ONLY ONE of registration_token or topic may be supplied in a specific call.
functions_get_logsfunctionsUse this to retrieve a page of Cloud Functions log entries using Google Cloud Logging advanced filters.
remoteconfig_get_templateremoteconfigUse this to retrieve the specified Firebase Remote Config template from the currently active Firebase Project.
remoteconfig_update_templateremoteconfigUse this to publish a new remote config template or roll back to a specific version for the project
crashlytics_create_notecrashlyticsAdd a note to an issue from crashlytics.
crashlytics_delete_notecrashlyticsDelete a note from a Crashlytics issue.
crashlytics_get_issuecrashlyticsGets data for a Crashlytics issue, which can be used as a starting point for debugging.
crashlytics_list_eventscrashlyticsUse this to list the most recent events matching the given filters.
Can be used to fetch sample crashes and exceptions for an issue,
which will include stack traces and other data useful for debugging.
crashlytics_batch_get_eventscrashlyticsGets specific events by resource name.
Can be used to fetch sample crashes and exceptions for an issue,
which will include stack traces and other data useful for debugging.
crashlytics_list_notescrashlyticsUse this to list all notes for an issue in Crashlytics.
crashlytics_get_top_issuescrashlyticsUse this to count events and distinct impacted users, grouped by issue.
Groups are sorted by event count, in descending order.
Only counts events matching the given filters.
crashlytics_get_top_variantscrashlyticsCounts events and distinct impacted users, grouped by issue variant.
Groups are sorted by event count, in descending order.
Only counts events matching the given filters.
crashlytics_get_top_versionscrashlyticsCounts events and distinct impacted users, grouped by version.
Groups are sorted by event count, in descending order.
Only counts events matching the given filters.
crashlytics_get_top_apple_devicescrashlyticsCounts events and distinct impacted users, grouped by apple device.
Groups are sorted by event count, in descending order.
Only counts events matching the given filters.
Only relevant for iOS, iPadOS and MacOS applications.
crashlytics_get_top_android_devicescrashlyticsCounts events and distinct impacted users, grouped by android device.
Groups are sorted by event count, in descending order.
Only counts events matching the given filters.
Only relevant for Android applications.
crashlytics_get_top_operating_systemscrashlyticsCounts events and distinct impacted users, grouped by operating system.
Groups are sorted by event count, in descending order.
Only counts events matching the given filters.
crashlytics_update_issuecrashlyticsUse this to update the state of Crashlytics issue.
apphosting_fetch_logsapphostingUse this to fetch the most recent logs for a specified App Hosting backend. If buildLogs is specified, the logs from the build process for the latest build are returned. The most recent logs are listed first.
apphosting_list_backendsapphostingUse this to retrieve a list of App Hosting backends in the current project. An empty list means that there are no backends. The uri is the public URL of the backend. A working backend will have a managed_resources array that will contain a run_service entry. That run_service.service is the resource name of the Cloud Run service serving the App Hosting backend. The last segment of that name is the service ID. domains is the list of domains that are associated with the backend. They either have type CUSTOM or DEFAULT. Every backend should have a DEFAULT domain. The actual domain that a user would use to conenct to the backend is the last parameter of the domain resource name. If a custom domain is correctly set up, it will have statuses ending in ACTIVE.
realtimedatabase_get_datarealtimedatabaseUse this to retrieve data from the specified location in a Firebase Realtime Database.
realtimedatabase_set_datarealtimedatabaseUse this to write data to the specified location in a Firebase Realtime Database.
Prompt NameFeature GroupDescription
firebase:deploycoreUse this command to deploy resources to Firebase.

Arguments:
<prompt> (optional): any specific instructions you wish to provide about deploying
firebase:initcoreUse this command to set up Firebase services, like backend and AI features.
firebase:consultcoreUse this command to consult the Firebase Assistant with access to detailed up-to-date documentation for the Firebase platform.

Arguments:
<prompt>: a question to pass to the Gemini in Firebase model
crashlytics:connectcrashlyticsAccess a Firebase application's Crashlytics data.
Resource NameDescription
backend_init_guideFirebase Backend Init Guide: guides the coding agent through configuring Firebase backend services in the current project
ai_init_guideFirebase GenAI Init Guide: guides the coding agent through configuring GenAI capabilities in the current project utilizing Firebase
data_connect_init_guideFirebase Data Connect Init Guide: guides the coding agent through configuring Data Connect for PostgreSQL access in the current project
firestore_init_guideFirestore Init Guide: guides the coding agent through configuring Firestore in the current project
firestore_rules_init_guideFirestore Rules Init Guide: guides the coding agent through setting up Firestore security rules in the project
rtdb_init_guideFirebase Realtime Database Init Guide: guides the coding agent through configuring Realtime Database in the current project
auth_init_guideFirebase Authentication Init Guide: guides the coding agent through configuring Firebase Authentication in the current project
hosting_init_guideFirebase Hosting Deployment Guide: guides the coding agent through deploying to Firebase Hosting in the current project
docsFirebase Docs: loads plain text content from Firebase documentation, e.g. https://firebase.google.com/docs/functions becomes firebase://docs/functions

Be the First to Experience MCP Now