MCP server/database

Firebase MCP Server

Inspect and query Firebase Emulator Firestore and function logs.

NigelThorne/firebase_mcp_server ↗by NigelThorneupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

npm install
npm run build
2

Register it in Claude Code

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 /path/to/firebase_mcp_server/dist/index.js

Replace any placeholder paths in the command with the real path on your machine.

Required:FIRESTORE_EMULATOR_HOSTFIREBASE_PROJECT_IDFIREBASE_EMULATOR_HUB
3

Make your agent remember this setup

firebase-mcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • 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

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

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.
Original README from NigelThorne/firebase_mcp_server

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

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.

Conare · memory for coding agents

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.

Set up free$npx conare@latest