Back to MCP Catalog

Firebase MCP Server

Cloud PlatformsTypeScript
A Model Context Protocol server for Cloud Platforms

About this MCP

The Firebase MCP Server provides a bridge between LLM clients and Firebase services through the Model Context Protocol (MCP). It allows AI assistants to interact with Firebase Authentication, Firestore database, and Storage services, enabling powerful data management capabilities directly from your LLM client applications.

Documentation

Firebase MCP Server

The Firebase MCP Server enables LLM clients that support the Model Context Protocol (MCP) to interact with Firebase services, including Authentication, Firestore, and Storage.

Supported Clients

This MCP server works with any MCP-compatible client, including:

  • Claude Desktop
  • Cursor
  • Roo Code
  • Cline

Installation

Prerequisites

  1. Firebase Project Setup:

    • Create a Firebase project at Firebase Console
    • Navigate to Project Settings > Service Accounts
    • Generate a new private key (JSON file)
    • Save this file securely on your system
  2. Environment Variables: You'll need to configure:

    • SERVICE_ACCOUNT_KEY_PATH: Path to your Firebase service account key JSON file (required)
    • FIREBASE_STORAGE_BUCKET: Your Firebase Storage bucket name (optional, defaults to [projectId].appspot.com)

Installation Methods

Option 1: Using npx (Recommended)

Add the following configuration to your MCP settings file:

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

Option 2: Manual Installation

  1. Clone the repository:

    git clone https://github.com/gannonh/firebase-mcp
    cd firebase-mcp
    npm install
    npm run build
    
  2. Add the following to your MCP settings file:

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

MCP Settings File Locations

  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Cursor: [project root]/.cursor/mcp.json
  • Roo Code: ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
  • Cline: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Available Tools

Authentication Tools

  • auth_get_user: Get user details by ID or email
    {
      "identifier": "string" // User ID or email address
    }
    

Firestore Tools

  • firestore_add_document: Add a document to a collection

    {
      "collection": "string",
      "data": "object"
    }
    
  • firestore_list_collections: List available collections

    {
      "documentPath": "string", // Optional parent document path
      "limit": "number",        // Default: 20
      "pageToken": "string"     // For pagination
    }
    
  • firestore_list_documents: List documents with optional filtering

    {
      "collection": "string",
      "filters": [
        {
          "field": "string",
          "operator": "string",
          "value": "any"
        }
      ],
      "limit": "number",
      "pageToken": "string"
    }
    
  • firestore_get_document: Get a specific document

    {
      "collection": "string",
      "id": "string"
    }
    
  • firestore_update_document: Update an existing document

    {
      "collection": "string",
      "id": "string",
      "data": "object"
    }
    
  • firestore_delete_document: Delete a document

    {
      "collection": "string",
      "id": "string"
    }
    

Storage Tools

  • storage_list_files: List files in a directory

    {
      "directoryPath": "string", // Optional path, defaults to root
      "pageSize": "number"
    }
    
  • storage_upload_file: Upload a file to storage

    {
      "filePath": "string",
      "fileContent": "string",
      "contentType": "string" // Optional MIME type
    }
    
  • storage_download_file: Download a file from storage

    {
      "filePath": "string"
    }
    
  • storage_delete_file: Delete a file from storage

    {
      "filePath": "string"
    }
    

Testing Your Installation

To verify your installation is working correctly, simply prompt your LLM client with: "Please run through and test all of your Firebase MCP tools."

The client should be able to access and demonstrate the Firebase tools.

Troubleshooting

  • Authentication Errors: Ensure your service account key path is correct and the file contains valid credentials
  • Storage Errors: Verify your Firebase Storage bucket name is correctly configured
  • Permission Issues: Check that your service account has the necessary permissions for the operations you're attempting

Related MCPs

No related MCPs found

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.