← 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 build2
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.jsReplace any placeholder paths in the command with the real path on your machine.
Required:
FIRESTORE_EMULATOR_HOSTFIREBASE_PROJECT_IDFIREBASE_EMULATOR_HUBEnvironment Variables
Set these before running Firebase MCP Server.
VariableDescriptionRequired
FIRESTORE_EMULATOR_HOSTHost and port for the Firestore emulatorYesFIREBASE_PROJECT_IDThe Firebase project IDYesFIREBASE_EMULATOR_HUBHost and port for the Firebase emulator hubYesAvailable Tools (6)
Once configured, Firebase MCP Server gives your AI agent access to:
list_collectionsList top-level Firestore collectionslist_subcollectionsList subcollections of a documentdocumentPathlist_documentsList documents in a collectioncollectionPathget_documentGet a single document by pathdocumentPathquery_collectionQuery with filters, ordering, limitcollectionPathfiltersorderBylimitget_function_logsGet function logs with grep-style filteringpatternlevelfunctionNamelimitsinceTry 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 emulatorFIREBASE_PROJECT_ID— The Firebase project IDFIREBASE_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.