This guide is specifically designed for AI agents like Cline to install and configure the Firebase MCP server for use with LLM applications like Claude Desktop, Cursor, Roo Code, and Cline.
Before installation, you need:
- A Firebase project with necessary services enabled
- Firebase service account key (JSON file)
- Firebase Storage bucket name
- Go to Firebase Console
- Navigate to Project Settings > Service Accounts
- Click "Generate new private key"
- Save the JSON file securely
- Note your Firebase Storage bucket name (usually
[projectId].appspot.com
or[projectId].firebasestorage.app
)
Add the Firebase MCP server configuration to your MCP settings file based on your LLM client:
- Cline (VS Code Extension):
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- Roo Code (VS Code Extension):
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json
- Cursor:
[project root]/.cursor/mcp.json
Add this configuration to your chosen client's settings file:
{
"firebase-mcp": {
"command": "npx",
"args": [
"-y",
"@gannonh/firebase-mcp"
],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "/path/to/your/serviceAccountKey.json",
"FIREBASE_STORAGE_BUCKET": "your-project-id.firebasestorage.app"
},
"disabled": false,
"autoApprove": []
}
}
Once installed, you'll have access to these Firebase tools:
firestore_add_document
: Add a document to a collectionfirestore_list_collections
: List available collectionsfirestore_list_documents
: List documents with optional filteringfirestore_get_document
: Get a specific documentfirestore_update_document
: Update an existing documentfirestore_delete_document
: Delete a document
auth_get_user
: Get user details by ID or email
storage_list_files
: List files in a directorystorage_get_file_info
: Get file metadata and download URL
To verify the installation is working:
- Restart your LLM application (Cline, Claude Desktop, etc.)
- Test the connection by running a simple command like:
Please list my Firestore collections using the firestore_list_collections tool
-
If you see "Firebase is not initialized":
- Verify your service account key path is correct and absolute
- Check that the JSON file exists and is readable
- Ensure the service account has necessary permissions
-
If you get "The specified bucket does not exist":
- Verify Firebase Storage is enabled in your project
- Check that the bucket name is correct
- Try using the alternative bucket name format
- Ensure the service account has Storage Admin role
-
For JSON parsing errors:
- Make sure your MCP settings file is properly formatted
- Verify all paths use forward slashes, even on Windows
- Check for any missing commas or brackets in the configuration