
How to add Firebase MCP to Cursor
Let AI assistants work directly with Firebase Firestore, Storage, and Authentication. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 245★ · stdio · apikey
Cursor config for Firebase MCP
npx -y @gannonh/firebase-mcp{
"mcpServers": {
"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"
}
}
}
}Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Firebase MCP config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Firebase MCP's tools to confirm it's connected.
Before you start
- Firebase project with service account credentials
- Node.js environment
- FIREBASE_STORAGE_BUCKET (optional; defaults to [projectId].appspot.com)
What Firebase MCP can do in Cursor
firestore_add_documentAdd a document to a collection. Required parameters: collection, data.
firestore_list_documentsList documents with filtering. Required parameter: collection.
firestore_get_documentGet a specific document. Required parameters: collection, id.
firestore_update_documentUpdate an existing document. Required parameters: collection, id, data.
firestore_delete_documentDelete a document. Required parameters: collection, id.
firestore_list_collectionsList root collections. No required parameters.
firestore_query_collection_groupQuery across subcollections. Required parameter: collectionId.
storage_list_filesList files in a directory. No required parameters (optional: directoryPath).
Security
Requires a Firebase service account key JSON file (set via SERVICE_ACCOUNT_KEY_PATH). The service account grants administrative access to your Firebase project via the Admin SDK — store the key securely and grant it only the permissions needed for the Firebase services you intend to use.
Firebase MCP + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Firebase MCP config there under the "mcpServers" key and restart the client.
Is Firebase MCP safe to use with Cursor?
Requires a Firebase service account key JSON file (set via SERVICE_ACCOUNT_KEY_PATH). The service account grants administrative access to your Firebase project via the Admin SDK — store the key securely and grant it only the permissions needed for the Firebase services you intend to use.
How do I install and configure it?
Add the server config to your MCP client settings (e.g. Claude Desktop, Cursor, VS Code/Augment). The recommended approach uses npx: set command to "npx" with args ["-y", "@gannonh/firebase-mcp"] and provide SERVICE_ACCOUNT_KEY_PATH (and optionally FIREBASE_STORAGE_BUCKET) as env vars. You can also run a local build with node pointing at dist/index.js.
What credentials does it need?
A Firebase service account key JSON file. Generate one in Firebase Console → Project Settings → Service Accounts → Generate new private key, then set SERVICE_ACCOUNT_KEY_PATH to its absolute path.
Does it support HTTP transport?
Yes. Set MCP_TRANSPORT=http (with optional MCP_HTTP_PORT, MCP_HTTP_HOST, MCP_HTTP_PATH) to run as a standalone HTTP service. Clients then connect via a url such as http://localhost:3000/mcp. HTTP transport supports session management for multiple concurrent clients.