Firebase MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "FIRESTORE_EMULATOR_HOST=${FIRESTORE_EMULATOR_HOST}" -e "FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}" -e "FIREBASE_EMULATOR_HUB=${FIREBASE_EMULATOR_HUB}" firebase-mcp -- node "<FULL_PATH_TO_FIREBASE_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_FIREBASE_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:FIRESTORE_EMULATOR_HOSTFIREBASE_PROJECT_IDFIREBASE_EMULATOR_HUB
README.md

Inspect and query Firebase Emulator Firestore and function logs.

Firebase MCP Server

MCP server for inspecting Firebase Emulator Firestore and function logs.

Setup

npm install
npm run build

Config

Copy .env.example to .env and adjust:

FIRESTORE_EMULATOR_HOST=localhost:8080
FIREBASE_PROJECT_ID=demo-project
FIREBASE_EMULATOR_HUB=localhost:4000

Usage with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "firebase": {
      "command": "node",
      "args": ["/path/to/firebase_mcp_server/dist/index.js"],
      "env": {
        "FIRESTORE_EMULATOR_HOST": "localhost:8080",
        "FIREBASE_PROJECT_ID": "your-project-id",
        "FIREBASE_EMULATOR_HUB": "localhost:4000"
      }
    }
  }
}

Tools

Tool Description
list_collections List top-level Firestore collections
list_subcollections List subcollections of a document
list_documents List documents in a collection
get_document Get a single document by path
query_collection Query with filters, ordering, limit
get_function_logs Get function logs with grep-style filtering

get_function_logs options

  • pattern - Regex to filter log messages
  • level - DEBUG/INFO/WARN/ERROR
  • functionName - Filter by function name
  • limit - Max entries (default 50)
  • since - ISO timestamp cutoff

Tools (6)

list_collectionsList top-level Firestore collections
list_subcollectionsList subcollections of a document
list_documentsList documents in a collection
get_documentGet a single document by path
query_collectionQuery with filters, ordering, limit
get_function_logsGet function logs with grep-style filtering

Environment Variables

FIRESTORE_EMULATOR_HOSTrequiredHost and port for the Firestore emulator
FIREBASE_PROJECT_IDrequiredThe Firebase project ID
FIREBASE_EMULATOR_HUBrequiredHost and port for the Firebase emulator hub

Configuration

claude_desktop_config.json
{"mcpServers": {"firebase": {"command": "node", "args": ["/path/to/firebase_mcp_server/dist/index.js"], "env": {"FIRESTORE_EMULATOR_HOST": "localhost:8080", "FIREBASE_PROJECT_ID": "your-project-id", "FIREBASE_EMULATOR_HUB": "localhost:4000"}}}}

Try it

List all the top-level collections in my local Firestore emulator.
Get the document at path 'users/user123' and show me its contents.
Query the 'orders' collection for documents where status is 'pending'.
Show me the last 20 error logs for my 'processPayment' cloud function.
List all subcollections available under the 'users/user123' document.

Frequently Asked Questions

What are the key features of Firebase MCP Server?

Inspect Firestore collections and documents. Navigate Firestore subcollections. Query Firestore data with filters and limits. Retrieve and filter Cloud Function logs. Support for regex-based log filtering.

What can I use Firebase MCP Server for?

Debugging Firestore data structure during local development. Verifying Cloud Function execution logs without leaving the IDE. Quickly querying emulator data to validate application state. Troubleshooting function errors using regex log filtering.

How do I install Firebase MCP Server?

Install Firebase MCP Server by running: npm install && npm run build

What MCP clients work with Firebase MCP Server?

Firebase MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Firebase MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare