diff --git a/.github/firebase-mcp.json b/.github/firebase-mcp.json index 8859083..113cc18 100644 --- a/.github/firebase-mcp.json +++ b/.github/firebase-mcp.json @@ -1,9 +1,9 @@ { - "_comment": "Firebase MCP server config for the crashlytics-autotriage workflow. `--only crashlytics` activates the (experimental) Crashlytics tool group — it is NOT in the default tool set, so without it the crashlytics_* tools never surface. Requires Application Default Credentials (from google-github-actions/auth) on a service account with roles/firebasecrashlytics.viewer. See docs/PRD-crashlytics-autotriage.md.", + "_comment": "Firebase MCP server config for the crashlytics-autotriage workflow. `--only crashlytics` activates the (experimental) Crashlytics tool group — it is NOT in the default tool set. Uses the firebase-tools pre-installed by the workflow step (no `@latest`, so npx resolves the cached global copy instantly instead of cold-downloading at MCP startup). Requires ADC (from google-github-actions/auth) on a service account with roles/firebasecrashlytics.viewer. See docs/PRD-crashlytics-autotriage.md.", "mcpServers": { "firebase": { "command": "npx", - "args": ["-y", "firebase-tools@latest", "mcp", "--dir", ".", "--project", "openloop-8c266", "--only", "crashlytics"] + "args": ["-y", "firebase-tools", "mcp", "--dir", ".", "--project", "openloop-8c266", "--only", "crashlytics"] } } } diff --git a/.github/workflows/crashlytics-autotriage.yml b/.github/workflows/crashlytics-autotriage.yml index 480f451..a4472a0 100644 --- a/.github/workflows/crashlytics-autotriage.yml +++ b/.github/workflows/crashlytics-autotriage.yml @@ -61,10 +61,20 @@ jobs: with: credentials_json: ${{ secrets.GCP_SA_KEY }} + # Install the Firebase CLI up front so the MCP server (npx firebase-tools mcp) + # starts instantly. Otherwise it cold-downloads the whole package at MCP-startup + # time and exceeds the SDK's connection window — the server then "fails to connect" + # and the crashlytics_* tools never load. + - name: Pre-install Firebase CLI + run: npm install -g firebase-tools@latest + - name: Triage the crash with Claude uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + # Temporary: surfaces the MCP server startup logs so we can diagnose connection + # issues. Remove once the Firebase MCP server connects reliably. + show_full_output: "true" prompt: | You are triaging an automated Crashlytics crash report filed as GitHub issue #${{ github.event.issue.number || github.event.inputs.issue_number }} in stozo04/OpenLoop.