Skip to content

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

@zelentsov-dev

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions