Skip to main content
Glama
Firebase Emulator MCP Server

Firebase Emulator MCP Server

Firebase Emulator MCP Server

GitHub

A Model Context Protocol server that exposes Firebase emulator data — Firestore, Auth, Logs, and Realtime Database — to AI agents over stdio.

Designed for local development workflows where AI coding assistants (Claude Code, GitHub Copilot, etc.) need to inspect emulator state without leaving the editor.

Created by Laish Glenberg, please drop a star on the repo if this package helped you!


Features

Tool

Description

emulator_status

Ping all emulators and report reachability

firestore_list_collections

List root-level collection IDs

firestore_query

Query documents with optional field filters (==, >=, <=, in, etc.)

firestore_get

Fetch a single document by path (e.g. Member/abc123)

rtdb_get

Read any path from the Realtime Database emulator

auth_list_users

List Firebase Auth users

auth_get_user

Look up a user by email or localId

emulator_logs

Stream recent log entries from the emulator hub WebSocket


Related MCP server: Firebase MCP Server

Prerequisites

  • Node.js 18+ (native fetch and WebSocket — v21+ recommended)

  • Firebase emulators running locally — start from your project root:

    firebase emulators:start

    The server connects to the default emulator ports:

    • Firestore: 8080

    • Auth: 9099

    • Realtime Database: 9000

    • Hub (logs): 4500


Install & Run

npm install -g firebase-emulator-mcp
firebase-emulator-mcp

VS Code / MCP Client Setup

Add to your project's .vscode/mcp.json or VS Code user settings:

{
  "servers": {
    "firebase-emulator": {
      "type": "stdio",
      "command": "node",
      "args": ["./mcp-server/lib/index.js"],
      "env": {
        "FIREBASE_PROJECT_ID": "<proj_id>",
        "FIREBASE_RTDB_NAMESPACE": "<proj_id>-default-rtdb"
      }
    }
  }
}

Or if installed globally:

{
  "servers": {
    "firebase-emulator": {
      "type": "stdio",
      "command": "firebase-emulator-mcp",
      "env": {
        "FIREBASE_PROJECT_ID": "<proj_id>",
        "FIREBASE_RTDB_NAMESPACE": "<proj_id>-default-rtdb"
      }
    }
  }
}

Optionally can skip install and run directly through npx

{
  "servers": {
    "firebase-emulator": {
      "type": "stdio",
      "command": "npx",
      "args": ["@lglen/firebase-emulator-mcp"],
      "env": {
        "FIREBASE_PROJECT_ID": "<proj_id>",
        "FIREBASE_RTDB_NAMESPACE": "<proj_id>-default-rtdb"
      }
    }
  }
}

For Claude Code or other MCP clients, use the same stdio configuration.


Project structure

mcp-server/
├── src/
│   └── index.ts          # TypeScript source (all tools)
├── lib/                   # Compiled output (git-ignored)
├── test.mjs              # Smoke test runner
├── tsconfig.json
├── package.json
├── .gitignore
├── LICENSE               # MIT
└── README.md

Configuration

Default emulator ports are defined in src/index.ts under the EMULATORS constant. Edit them to match your firebase.json if you use non-standard ports:

Service

Default Port

Firestore

8080

Auth

9099

Realtime DB

9000

Storage

9199

Emulator UI

4000

Hub (logs)

4500


License

MIT

Author

Check me out on GitHub

Available Tools

8 tools
auth_get_userA

Get a single Auth user by email or localId

Inputs: identifier (required).

auth_list_usersB

List users from Auth emulator

Inputs: limit.

emulator_logsB

Stream recent log entries from the Firebase emulator hub WebSocket (ws://127.0.0.1:4500/)

Inputs: lines.

emulator_statusB

Check reachability of all Firebase emulators

Inputs: no named parameters.

firestore_getA

Get a single Firestore document by path (e.g. Member/abc123)

Inputs: path (required).

firestore_list_collectionsA

List root-level collection IDs from Firestore emulator

Inputs: no named parameters.

firestore_queryD

Query documents in a Firestore collection

Inputs: collection (required), limit, whereField, whereValue, +1 more.

rtdb_getA

Read data from Realtime Database emulator at a given path

Inputs: path.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a clear, distinct resource and action: Firestore operations are separate (list collections, query, get document), RTDB has a single get, Auth has list and get, and status/logs are emulator-wide. No two tools overlap in purpose.

    Naming Consistency4/5

    Most tools follow a consistent {service}_{action} pattern (firestore_list_collections, firestore_get, auth_list_users), but emulator_status and emulator_logs deviate to a noun-based pattern. Still predictable and easy to navigate.

    Tool Count5/5

    Eight tools is well-scoped for a Firebase emulator server, covering the core services (Firestore, RTDB, Auth) plus status and logs without unnecessary bloat.

    Completeness2/5

    The tool surface is heavily read-only: Firestore only supports list, query, and get, with no create, update, or delete operations. RTDB and Auth similarly lack write operations, making it impossible to fully manage data in the emulator.

    Related MCP Connectors

    Related MCP Servers