You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MCP] firebase-debug.log is created in user's working directory on every MCP server startup #9982
firebase-tools: 15.1.0 (via Claude Code Firebase plugin)
Platform: macOS (Darwin 25.3.0)
[REQUIRED] Test case
Install the Firebase plugin for Claude Code (which runs npx firebase-tools mcp --dir . as an MCP server). Open any project directory and use any Firebase MCP tool.
[REQUIRED] Steps to reproduce
Install the official Firebase plugin for Claude Code
Open a terminal in any project directory (e.g. an iOS project with no Firebase config)
Start a Claude Code session — the Firebase MCP server starts automatically
Invoke any Firebase MCP tool (e.g. firebase_get_environment)
Check the working directory
[REQUIRED] Expected behavior
The MCP server should not create firebase-debug.log in the user's working directory. When running as an MCP server, debug logs should either:
Be written to a well-known location (e.g. ~/.firebase/logs/), or
Be suppressed by default unless explicitly enabled, or
Be configurable via an environment variable (e.g. FIREBASE_DEBUG_LOG_FILE)
[REQUIRED] Actual behavior
A firebase-debug.log file is created in process.cwd() every time the MCP server starts. This pollutes the user's project directory with an unrelated file.
The root cause is in src/logger.ts — findAvailableLogFile() hardcodes the log path to the current working directory:
constlogFilename=path.join(process.cwd(),c);
This behavior makes sense for interactive CLI usage, but is problematic for MCP server mode where the server runs in the background and the user did not explicitly invoke a Firebase command.
Reacted by Mike Hays, nomotohiroki, Natan Rolnik, Guy Tepper, Alexandre Nussbaumer, Yannick Pulver, dario curreri, Mark Pazon and Yağız Ceritoğlu
Activity
fix(mcp): write firebase-debug.log to ~/.firebase/ instead of cwd
Write MCP debug logs to ~/.cache/firebase (#10175)