Repository navigation
Commit the MCP server lockfile and run its checks in CI - #2395
Open
rmabualhaija wants to merge 1 commit into
Open
rmabualhaija wants to merge 1 commit into
rmabualhaija wants to merge 1 commit into
Conversation
The MCP server installs with npm (its Dockerfile runs `npm ci`), but package-lock.json is gitignored repo-wide, so a fresh clone couldn't build the image and each install resolved dependency versions anew. A fresh install can now pull @firebase/database-compat 2.1.8, which requires Node >= 24; the committed lockfile pins 2.1.7, which every locked package's engines allow on both Node 20 (the current image) and Node 22. Update the auth tests for the `help` field auth.ts now adds to 401 responses, and add an MCP Server job to Repo Checks that type-checks and tests mcp-server on Node 22. The Docker image stays on Node 20 here; moving it to 22 needs its own deploy test, as in the Node 22 upgrade that left this Dockerfile out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks done
rmabualhaija
marked this pull request as ready for review
November 26, 2026 19:14
rmabualhaija
requested review from
Mephistic,
alexjball,
kiminkim724,
mertbagt,
mvictor55,
nesanders,
sashamaryl and
timblais
as code owners
November 26, 2026 19:14
This branch was successfully deployed
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
I decided to do this before starting work on adding features to the MCP server because:
Makes the MCP server buildable from a fresh clone, and checks it in CI.
mcp-server/package-lock.json. The Dockerfile copiespackage-lock.jsonand runsnpm ci, but the repo-wide.gitignoreexcludes everypackage-lock.json, sodocker buildfails on a fresh clone. One.gitignoreexception line lets this one file be committed. The lockfile was generated on Node 22, and every package in it supports Node 20, so the currentnode:20-slimimage keeps working.@firebase/database-compat@2.1.8(released Nov 11, pulled in throughfirebase-admin) requires Node >= 24.12, and Yarn picks it. The lockfile pins 2.1.7, which supports Node >= 20.mcp-server/auth.test.ts.auth.tsnow adds ahelpfield to its 401 responses, and the tests still expected the old response body.npm ci,tsc --noEmitandnpm teston Node 22. The server's tests weren't run in CI before, which is why the failures above went unnoticed.The Docker image stays on Node 20, so this PR doesn't change the deployed server. The Node 22 upgrade in #2231 deliberately left this Dockerfile out because the MCP server deploys separately. Moving it to Node 22 is a follow-up that should get its own dev deploy test.
Tracking issue on my fork: rmabualhaija#1. Happy to open it here if that's preferred.
Checklist
firestore.indexes.json. (No queries.)Screenshots
N/A. Docker build before and after this change:
Known issues
package-lock.jsonis npm's format, while the rest of the repo uses Yarn. I kept npm because the Dockerfile already uses it. Switching the MCP server to Yarn would also mean changing the Dockerfile.0.0.0.0without DNS rebinding protection.Extra Deploy Steps
None. The MCP server is deployed to Cloud Run by hand, and this PR doesn't change its image or runtime. The next manual deploy can build from a clean checkout.
Steps to test/reproduce
cd mcp-server && npm ci && npx tsc --noEmit && npm test. All 37 tests should pass (onmain, 4 fail).docker build -t maple-mcp-test mcp-server. Onmainthis fails with"/package-lock.json": not found.docker run --rm -p 18080:8080 -e FIREBASE_PROJECT_ID=demo-mcp-test -e CURRENT_COURT=194 maple-mcp-test, thencurl localhost:18080/healthshould return 200, and aPOST /mcpwithout a token should return 401 with thehelplink. Neither request contacts Firebase.🤖 Generated with Claude Code