Firebase Live MCP Server

MCP server for querying live Firebase projects - Firestore and Cloud Function logs.

README.md

Firebase Live MCP Server

MCP server for querying live Firebase projects - Firestore and Cloud Function logs.

Setup

npm install
npm run build

Authentication

Uses Application Default Credentials. Run:

gcloud auth application-default login

Project Detection

The server auto-detects the Firebase project from .firebaserc in the current working directory.

Override with env var:

FIREBASE_PROJECT_ID=my-project

Usage with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "firebase-live": {
      "command": "node",
      "args": ["/Users/nigelthorne/code/firebase_live_mcp_server/dist/index.js"],
      "cwd": "/path/to/your/firebase/project",
      "env": {
        "FIREBASE_PROJECT_ID": "optional-override"
      }
    }
  }
}

The cwd should point to a directory with .firebaserc for auto-detection.

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 Cloud Function logs with grep filtering

get_function_logs options

  • pattern - Regex to filter log messages
  • severity - Minimum level: DEBUG/INFO/NOTICE/WARNING/ERROR/CRITICAL
  • functionName - Filter by function name
  • limit - Max entries (default 50)
  • hoursAgo - Fetch logs from last N hours (default 1)

Required Permissions

Your gcloud account needs:

  • roles/datastore.viewer - Firestore read access
  • roles/logging.viewer - Cloud Logging read access

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 Cloud Function logs with grep filtering

Environment Variables

FIREBASE_PROJECT_IDThe Firebase project ID to connect to (overrides auto-detection)

Try it

List all the top-level collections in my Firestore database.
Get the documents from the 'users' collection.
Fetch the last 50 error logs for the 'processPayment' cloud function from the last 2 hours.
Query the 'orders' collection for documents where status is 'pending'.
Show me the subcollections available under the document 'users/user123'.

Frequently Asked Questions

What are the key features of Firebase Live?

Auto-detects Firebase project from .firebaserc. Lists Firestore collections and subcollections. Retrieves individual Firestore documents. Supports complex Firestore queries with filters and limits. Filters and retrieves Cloud Function logs with regex support.

What can I use Firebase Live for?

Debugging production Cloud Function issues by searching logs directly in Claude.. Inspecting Firestore data structures during development without leaving the IDE.. Quickly querying specific user records or order statuses in a live database.. Monitoring application health by filtering logs for specific error patterns..

How do I install Firebase Live?

Install Firebase Live by running: npm install && npm run build

What MCP clients work with Firebase Live?

Firebase Live works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Firebase Live docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare