firebase / firebase/firebase-tools

[MCP] MCP Server not working with Cursor

Open
#8,812 2 comments 0 reactions 0 assignees View on GitHub
api: mcp
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

## Summary

When attempting to set up the Firebase MCP server (experimental:mcp) in the Cursor editor, two separate issues arise:

1. Incorrect Documentation: The example configuration provided in the [official Firebase CLI documentation](https://firebase.google.com/docs/cli/mcp-server) (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.

2. GUI Launch Path Issue: After correcting the configuration to a working one (by calling `firebase` directly with a `--dir` flag), 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

1. Install `firebase-tools` globally: `npm install \-g firebase-tools. `
2. First, attempt to configure `\~/.cursor/mcp.json` using 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"\]
}
}
}
```

3. Update` \~/.cursor/mcp.json` to 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"
\]
}
}
}
```

4. Launch Cursor from the macOS Dock or Applications folder.
5. Go to `Settings \> Tools`. Observe that the light for the `firebase` tool 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:

1. Using the corrected `mcp.json` configuration with the `--dir` flag.
2. Launching the editor from the command line:
`cursor`

When both conditions are met, the MCP server works as expected.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two configurations in ~/.cursor/mcp.json: the documented npx command and the firebase experimental:mcp command with --dir. Compare behavior when Cursor is launched from the terminal versus the macOS GUI, then trace the experimental:mcp entry point and its process environment. Done means a documented configuration supplies project context and starts successfully from either launch method.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, developer-experience, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.