|
| 1 | +# Firebase MCP Server |
| 2 | + |
| 3 | +[](../../LICENSE) |
| 4 | +[](https://cursor.com/en/install-mcp?name=firebase&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImZpcmViYXNlLXRvb2xzQGxhdGVzdCIsIm1jcCJdfQ==) |
| 5 | + |
| 6 | +The Firebase Model Context Protocol (MCP) Server gives AI-powered development tools the ability to work with your Firebase projects and your app's codebase. The Firebase MCP server works with any tool that can act as an MCP client, including: [Firebase Studio](https://firebase.google.com/studio), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Claude Code](https://www.claude.com/product/claude-code), [Cline](https://github.com/cline/cline), [Cursor](https://www.cursor.com/), VS Code Copilot, [Windsurf](https://codeium.com/windsurf), and more! |
| 7 | + |
| 8 | +## Features |
| 9 | + |
| 10 | +An editor configured to use the Firebase MCP server can use its AI capabilities to help you: |
| 11 | + |
| 12 | +- **Create and manage Firebase projects** - Initialize new projects, list existing ones, and manage Firebase apps |
| 13 | +- **Manage Firebase Authentication users** - Retrieve, update, and manage user accounts |
| 14 | +- **Work with Cloud Firestore and Firebase Data Connect** - Query, read, write, and manage database documents |
| 15 | +- **Retrieve Firebase Data Connect schemas** - Generate schemas and operations with AI assistance |
| 16 | +- **Understand security rules** - Validate and retrieve security rules for Firestore, Cloud Storage, and Realtime Database |
| 17 | +- **Send messages with Firebase Cloud Messaging** - Send push notifications to devices and topics |
| 18 | +- **Access Crashlytics data** - Debug issues, view crash reports, and manage crash analytics |
| 19 | +- **Deploy to App Hosting** - Monitor backends and retrieve logs |
| 20 | +- **Work with Realtime Database** - Read and write data in real-time |
| 21 | +- **Query Cloud Functions logs** - Retrieve and analyze function execution logs |
| 22 | +- **Manage Remote Config** - Get and update remote configuration templates |
| 23 | + |
| 24 | +Some tools use [Gemini in Firebase](https://firebase.google.com/docs/ai-assistance) to help you: |
| 25 | + |
| 26 | +- Generate Firebase Data Connect schema and operations |
| 27 | +- Consult Gemini about Firebase products |
| 28 | + |
| 29 | +> **Important:** Gemini in Firebase can generate output that seems plausible but is factually incorrect. It may respond with inaccurate information that doesn't represent Google's views. Validate all output from Gemini before you use it and don't use untested generated code in production. Don't enter personally-identifiable information (PII) or user data into the chat. |
| 30 | +> Learn more about [Gemini in Firebase and how it uses your data](https://firebase.google.com/docs/ai-assistance). |
| 31 | +
|
| 32 | +## Installation and Setup |
| 33 | + |
| 34 | +### Prerequisites |
| 35 | + |
| 36 | +Make sure you have a working installation of [Node.js](http://nodejs.org/) and [npm](https://npmjs.org/). |
| 37 | + |
| 38 | +### Basic Configuration |
| 39 | + |
| 40 | +The Firebase MCP server can work with any MCP client that supports standard I/O (stdio) as the transport medium. When the Firebase MCP server makes tool calls, it uses the same user credentials that authorize the Firebase CLI in the environment where it's running. |
| 41 | + |
| 42 | +Here are configuration instructions for popular AI-assistive tools: |
| 43 | + |
| 44 | +#### Gemini CLI |
| 45 | + |
| 46 | +Install the [Firebase extension for Gemini CLI](https://github.com/gemini-cli-extensions/firebase/): |
| 47 | + |
| 48 | +```bash |
| 49 | +gemini extensions install https://github.com/gemini-cli-extensions/firebase/ |
| 50 | +``` |
| 51 | + |
| 52 | +#### Claude Code |
| 53 | + |
| 54 | +To configure Claude Code to use the Firebase MCP server, run the following command under your app folder: |
| 55 | + |
| 56 | +```bash |
| 57 | +claude mcp add firebase npx -- -y firebase-tools@latest mcp |
| 58 | +``` |
| 59 | + |
| 60 | +You can verify the installation by running: |
| 61 | + |
| 62 | +```bash |
| 63 | +claude mcp list |
| 64 | +``` |
| 65 | + |
| 66 | +It should show: |
| 67 | + |
| 68 | +``` |
| 69 | +firebase: npx -y firebase-tools@latest mcp - ✓ Connected |
| 70 | +``` |
| 71 | + |
| 72 | +#### Cursor |
| 73 | + |
| 74 | +Add to `.cursorrules` in your project directory or configure in Cursor settings: |
| 75 | + |
| 76 | +```json |
| 77 | +{ |
| 78 | + "mcpServers": { |
| 79 | + "firebase": { |
| 80 | + "command": "npx", |
| 81 | + "args": ["-y", "firebase-tools@latest", "mcp"] |
| 82 | + } |
| 83 | + } |
| 84 | +} |
| 85 | +``` |
| 86 | + |
| 87 | +#### Windsurf |
| 88 | + |
| 89 | +Add to `~/.codeium/windsurf/mcp_config.json`: |
| 90 | + |
| 91 | +```json |
| 92 | +{ |
| 93 | + "mcpServers": { |
| 94 | + "firebase": { |
| 95 | + "command": "npx", |
| 96 | + "args": ["-y", "firebase-tools@latest", "mcp"] |
| 97 | + } |
| 98 | + } |
| 99 | +} |
| 100 | +``` |
| 101 | + |
| 102 | +#### Firebase Studio |
| 103 | + |
| 104 | +To configure Firebase Studio to use the Firebase MCP server, edit or create the configuration file: `.idx/mcp.json` |
| 105 | + |
| 106 | +```json |
| 107 | +{ |
| 108 | + "mcpServers": { |
| 109 | + "firebase": { |
| 110 | + "command": "npx", |
| 111 | + "args": ["-y", "firebase-tools@latest", "mcp"] |
| 112 | + } |
| 113 | + } |
| 114 | +} |
| 115 | +``` |
| 116 | + |
| 117 | +## Usage |
| 118 | + |
| 119 | +Once configured, the MCP server will automatically provide Firebase capabilities to your AI assistant. You can: |
| 120 | + |
| 121 | +- Ask the AI to help set up Firebase services |
| 122 | +- Query your Firestore database |
| 123 | +- Manage authentication users |
| 124 | +- Deploy to Firebase Hosting |
| 125 | +- Debug Crashlytics issues |
| 126 | +- And much more! |
| 127 | + |
| 128 | +For a complete list of available tools and resources, see the [Server Capabilities](#server-capabilities) section below. |
| 129 | + |
| 130 | +## Documentation |
| 131 | + |
| 132 | +For more information, visit the [official Firebase MCP server documentation](https://firebase.google.com/docs/ai-assistance/mcp-server). |
| 133 | + |
| 134 | +## Server Capabilities |
| 135 | + |
| 136 | +The Firebase MCP server provides three types of capabilities: **Tools** (functions that perform actions), **Prompts** (reusable command templates), and **Resources** (documentation files for AI models). |
| 137 | + |
1 | 138 | | Tool Name | Feature Group | Description | |
2 | 139 | | ------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
3 | 140 | | firebase_login | core | Use this to sign the user into the Firebase CLI and Firebase MCP server. This requires a Google Account, and sign in is required to create and work with Firebase Projects. | |
|
0 commit comments