Firebase MCP Server Setup for Cursor IDE (2026): Firestore, Auth & Deploys from Chat
Set up Google's official Firebase MCP server in Cursor IDE: one npx command, no API keys, and your AI can query Firestore, manage Auth users, and deploy — all using your existing firebase login.
Firebase MCP Server Setup for Cursor IDE (2026)
To set up the Firebase MCP server in Cursor, add a firebase entry to mcp.json that runs npx firebase-tools@latest mcp, then restart Cursor — there's no API key to generate, since the server reuses whatever firebase login session or Application Default Credentials are already active on your machine. Once connected, Cursor can list projects, query Firestore collections, inspect Auth users, and trigger deploys without you switching to the Firebase console.
This is Google's own MCP server, shipped inside firebase-tools (not a community wrapper), which matters for a project setting: it tracks the CLI's release cadence, so firebase-tools@latest stays current automatically instead of depending on a third-party package that may lag behind Firebase's API changes.
What the Firebase MCP Server Actually Gives You
Once connected, Cursor gets access to a large tool surface — Google's docs list 30+ tools spanning:
firebase init, retrieve and validate Security RulesYou don't get all of these by default in every session — the server activates tools relevant to the services your firebase.json project actually uses, plus a --only flag to scope explicitly (e.g., --only firestore,auth).
Prerequisites
firebase login (or a service account with Application Default Credentials configured)npx firebase-tools@latest pulls it on demand, though installing it globally makes startup faster on repeat runsStep 1: Confirm You're Logged Into Firebase
If you haven't already authenticated the CLI on this machine:
npx firebase-tools login
This opens a browser for Google auth. The MCP server reuses this same session — it does not have its own separate credential flow. If you'd rather not do an interactive login (e.g., on a shared or CI-adjacent machine), set up Application Default Credentials instead and the server will pick those up.
Step 2: Add Firebase to Your MCP Config
Open ~/.cursor/mcp.json (or Settings → MCP in Cursor) and add:
{
"mcpServers": {
"firebase": {
"command": "npx",
"args": ["-y", "firebase-tools@latest", "mcp"]
}
}
}
That's the entire config — no env block, no token. If you want to scope the server to a specific project directory (recommended once you have more than one Firebase project on your machine) or limit which feature groups load, extend the args:
{
"mcpServers": {
"firebase": {
"command": "npx",
"args": ["-y", "firebase-tools@latest", "mcp", "--dir", "/absolute/path/to/your/project", "--only", "firestore,auth"]
}
}
}
--dir needs an absolute path to a directory containing a firebase.json — without it, some users report the server starting with no project context and returning "0 tools found." If you hit that, either add --dir explicitly or launch Cursor from a terminal in your project root (cursor .) so it inherits the right working directory and PATH.
Step 3: Restart Cursor and Verify
Quit Cursor fully and reopen it. In chat, try:
List my Firebase projects
If that returns real project IDs, the connection works. Then confirm project-scoped access:
List the collections in my Firestore database
Step 4: Practical Workflows
Query Firestore without the console
Look at the "orders" collection in Firestore and show me 5 documents where status is "pending"
Debug Auth issues
Look up the Firebase Auth user with email test@example.com — is their account disabled or has an unverified email?
Generate and review Security Rules
Write Firestore security rules for a "posts" collection where only the document owner (matched by a userId field) can write, but anyone signed in can read
Use the /firestore:generate_security_rules prompt for a more guided version that also generates matching unit tests.
Check Cloud Functions logs mid-debug
Pull the last 50 log lines from the sendWelcomeEmail function and tell me why it's failing
Ship a change
Deploy the current Firestore rules and Cloud Functions to the "staging" project
The AI runs this through firebase deploy under the hood — review what it's about to deploy before confirming, same as you would with any deploy command someone else typed.
Troubleshooting
"0 tools found" right after connecting
Almost always a missing project context. Add --dir /absolute/path pointing at a folder with firebase.json, or start Cursor from a terminal (cursor .) inside that folder instead of launching it from the dock/Spotlight — the GUI launch path doesn't always inherit your shell's PATH and working directory.
"Not authenticated" or permission errors on every tool call
Run npx firebase-tools login again — sessions expire. If you're using a service account instead, confirm GOOGLE_APPLICATION_CREDENTIALS is set in the environment Cursor launches from, not just your regular terminal shell.
Server works in terminal but not in Cursor
This is a known PATH inheritance quirk — the MCP process Cursor spawns doesn't always see the same PATH as your interactive shell. Launching Cursor via cursor from an already-authenticated terminal window resolves it in most reported cases.
Deploys succeed but changes don't show up
Double-check which Firebase project is active. If you manage multiple projects, an unscoped server defaults to whatever .firebaserc or firebase use currently points at — not necessarily the one you meant.
Frequently Asked Questions
Q: Do I need to generate an API key or service account JSON for this?
A: Not for local development. The server piggybacks on your existing firebase login session, so if the Firebase CLI already works in your terminal, the MCP server inherits that access with zero extra credentials. Service accounts are only needed for headless/CI-style environments without an interactive login.
Q: Can this accidentally deploy to production?
A: Yes, if your active project or --dir target points at a production Firebase project and you approve a deploy prompt without checking. Treat deploy-capable tool calls the same as you'd treat a teammate asking "can I run firebase deploy on prod?" — confirm the target project before agreeing.
Q: Is there a Cursor-specific install, or is this the same server as Claude Desktop uses?
A: Same server. Firebase's MCP server is a generic stdio-based MCP server built into firebase-tools, so the identical npx firebase-tools@latest mcp command works across Cursor, Claude Code, Claude Desktop, Windsurf, Cline, and VS Code Copilot. A Cursor-specific plugin exists in the Cursor Marketplace that automates the config step and adds bundled agent skills, but it's optional.
Q: What's the difference between this and the older "experimental:mcp" command some blog posts mention?
A: experimental:mcp was the command during Firebase's initial preview in mid-2025. The server has since graduated to a stable mcp subcommand (firebase-tools mcp). If you copy a config from an older tutorial, swap experimental:mcp for mcp.
Q: Does it work with the Firebase Local Emulator Suite instead of a live project?
A: The tools primarily target live Firebase projects. For emulator-backed development, you'd still point Firestore/Auth reads at your live project config unless you're separately configuring emulator connection details — check the current firebase-tools release notes, since emulator support in the MCP server is an area that's actively evolving.
Related Guides
---
Related guides
- MySQL MCP Server Setup for Cursor IDE (2026): Query Your Database from Chat
- Netlify MCP Server Setup for Cursor IDE (2026): Deploy & Manage Sites from Chat
- Notion MCP Server Cursor IDE Setup 2026: Query Your Workspace from Composer
- Slack MCP Server Cursor IDE Setup 2026: Send Messages and Read Channels from Composer