Skip to content

[MCP] firebase-debug.log is created in user's working directory on every MCP server startup #9982

Closed

Description

@cathandnya

[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

  1. Install the official Firebase plugin for Claude Code
  2. Open a terminal in any project directory (e.g. an iOS project with no Firebase config)
  3. Start a Claude Code session — the Firebase MCP server starts automatically
  4. Invoke any Firebase MCP tool (e.g. firebase_get_environment)
  5. 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.

Activity

  1. added
    api: mcp
    on Feb 26, 2026
  2. added a commit that references this issue on Mar 2, 2026
    2c770de
  3. added a commit that references this issue on Mar 26, 2026
    81cbdec
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: coreapi: mcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions