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.
The Firebase MCP Server enables LLM clients that support the Model Context Protocol (MCP) to interact with Firebase services, including Authentication, Firestore, and Storage.
This MCP server works with any MCP-compatible client, including:
Firebase Project Setup:
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
)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"
}
}
}
Clone the repository:
git clone https://github.com/gannonh/firebase-mcp
cd firebase-mcp
npm install
npm run build
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"
}
}
}
~/Library/Application Support/Claude/claude_desktop_config.json
[project root]/.cursor/mcp.json
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
"identifier": "string" // User ID or email address
}
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_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"
}
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.