Repository navigation
Description
Summary
When attempting to set up the Firebase MCP server (experimental:mcp) in the Cursor editor, two separate issues arise:
-
Incorrect Documentation: The example configuration provided in the official Firebase CLI documentation (using
npx) is not suitable for this use case. It causes the server to start without project context, leading to an immediate "0 tools found" error. -
GUI Launch Path Issue: After correcting the configuration to a working one (by calling
firebasedirectly with a--dirflag), the MCP server still fails to initialise if Cursor is launched as a standard GUI application (e.g., from the Dock on macOS). The tool indicator remains red. The server only starts successfully if Cursor is launched directly from a terminal (cursor), which suggests the process isn't inheriting the shell's PATH environment variable.
Cursor
Version: 1.2.1
VSCode Version: 1.99.3
Date: 2025-07-03T06:06:37.704Z (2 days ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.0.0
mac OS
Chip: Apple M2
macOs: 15.0
firebase-tools
v: 14.9.0
Steps to Reproduce
- Install
firebase-toolsglobally:npm install \-g firebase-tools. - First, attempt to configure
\~/.cursor/mcp.jsonusing the example from the official documentation. This configuration fails to find any tools.
Non-working config (from docs):
{
"mcpServers": {
"firebase": {
"command": "npx",
"args": \["-y", "firebase-tools@latest", "experimental:mcp"\]
}
}
}
- Update
\~/.cursor/mcp.jsonto the configuration that correctly provides project context.
Working config (but only from terminal):
{
"mcpServers": {
"firebase": {
"command": "firebase",
"args": \[
"experimental:mcp",
"--dir",
"/path/to/your/firebase/project"
\]
}
}
}
- Launch Cursor from the macOS Dock or Applications folder.
- Go to
Settings \> Tools. Observe that the light for thefirebasetool is red and it still shows "0 tools found."
Expected behavior
The Firebase MCP server should start successfully using a documented configuration, regardless of how the parent application (Cursor) is launched. It should be able to find globally installed executables and the relevant project context.
Workaround
The current workaround requires two things:
- Using the corrected
mcp.jsonconfiguration with the--dirflag. - Launching the editor from the command line:
cursor
When both conditions are met, the MCP server works as expected.
Activity
liambolling commentedon Jul 7, 2025
It works for me but not on local/emulator. It just writes to production which is useless. I'd never want Cursor to just write to prod.
joehan commentedon Jul 8, 2025
@j91mcmurdo thanks for reporting this. We've been relying on CWD to discover what project is in use, and its proven to be a little unreliable due to the slight differences in where each AI assistant spins up MCP servers. I'll look into how we can improve this behavior, and update our docs to be a bit more helpful here.
@liambolling The storage/firestore tools should already support targetting emualtors via the useEmulator argument https://github.com/firebase/firebase-tools/blob/master/src/mcp/tools/firestore/list_collections.ts#L19). Can you expand a bit more on what behavior you are seeing? Is the LLM not setting that argument to true when you'd expect it to? Is it not working?