Prepare the server locally
Run this once before adding it to Claude Code.
npm install
npm run buildRegister 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.
FIRESTORE_EMULATOR_HOSTFIREBASE_PROJECT_IDFIREBASE_EMULATOR_HUBMake 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@latestFree · 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 collectionslist_subcollectionsList subcollections of a documentlist_documentsList documents in a collectionget_documentGet a single document by pathquery_collectionQuery with filters, ordering, limitget_function_logsGet function logs with grep-style filteringEnvironment Variables
FIRESTORE_EMULATOR_HOSTrequiredHost and port for the Firestore emulatorFIREBASE_PROJECT_IDrequiredThe Firebase project IDFIREBASE_EMULATOR_HUBrequiredHost and port for the Firebase emulator hubTry it
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 messageslevel- DEBUG/INFO/WARN/ERRORfunctionName- Filter by function namelimit- Max entries (default 50)since- ISO timestamp cutoff