Firebase MCP

Firebase MCP is a free MCP server that gives your AI agent six tools for Firebase: four for Cloud Firestore and two for Firebase Authentication. Your agent can list collections, read a document, run a filtered query, count documents, and look up users while you work on the code that uses them. It can also make changes, such as writing a document or disabling a user, with a confirmation step for anything destructive. It is its own VS Code extension, it runs on your machine, and it uses your own Google account.

There is no server to host and no config file to edit. You install the extension, sign in to Google once, and the tools appear in every agent it finds: VS Code Copilot, Claude Code, Cursor, OpenAI Codex, Google Gemini, Windsurf, Continue.dev, and Cline.

What you can ask

  • “Which collections does this project have?”
  • “Read the document at users/abc123”
  • “Show me the 20 most recent orders with status pending”
  • “How many users signed up with a company email?”
  • “Set the featured flag to true on products/abc”
  • “Create a test user with this email”

The six Firebase MCP tools

Tool What it does What you can pass
firestore_list_collections List top-level collections, or the subcollections of a document A document path, or nothing for the top level
firestore_get_document Read one document by path The document path
firestore_query Query a collection with filters, ordering, and a limit Collection, where filters, order field and direction, up to 200 documents
firestore_count Count the documents in a collection without reading them Collection and optional filters
auth_get_user Look up an Authentication user A UID, an email address, or a phone number
auth_list_users List Authentication users, 100 at a time by default A page size up to 1,000 and a page token

The Firebase admin tool

Changes go through one tool, firebase_admin, with named actions.

Action What it does
create_document Create a document at a path
set_document Overwrite a document, or merge into it (needs confirmation)
update_document Update fields on an existing document
delete_document Delete a document (needs confirmation)
create_user Create an Authentication user
update_user Change a user’s email, password, name, or phone
disable_user Disable or re-enable a user
delete_user Delete a user (needs confirmation)

Destructive actions need explicit confirmation

set_document, delete_document and delete_user only run with confirm: true. Without it the server changes nothing and returns a warning, so the agent has to ask you first. Reading never needs it.

Three things people use it for

Debugging against real data

A bug report names a user. Ask the agent to look the user up in Auth, read their document, and compare it with what the code expects. It sees the actual field names and types, so it stops guessing at the schema.

Checking a migration

After a script changes documents, ask how many still have the old shape. firestore_count answers without reading every document, which keeps read costs down.

Writing queries that match the data

Ask the agent to read a few documents from a collection before it writes a query or a security rule. The code it writes then fits the data you have.

Set it up in five steps

A setup wizard opens the first time you launch the extension. OAuth is the usual choice.

  1. Create a project in the Google Cloud Console, or pick one you already have.
  2. Enable the Cloud Firestore API and the Identity Toolkit API under APIs and Services.
  3. Create an OAuth client ID of type Desktop app.
  4. Paste the client ID and secret into the wizard.
  5. Sign in to Google in the browser window that opens, and authorize.

If your consent screen is set to External, add yourself as a test user first. The wizard also accepts Application Default Credentials from the gcloud CLI and a service account key.

Set firebaseMcp.projectId to your Firebase project ID, or name the project in a request. A service account key from Project settings, Service accounts is the simplest sign-in for Firebase. The account needs the Cloud Datastore Viewer and Firebase Authentication Viewer roles.

Using Firebase MCP with Claude Code, Cursor and other agents

You do not add a server entry by hand. The extension writes the registration for each agent it finds: ~/.claude.json for Claude Code, ~/.cursor/mcp.json for Cursor, ~/.codex/config.toml for OpenAI Codex, ~/.gemini/settings.json for Gemini, and the matching files for Windsurf, Continue.dev, and Cline. VS Code Copilot picks it up through the VS Code API.

Open a new session in any of them and the tools are in the tool list. To limit which agents get them, switch the others off in VS Code settings under firebaseMcp.agents. The command “Firebase MCP: Remove from All Agents” takes every registration back out.

Limits

  • Firestore reads are billed by Google per document. Use firestore_count and a limit when a collection is large.
  • It covers Firestore and Authentication. Realtime Database, Storage, Functions, and Hosting are not included.
  • It reads production data if that is the project you point it at. Use a staging project when you can.

Common questions

Is Firebase MCP free?

Yes. The extension is free and MIT licensed. Google’s own charges for the API are separate.

Is this the official Firebase MCP server?

No. Google publishes an official Firebase MCP server, documented at firebase.google.com. This is an independent extension for people who want Firestore and Auth tools registered across eight agents from one install.

Does it work with the Firebase emulators?

It is built for a real Firebase project. Point it at a staging project if you want to keep it away from production data.

Does it work with Claude Code and Cursor?

Yes. Both are registered automatically, along with Copilot and five other agents.

Where does my data go?

Nowhere except Google. The MCP server runs on your own machine and calls Google’s API with your credentials. There is no telemetry, and the sign-in token is kept in VS Code’s encrypted secret storage.

Install it

Firebase MCP is free and MIT licensed.

Related