Skip to content

[MCP] MCP Server not working with Cursor #8812

Open

Description

@j91mcmurdo

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 (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"\]  
       }  
     }  
   }
  1. 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"  
         \]  
       }  
     }  
   }
  1. Launch Cursor from the macOS Dock or Applications folder.
  2. 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.

Activity

  1. added
    api: mcp
    on Jul 5, 2025
  2. liambolling commented on Jul 7, 2025

    @liambolling

    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.

  3. joehan commented on Jul 8, 2025

    @joehan
    Member

    @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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: mcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions