Repository navigation
Add Firebase MCP server (firebase-tools) - #1196
Merged
Merged
Conversation
Package the official Firebase MCP server, which ships as the `firebase mcp` command of the firebase-tools npm package (v15.34.1, MIT, tag v15.34.1 matches the published gitHead e5d39c8). The spec passes `mcp` as the entrypoint argument so the container runs over stdio. A project directory can be mounted and selected by appending `--dir <path>`. Browserless auth uses Application Default Credentials (GOOGLE_APPLICATION_CREDENTIALS), not the deprecated FIREBASE_TOKEN. Closes #1192 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Contributor
🔒 MCP Security Scan Results✅ firebase-tools
Summary: Scanned 1 MCP server(s), all passed security checks. ✅ |
Contributor
🛡️ Grype Vulnerability Scan Results✅ No fixable High or Critical vulnerabilities found.
|
danbarr
enabled auto-merge (squash)
October 28, 2026 15:54
jhrozek
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Packages the official Firebase MCP server, which ships as the
firebase mcpcommand of thefirebase-toolsnpm package, as a pinned Dockyard image. Addsnpx/firebase-tools/spec.yamlpinned to 15.34.1 withargs: ["mcp"]so the entrypoint isnpx firebase-tools mcpover stdio. No changes tocmd/dockhand/orinternal/skills/, so this does not trigger a full-catalog rebuild.Closes #1192
Provenance and license
npm view firebase-tools@15.34.1 licensereturns MIT,package.json:82at tag v15.34.1 says"license": "MIT", and the repoLICENSEis the MIT License (Copyright (c) 2015 Firebase).v15.34.1in firebase/firebase-tools resolves to commite5d39c8a90d77dcbd5550dd6f5adb6194719a8b9, which equals the npmgitHeadof the published 15.34.1 tarball.dockhand verify-provenancereportsStatus: SIGNATURES(npm registry signatures only). The package has no sigstore attestations, so the spec does not declare anattestationsblock.Validation
./build/dockhand verify-provenance -c npx/firebase-tools/spec.yaml -v: pass, SIGNATURES (see above).task build -- npx/firebase-tools: pass, Dockerfile generated withENTRYPOINT ["npx", "firebase-tools", "mcp"], non-rootappuser.task scan -- npx/firebase-tools: pass, "No security issues found in firebase-tools (19 tools scanned)". Caveat: the scanner ran with the yara analyzer only (no LLM key locally), so LLM-analyzer findings are not covered by this local run. Noallowed_issuesentries were needed and none were added. The first two scan attempts timed out on a coldnpxinstall of the large package (60s connect limit in the scanner) and left a partial npx cache; after clearing that one cache entry and warming it, the scan passed. CI could hit the same cold-start timeout.task test-build -- npx/firebase-tools: the Taskfile step failed locally because it callspodmanand no Podman machine was running ("Cannot connect to Podman"). I built the same generatedDockerfile.testwithdocker buildinstead, which succeeded (arm64 host). amd64 was not built locally; multi-arch publishing is left to CI.docker run -i): MCPinitializereturned in about 2.6s withserverInfofirebase0.3.0, andtools/listreturned 19 tools with no project mounted.thv run test-firebase-tools:latest --transport stdio -v <proj>:/workspace:ro -- --dir /workspace(ToolHive v0.56.0, default network isolation on): server reachedrunningandthv mcp list toolsreturned the tool list. The test workload was stopped and removed afterwards.Project directory (
--dir)src/bin/mcp.ts:47documents--dir <path>(project root, defaults to cwd), andsrc/bin/mcp.ts:117resolves it intoprojectRoot. Mounting a directory containingfirebase.jsonand.firebasercand passing--dir /workspacechanged the result:firebase_get_environmentreportedProject Directory: /workspace,Active Project ID: demo-test (alias: default), andtools/listgrew from 19 to 66 tools (auto-detected Firestore, Data Connect, Auth, Functions, Remote Config, Realtime Database and more, persrc/mcp/index.ts:209-226). The image does not set a working directory, so the catalog entry should either pass--diror set the workdir to the mount. Use a read-write mount forfirebase_initandfirebase_deploy(they write or read project files); a read-only mount is fine for read-only use.Browserless authentication
Verified against source at tag v15.34.1:
src/requireAuth.ts:42builds aGoogleAuthclient andsrc/requireAuth.ts:54callsgetAccessToken()with the cloud-platform scope, so credentials resolve through standard Application Default Credentials (thegoogle-auth-librarylookup:GOOGLE_APPLICATION_CREDENTIALS, then the gcloud ADC file, then metadata server). This path is taken when no--token, noFIREBASE_TOKENand no signed-in user exist (src/requireAuth.ts:119-142).FIREBASE_TOKENand--tokenstill work but log a deprecation warning pointing toGOOGLE_APPLICATION_CREDENTIALS(src/requireAuth.ts:119-131). The spec does not use them.getAuthenticatedUserreturns "Application Default Credentials" when requireAuth succeeds with no email (src/mcp/index.ts:311).GoogleAuth.getCredentials()failed with "Could not load the default credentials", andfirebase_list_projectsreturned the "not currently logged in ... configure Application Default Credentials" error. With a mounted (fake, self-generated) service account key at/creds/sa.jsonandGOOGLE_APPLICATION_CREDENTIALS=/creds/sa.json,getCredentials()returned the key'sclient_emailandgetProjectId()returned itsproject_id. This proves the container reads the mounted key and that the library behaves as the source says. It does NOT prove an authenticated call succeeds.firebase_login(interactive OAuth with a pasted auth code) is exposed but is not a browserless path; ADC is the supported container path.appuserhas a writable$HOME(/home/appuser), where the server writes its debug log to~/.cache/firebase/firebase-debug.log(src/bin/mcp.ts:102-104).Tools that need an authenticated project
Taken from the
_metaoftools/listin the built image (19 tools with no project dir; 66 with a Firestore/Hosting project dir).firebase_login,firebase_logout,firebase_get_environment,firebase_update_environment,firebase_init,firebase_read_resources,dataconnect_build,dataconnect_list_services,dataconnect_execute_in_emulator,realtimedatabase_get_data,realtimedatabase_set_data(the last two declare no auth requirement in tool metadata but call the database API with the active credentials in practice, so treat them as needing a project).firebase_get_project,firebase_list_apps,firebase_get_sdk_config,firebase_create_app,firebase_create_android_sha,firebase_get_security_rules,firebase_deploy,firebase_deploy_status,developerknowledge_answer_query, and the project-scoped product tools that appear when a project dir is mounted (Firestore, Auth, Functions, Remote Config, App Hosting, Messaging, Storage, Data Connect).firebase_list_projects,firebase_create_project,developerknowledge_search_documents,developerknowledge_get_documents.src/mcp/tools/**(requiresAuthandrequiresProjectin each tool's_meta).Notes for the follow-up ToolHive catalog entry
ghcr.io/stacklok/dockyard/npx/firebase-tools:15.34.1. Entrypoint already includesmcp; extra args such as--dir /workspace,--only <features>or--tools <names>are appended.GOOGLE_APPLICATION_CREDENTIALS(path inside the container to the mounted service account JSON), optionallyGOOGLE_CLOUD_PROJECTis not required because the project comes from.firebasercorfirebase_update_environment. Do not defaultFIREBASE_TOKEN(deprecated)./workspace, read-write iffirebase_init/firebase_deployare expected), and the credential file read-only (for example/creds/sa.json:ro). User ADC alternative: mount~/.config/gcloud/application_default_credentials.jsonand pointGOOGLE_APPLICATION_CREDENTIALSat it.src/api.tsandsrc/mcp/**, the core set isoauth2.googleapis.com/www.googleapis.com/accounts.google.com,firebase.googleapis.com,cloudresourcemanager.googleapis.com,serviceusage.googleapis.com,cloudbilling.googleapis.com,developerknowledge.googleapis.com, plus per-product hosts as used (firestore,firebaserules,firebasehosting,firebasestorage,cloudfunctions,firebaseremoteconfig,identitytoolkit,fcm,firebasedataconnect,firebaseapphostingundergoogleapis.com) and*.firebaseio.comfor Realtime Database. A permission profile with*.googleapis.com,*.firebaseio.comandaccounts.google.comcovers it. Listing tools worked under ToolHive's default network isolation, but authenticated API calls were not exercised, so the final host list should be confirmed with a real project.npx firebase-tools@latestas a fallback CLI command suggestion (src/mcp/index.ts:74); that is only text for the user, not something the container runs.Open items
🤖 Generated with Claude Code