firebase.com
firebase.com logo

Firebase

Enables Firebase Authentication, Firestore, and Storage operations for developers building applications that require sea...

Created byApr 22, 2025

Firebase MCP

Project Logo

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.

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)

Configure for local installation

2. Test the Installation

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

Latest Features: Storage Upload (v1.3.3)

Firebase MCP now offers powerful file upload capabilities with two specialized tools:
  • `storage_upload`: Upload files from text, base64 content, or local file paths
  • `storage_upload_from_url`: Import files directly from external URLs

Key Benefits

  • Permanent Public URLs: All uploads generate non-expiring public URLs
  • Content Type Detection: Automatic detection from file extensions and data
  • Multiple Upload Methods: Flexible options for different use cases
  • Rich Response Formatting: Clear, well-structured upload confirmations

Upload Methods

  1. Local File Path (Recommended for all file types)
  1. Base64 Data URL (For smaller files)
  1. Plain Text (For text files)
  1. External URL (Using storage_upload_from_url)
Important: For binary files like images and PDFs, always use the direct file path method for best reliability.

Setup & Configuration

1. Firebase Configuration

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

2. Environment Variables

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

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

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Storage Tools

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Authentication Tools

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Developer Guide

Installation & Building

Running Tests

First, install and start Firebase emulators:
Then run tests:

Project Structure

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
  1. 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
  1. 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
  1. Follow the link to create the required index in Firebase Console
  1. Retry your query after the index is created (may take a few minutes)

Response Formatting

Storage Upload Response Example

Displayed to the user as:

Contributing

  1. Fork the repository
  1. Create a feature branch
  1. Implement changes with tests (80%+ coverage required)
  1. Submit a pull request

License

MIT License - see LICENSE file for details

Related Resources

Firebase MCP

Project Logo

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.

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)

Configure for local installation

2. Test the Installation

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

Latest Features: Storage Upload (v1.3.3)

Firebase MCP now offers powerful file upload capabilities with two specialized tools:
  • `storage_upload`: Upload files from text, base64 content, or local file paths
  • `storage_upload_from_url`: Import files directly from external URLs

Key Benefits

  • Permanent Public URLs: All uploads generate non-expiring public URLs
  • Content Type Detection: Automatic detection from file extensions and data
  • Multiple Upload Methods: Flexible options for different use cases
  • Rich Response Formatting: Clear, well-structured upload confirmations

Upload Methods

  1. Local File Path (Recommended for all file types)
  1. Base64 Data URL (For smaller files)
  1. Plain Text (For text files)
  1. External URL (Using storage_upload_from_url)
Important: For binary files like images and PDFs, always use the direct file path method for best reliability.

Setup & Configuration

1. Firebase Configuration

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

2. Environment Variables

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

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

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Storage Tools

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Authentication Tools

[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]

Developer Guide

Installation & Building

Running Tests

First, install and start Firebase emulators:
Then run tests:

Project Structure

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
  1. 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
  1. 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
  1. Follow the link to create the required index in Firebase Console
  1. Retry your query after the index is created (may take a few minutes)

Response Formatting

Storage Upload Response Example

Displayed to the user as:

Contributing

  1. Fork the repository
  1. Create a feature branch
  1. Implement changes with tests (80%+ coverage required)
  1. Submit a pull request

License

MIT License - see LICENSE file for details

Related Resources