Firebase MCP Server
# Firebase MCP Server
MCP server for inspecting Firebase Emulator Firestore and function logs.
## Setup
```bash
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`:
```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
TDQS
Scored across 9 tools
Most tools have distinct purposes targeting different Firebase services (Auth, Firestore, Functions, Environment). However, 'list_documents' and 'query_collection' could cause some confusion as both operate on collections, though descriptions clarify that one lists while the other filters.
All tools follow a consistent verb_noun pattern (e.g., get_auth_token, list_collections, query_collection). The naming is uniform across all 9 tools with no deviations in style or structure.
With 9 tools, this is well-scoped for a Firebase server covering Auth, Firestore, Functions, and environment management. Each tool appears purposeful and earns its place without feeling excessive or sparse.
The server covers read operations well (get, list, query) but lacks write operations (create, update, delete) for Firestore documents or Auth users, which are core to Firebase workflows. This creates notable gaps that agents may struggle with for full CRUD functionality.