-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
[REQUIRED] Environment info
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:
const logFilename = 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.