← Back to Firebase MCP Server

Install Firebase MCP Server

Pick your client, copy the command, done.

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

Environment Variables

Set these before running Firebase MCP Server.

VariableDescriptionRequired
FIRESTORE_EMULATOR_HOSTHost and port for the Firestore emulatorYes
FIREBASE_PROJECT_IDThe Firebase project IDYes
FIREBASE_EMULATOR_HUBHost and port for the Firebase emulator hubYes

Available Tools (6)

Once configured, Firebase MCP Server gives your AI agent access to:

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

Try It Out

After setup, try these prompts with your AI agent:

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.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Node.js 18+ with npm/npx installed
  • FIRESTORE_EMULATOR_HOST — Host and port for the Firestore emulator
  • FIREBASE_PROJECT_ID — The Firebase project ID
  • FIREBASE_EMULATOR_HUB — Host and port for the Firebase emulator hub

Keep this setup from going cold

Save the docs, env vars, and workflow around Firebase MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup