Firebase

by gannonh

141 stars
4.5k downloads
Not rated
GitHub

About

Enables Firebase Authentication, Firestore, and Storage operations for developers building applications that require seamless backend service integration.

Details

Author
gannonh
Repository
gannonh/firebase-mcp
GitHub stars
141
Downloads
4,514
License
MIT License
Categories
Productivity, Developer Tools, Design, Workplace, File Management, AI, Frontend, API, Security, Cloud Service
Tags
#integration

- Firestore documents: add, list, get, update, delete
- Firestore collections: list root collections and query collection groups
- Storage files: list, get metadata, upload from content or URL
- Authentication: get user by ID or email
- HTTP transport with session management for multiple clients
- Optional file logging for debugging

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Firebase
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @gannonh/firebase-mcp
    Environment
    • FIREBASE_STORAGE_BUCKET your-project-id.firebasestorage.app
    • SERVICE_ACCOUNT_KEY_PATH /absolute/path/to/serviceAccountKey.json

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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:

   {
     "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"
       }
     }
   }
   
   {
     "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"
       }
     }
   }

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

1. Go to Firebase Console → Project Settings → Service Accounts
2. Click "Generate new private key"
3. Save the JSON file securely

firestore_add_document

Add a document to a collection. Parameters: collection (string), data (object)

firestore_list_documents

List documents with filtering. Parameters: collection (string)

firestore_get_document

Get a specific document. Parameters: collection (string), id (string)

firestore_update_document

Update an existing document. Parameters: collection (string), id (string), data (object)

firestore_delete_document

Delete a document. Parameters: collection (string), id (string)

firestore_list_collections

List root collections. Parameters: None

firestore_query_collection_group

Query across subcollections. Parameters: collectionId (string)

storage_list_files

List files in a directory. Parameters: None (optional: directoryPath (string))

storage_get_file_info

Get file metadata and URL. Parameters: filePath (string)

storage_upload

Upload file from content. Parameters: filePath (string), content (string)

storage_upload_from_url

Upload file from URL. Parameters: filePath (string), url (string)

auth_get_user

Get user by ID or email. Parameters: identifier (string)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

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

Macos

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

Windows

{
    "env": {
        "FIREBASE_STORAGE_BUCKET": "your-project-id.firebasestorage.app",
        "SERVICE_ACCOUNT_KEY_PATH": "/absolute/path/to/serviceAccountKey.json"
    },
    "args": [
        "/c",
        "npx",
        "-y",
        "@gannonh/firebase-mcp"
    ],
    "command": "cmd"
}
# Firebase MCP ![Project Logo](./assets/logo.png) <a href="https://glama.ai/mcp/servers/x4i8z2xmrq"> <img width="380" height="200" src="https://glama.ai/mcp/servers/x4i8z2xmrq/badge" alt="Firebase MCP server" /> </a> [![Firebase Tests CI](https://github.com/gannonh/firebase-mcp/actions/workflows/tests.yml/badge.svg)](https://github.com/gannonh/firebase-mcp/actions/workflows/tests.yml) ## 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](https://claude.ai/download), [Augment Code](https://docs.augmentcode.com/setup-augment/mcp), [VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers), and [Cursor](https://www.cursor.com/). > ⚠️ **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](https://console.firebase.google.com) → 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
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.