Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

ยฉ 2026 TrackMCP. All rights reserved.

Built with โค๏ธ by Krishna Goyal

    Firebase Mcp

    ๐Ÿ”ฅ Model Context Protocol (MCP) server for Firebase. TypeScript-based implementation.

    223 stars
    TypeScript
    Updated Nov 2, 2025
    firebase
    modelcontextprotocol

    Table of Contents

    • Overview
    • โšก Quick Start
    • Prerequisites
    • 1. Install MCP Server
    • Configure for npx (recommended)
    • Configure for local installation
    • 2. Test the Installation
    • ๐Ÿ› ๏ธ Setup & Configuration
    • 1. Firebase Configuration
    • 2. Environment Variables
    • Required
    • Optional
    • 3. Client Integration
    • Claude Desktop
    • VS Code / Augment
    • Cursor
    • ๐Ÿ“š API Reference
    • Firestore Tools
    • Storage Tools
    • Authentication Tools
    • ๐Ÿ’ป Developer Guide
    • Installation & Building
    • Running Tests
    • Project Structure
    • ๐ŸŒ HTTP Transport
    • Running with HTTP Transport
    • Client Configuration for HTTP
    • Session Management
    • ๐Ÿ” Troubleshooting
    • Common Issues
    • Storage Bucket Not Found
    • Firebase Initialization Failed
    • Composite Index Required
    • Zod Validation Error with firestore_list_collections
    • Debugging
    • Enable File Logging
    • Real-time Log Viewing
    • Using MCP Inspector
    • ๐Ÿ“‹ Response Formatting
    • Storage Upload Response Example
    • File Successfully Uploaded! ๐Ÿ“
    • ๐Ÿค Contributing
    • ๐Ÿ“„ License
    • ๐Ÿ”— Related Resources

    Table of Contents

    • Overview
    • โšก Quick Start
    • Prerequisites
    • 1. Install MCP Server
    • Configure for npx (recommended)
    • Configure for local installation
    • 2. Test the Installation
    • ๐Ÿ› ๏ธ Setup & Configuration
    • 1. Firebase Configuration
    • 2. Environment Variables
    • Required
    • Optional
    • 3. Client Integration
    • Claude Desktop
    • VS Code / Augment
    • Cursor
    • ๐Ÿ“š API Reference
    • Firestore Tools
    • Storage Tools
    • Authentication Tools
    • ๐Ÿ’ป Developer Guide
    • Installation & Building
    • Running Tests
    • Project Structure
    • ๐ŸŒ HTTP Transport
    • Running with HTTP Transport
    • Client Configuration for HTTP
    • Session Management
    • ๐Ÿ” Troubleshooting
    • Common Issues
    • Storage Bucket Not Found
    • Firebase Initialization Failed
    • Composite Index Required
    • Zod Validation Error with firestore_list_collections
    • Debugging
    • Enable File Logging
    • Real-time Log Viewing
    • Using MCP Inspector
    • ๐Ÿ“‹ Response Formatting
    • Storage Upload Response Example
    • File Successfully Uploaded! ๐Ÿ“
    • ๐Ÿค Contributing
    • ๐Ÿ“„ License
    • ๐Ÿ”— Related Resources

    Documentation

    Firebase MCP

    Project Logo

    Firebase Tests CI

    Overview

    Firebase MCP enables AI assistants to work directly with Firebase services, including:

    • Firestore: Document database operations
    • Storage: File management with robust upload capabilities
    • Authentication: User management and verification

    The server works with MCP client applicatios such as Claude Desktop, Augment Code, VS Code, and Cursor.

    โš ๏ธ Known Issue: The firestore_list_collections tool may return a Zod validation error in the client logs. This is an erroneous validation error in the MCP SDK, as our investigation confirmed no boolean values are present in the response. Despite the error message, the query still works correctly and returns the proper collection data. This is a log-level error that doesn't affect functionality.

    โšก Quick Start

    Prerequisites

    • Firebase project with service account credentials
    • Node.js environment

    1. Install MCP Server

    Add the server configuration to your MCP settings file:

    • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Augment: ~/Library/Application Support/Code/User/settings.json
    • Cursor: [project root]/.cursor/mcp.json

    MCP Servers can be installed manually or at runtime via npx (recommended). How you install determines your configuration:

    Configure for npx (recommended)

    json
    {
         "firebase-mcp": {
           "command": "npx",
           "args": [
             "-y",
             "@gannonh/firebase-mcp"
           ],
           "env": {
             "SERVICE_ACCOUNT_KEY_PATH": "/absolute/path/to/serviceAccountKey.json",
             "FIREBASE_STORAGE_BUCKET": "your-project-id.firebasestorage.app"
           }
         }
       }

    Configure for local installation

    json
    {
         "firebase-mcp": {
           "command": "node",
           "args": [
             "/absolute/path/to/firebase-mcp/dist/index.js"
           ],
           "env": {
             "SERVICE_ACCOUNT_KEY_PATH": "/absolute/path/to/serviceAccountKey.json",
             "FIREBASE_STORAGE_BUCKET": "your-project-id.firebasestorage.app"
           }
         }
       }

    2. Test the Installation

    Ask your AI client: "Please test all Firebase MCP tools."

    ๐Ÿ› ๏ธ Setup & Configuration

    1. Firebase Configuration

    1. Go to Firebase Console โ†’ Project Settings โ†’ Service Accounts

    2. Click "Generate new private key"

    3. Save the JSON file securely

    2. Environment Variables

    Required

    • SERVICE_ACCOUNT_KEY_PATH: Path to your Firebase service account key JSON (required)

    Optional

    • FIREBASE_STORAGE_BUCKET: Bucket name for Firebase Storage (defaults to [projectId].appspot.com)
    • MCP_TRANSPORT: Transport type to use (stdio or http) (defaults to stdio)
    • MCP_HTTP_PORT: Port for HTTP transport (defaults to 3000)
    • MCP_HTTP_HOST: Host for HTTP transport (defaults to localhost)
    • MCP_HTTP_PATH: Path for HTTP transport (defaults to /mcp)
    • DEBUG_LOG_FILE: Enable file logging:
    • Set to true to log to ~/.firebase-mcp/debug.log
    • Set to a file path to log to a custom location

    3. Client Integration

    Claude Desktop

    Edit: ~/Library/Application Support/Claude/claude_desktop_config.json

    VS Code / Augment

    Edit: ~/Library/Application Support/Code/User/settings.json

    Cursor

    Edit: [project root]/.cursor/mcp.json

    ๐Ÿ“š API Reference

    Firestore Tools

    ToolDescriptionRequired Parameters
    firestore_add_documentAdd a document to a collectioncollection, data
    firestore_list_documentsList documents with filteringcollection
    firestore_get_documentGet a specific documentcollection, id
    firestore_update_documentUpdate an existing documentcollection, id, data
    firestore_delete_documentDelete a documentcollection, id
    firestore_list_collectionsList root collectionsNone
    firestore_query_collection_groupQuery across subcollectionscollectionId

    Storage Tools

    ToolDescriptionRequired Parameters
    storage_list_filesList files in a directoryNone (optional: directoryPath)
    storage_get_file_infoGet file metadata and URLfilePath
    storage_uploadUpload file from contentfilePath, content
    storage_upload_from_urlUpload file from URLfilePath, url

    Authentication Tools

    ToolDescriptionRequired Parameters
    auth_get_userGet user by ID or emailidentifier

    ๐Ÿ’ป Developer Guide

    Installation & Building

    bash
    git clone https://github.com/gannonh/firebase-mcp
    cd firebase-mcp
    npm install
    npm run build

    Running Tests

    First, install and start Firebase emulators:

    bash
    npm install -g firebase-tools
    firebase init emulators
    firebase emulators:start

    Then run tests:

    bash
    # Run tests with emulator
    npm run test:emulator
    
    # Run tests with coverage
    npm run test:coverage:emulator

    Project Structure

    bash
    src/
    โ”œโ”€โ”€ index.ts                  # Server entry point
    โ”œโ”€โ”€ utils/                    # Utility functions
    โ””โ”€โ”€ lib/
        โ””โ”€โ”€ firebase/              # Firebase service clients
            โ”œโ”€โ”€ authClient.ts     # Authentication operations
            โ”œโ”€โ”€ firebaseConfig.ts   # Firebase configuration
            โ”œโ”€โ”€ firestoreClient.ts # Firestore operations
            โ””โ”€โ”€ storageClient.ts  # Storage operations

    ๐ŸŒ HTTP Transport

    Firebase MCP now supports HTTP transport in addition to the default stdio transport. This allows you to run the server as a standalone HTTP service that can be accessed by multiple clients.

    Running with HTTP Transport

    To run the server with HTTP transport:

    bash
    # Using environment variables
    MCP_TRANSPORT=http MCP_HTTP_PORT=3000 node dist/index.js
    
    # Or with npx
    MCP_TRANSPORT=http MCP_HTTP_PORT=3000 npx @gannonh/firebase-mcp

    Client Configuration for HTTP

    When using HTTP transport, configure your MCP client to connect to the HTTP endpoint:

    json
    {
      "firebase-mcp": {
        "url": "http://localhost:3000/mcp"
      }
    }

    Session Management

    The HTTP transport supports session management, allowing multiple clients to connect to the same server instance. Each client receives a unique session ID that is used to maintain state between requests.

    ๐Ÿ” Troubleshooting

    Common Issues

    Storage Bucket Not Found

    If you see "The specified bucket does not exist" error:

    1. Verify your bucket name in Firebase Console โ†’ Storage

    2. Set the correct bucket name in FIREBASE_STORAGE_BUCKET environment variable

    Firebase Initialization Failed

    If you see "Firebase is not initialized" error:

    1. Check that your service account key path is correct and absolute

    2. Ensure the service account has proper permissions for Firebase services

    Composite Index Required

    If you receive "This query requires a composite index" error:

    1. Look for the provided URL in the error message

    2. Follow the link to create the required index in Firebase Console

    3. Retry your query after the index is created (may take a few minutes)

    Zod Validation Error with firestore_list_collections

    If you see a Zod validation error with message "Expected object, received boolean" when using the firestore_list_collections tool:

    โš ๏ธ Known Issue: The firestore_list_collections tool may return a Zod validation error in the client logs. This is an erroneous validation error in the MCP SDK, as our investigation confirmed no boolean values are present in the response. Despite the error message, the query still works correctly and returns the proper collection data. This is a log-level error that doesn't affect functionality.

    Debugging

    Enable File Logging

    To help diagnose issues, you can enable file logging:

    bash
    # Log to default location (~/.firebase-mcp/debug.log)
    DEBUG_LOG_FILE=true npx @gannonh/firebase-mcp
    
    # Log to a custom location
    DEBUG_LOG_FILE=/path/to/custom/debug.log npx @gannonh/firebase-mcp

    You can also enable logging in your MCP client configuration:

    json
    {
      "firebase-mcp": {
        "command": "npx",
        "args": ["-y", "@gannonh/firebase-mcp"],
        "env": {
          "SERVICE_ACCOUNT_KEY_PATH": "/path/to/serviceAccountKey.json",
          "FIREBASE_STORAGE_BUCKET": "your-project-id.firebasestorage.app",
          "DEBUG_LOG_FILE": "true"
        }
      }
    }

    Real-time Log Viewing

    To view logs in real-time:

    bash
    # Using tail to follow the log file
    tail -f ~/.firebase-mcp/debug.log
    
    # Using a split terminal to capture stderr
    npm start 2>&1 | tee logs.txt

    Using MCP Inspector

    The MCP Inspector provides interactive debugging:

    bash
    # Install MCP Inspector
    npm install -g @mcp/inspector
    
    # Connect to your MCP server
    mcp-inspector --connect stdio --command "node ./dist/index.js"

    ๐Ÿ“‹ Response Formatting

    Storage Upload Response Example

    json
    {
      "name": "reports/quarterly.pdf",
      "size": "1024000",
      "contentType": "application/pdf",
      "updated": "2025-04-11T15:37:10.290Z",
      "downloadUrl": "https://storage.googleapis.com/bucket/reports/quarterly.pdf?alt=media",
      "bucket": "your-project.appspot.com"
    }

    Displayed to the user as:

    markdown
    ## File Successfully Uploaded! ๐Ÿ“
    
    Your file has been uploaded to Firebase Storage:
    
    **File Details:**
    - **Name:** reports/quarterly.pdf
    - **Size:** 1024000 bytes
    - **Type:** application/pdf
    - **Last Updated:** April 11, 2025 at 15:37:10 UTC
    
    **[Click here to download your file](https://storage.googleapis.com/bucket/reports/quarterly.pdf?alt=media)**

    ๐Ÿค Contributing

    1. Fork the repository

    2. Create a feature branch

    3. Implement changes with tests (80%+ coverage required)

    4. Submit a pull request

    ๐Ÿ“„ License

    MIT License - see LICENSE file for details

    ๐Ÿ”— Related Resources

    • Model Context Protocol Documentation
    • Firebase Documentation
    • Firebase Admin SDK

    Similar MCP

    Based on tags & features

    • MC

      Mcp Open Library

      TypeScriptยท
      42
    • BA

      Bazi Mcp

      TypeScriptยท
      184
    • BI

      Bilibili Mcp Js

      TypeScriptยท
      121
    • BR

      Browser Control Mcp

      TypeScriptยท
      183

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScriptยท
      22.1k
    • SE

      Serena

      Pythonยท
      14.5k
    • MC

      Mcp Playwright

      TypeScriptยท
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScriptยท
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • MC

      Mcp Open Library

      TypeScriptยท
      42
    • BA

      Bazi Mcp

      TypeScriptยท
      184
    • BI

      Bilibili Mcp Js

      TypeScriptยท
      121
    • BR

      Browser Control Mcp

      TypeScriptยท
      183

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScriptยท
      22.1k
    • SE

      Serena

      Pythonยท
      14.5k
    • MC

      Mcp Playwright

      TypeScriptยท
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScriptยท
      3.0k