diff --git a/.github/firebase-mcp.json b/.github/firebase-mcp.json index 113cc18..267b414 100644 --- a/.github/firebase-mcp.json +++ b/.github/firebase-mcp.json @@ -1,5 +1,4 @@ { - "_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", diff --git a/.github/workflows/crashlytics-autotriage.yml b/.github/workflows/crashlytics-autotriage.yml index a4472a0..beb54b7 100644 --- a/.github/workflows/crashlytics-autotriage.yml +++ b/.github/workflows/crashlytics-autotriage.yml @@ -52,22 +52,25 @@ jobs: # Application Default Credentials. # # Phase 0 (simple): a service-account key JSON stored as the secret GCP_SA_KEY. - # More secure later: swap credentials_json for keyless Workload Identity Federation: - # with: - # workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} - # service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} + # More secure later: swap credentials_json for keyless Workload Identity Federation. - name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 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. + # Install the Firebase CLI up front so the MCP server doesn't cold-download at startup. - name: Pre-install Firebase CLI run: npm install -g firebase-tools@latest + # The Claude CLI's MCP startup timeout defaults to 30s, which the firebase-tools MCP + # server exceeds while booting + authenticating to Google. Raise it (and the per-tool + # timeout for slow Crashlytics API calls). MCP_TIMEOUT propagation via GITHUB_ENV is + # fixed upstream: anthropics/claude-code-action#1152. + - name: Raise MCP startup / tool timeouts + run: | + echo "MCP_TIMEOUT=120000" >> "$GITHUB_ENV" + echo "MCP_TOOL_TIMEOUT=120000" >> "$GITHUB_ENV" + - name: Triage the crash with Claude uses: anthropics/claude-code-action@v1 with: