Skip to content

[MCP] Server fails to start: Cannot find module 'googleapis' #9443

Closed

Description

@zelentsov-dev

🐛 Summary

MCP server crashes on startup with the following error:

Error: Cannot find module 'googleapis'
Require stack:
- .../node_modules/firebase-tools/lib/mcp/tools/apptesting/tests.js
- .../node_modules/firebase-tools/lib/mcp/tools/apptesting/index.js
- .../node_modules/firebase-tools/lib/mcp/tools/index.js
- .../node_modules/firebase-tools/lib/mcp/index.js

💡 Bug Information

Item Details
Affected Tool(s) All MCP tools using App Testing functionality
MCP Client Claude Code
Operating System macOS Tahoe (affects all platforms)
firebase-tools version 14.24.1 (latest)
Node.js version 20.x / 22.x

⚙️ Steps to Reproduce

  1. Install Firebase MCP using the official command:

    npx -y firebase-tools@latest mcp
  2. Start the MCP server — it fails immediately with the error above.


🔍 Root Cause

The module googleapis is listed under devDependencies
but it’s used in production MCP code:

lib/mcp/tools/apptesting/tests.js

When installing via npx, dev dependencies are not included, leading to a runtime failure.


✅ Expected Behavior

The MCP server should start successfully with all required dependencies available.


🛠️ Suggested Fix

Move the googleapis package from devDependencies to dependencies in package.json.


🧩 Environment

  • firebase-tools: 14.24.1
  • Node.js: 20.x / 22.x
  • OS: macOS Tahoe (but reproducible cross-platform)

❓ Question

Am I missing something in the setup, or is this a packaging bug?

Activity

  1. added
    api: mcp
    on Nov 8, 2025
  2. jarrettj commented on Nov 9, 2025

    @jarrettj

    +1

  3. superplain99 commented on Nov 9, 2025

    @superplain99

    +1

  4. thaisonzdx commented on Nov 10, 2025

    @thaisonzdx

    I got this also on macOS Sequoia

  5. aalej commented on Nov 10, 2025

    @aalej
    Contributor

    Hey folks, apologies for the issue. I was able to reproduce this. Let me raise this to our engineering so they can take a look. For now, try running npx -y [email protected] mcp as a workaround.

  6. aalej commented on Nov 10, 2025

    @aalej
    Contributor

    it seems like npx -y [email protected] mcp works but npx -y firebase-tools@latest mcp does not. Could anyone give npx -y [email protected] mcp a try?

  7. zelentsov-dev commented on Nov 10, 2025

    @zelentsov-dev
    Author

    Confirmed: [email protected] works without the googleapis error.

    Working version:

    Not working:

    • firebase-tools@latest (14.24.1+) - crashes with "Cannot find module 'googleapis'"

    The issue persists in the latest version, so 14.23.0 is the current stable workaround.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions