Skip to content

feat: add MCP server packaging checks to /review and /ship#579

Open
kalraakshit042 wants to merge 1 commit into
garrytan:mainfrom
kalraakshit042:feat/mcp-packaging-checks
Open

feat: add MCP server packaging checks to /review and /ship#579
kalraakshit042 wants to merge 1 commit into
garrytan:mainfrom
kalraakshit042:feat/mcp-packaging-checks

Conversation

@kalraakshit042

@kalraakshit042 kalraakshit042 commented Mar 27, 2026

Copy link
Copy Markdown

Summary

Adds MCP server packaging checks to `/review` and a Glama sync reminder to `/ship`, based on failure patterns hit when publishing a Node.js MCP server to Glama. Every pattern here caused a real build failure.

`review/checklist.md` — new "MCP Server Packaging" section (Pass 2, Informational)

  • `package.json` exports pointing to `src/` instead of `dist/` — AUTO-FIX
  • ESM imports missing `.js` extensions under `NodeNext` module resolution — AUTO-FIX
  • `moduleResolution: "bundler"` on a standalone Node.js MCP server — ASK
  • Missing or malformed `glama.json` — AUTO-FIX

`ship/SKILL.md.tmpl` — new Step 8.25 (conditional)

After PR creation, checks for `glama.json` and prints a one-line reminder to hit Sync in the Glama UI. Glama caches Docker layers aggressively and won't pick up new commits automatically.

Evidence

All four issues were found on a real production MCP server (https://github.com/kalraakshit042/ai-compass):

  1. Wrong exports path — `package.json` had `"default": "./src/index.ts"`. Glama's Docker build ran the compiled output and got: `Cannot find module '/app/packages/core/src/recommend'`. Fix: change to `"./dist/index.js"`.

  2. Missing `.js` extensions — `tsconfig.json` used `"moduleResolution": "bundler"` which resolved extensionless imports locally. After switching to `NodeNext` for the Docker build: `Cannot find module '/app/packages/core/dist/recommend'`. Fix: add `.js` to every relative import.

  3. Glama Docker cache — After fixing both above and pushing a new commit, Glama still ran the old build from cached layers. No error message — just silently wrong behavior. Fix: hit the "Sync" button in the Glama UI.

Test plan

  • 601/601 skill validation tests pass (`bun test test/skill-parser.test.ts test/skill-validation.test.ts test/gen-skill-docs.test.ts`)
  • No conflicts with existing checklist categories
  • Rebased cleanly on latest main (GitLab MR support preserved)

🤖 Generated with Claude Code

Adds an "MCP Server Packaging" section to the review checklist
and a Glama sync reminder to the ship workflow, based on failure
patterns encountered when publishing an MCP server to Glama.

review/checklist.md:
- Flag package.json exports pointing to src/ instead of dist/ (AUTO-FIX)
- Flag ESM imports missing .js extensions under NodeNext resolution (AUTO-FIX)
- Flag moduleResolution: "bundler" on standalone Node.js MCP packages (ASK)
- Flag missing or malformed glama.json (AUTO-FIX)

ship/SKILL.md.tmpl (+ regenerated SKILL.md):
- Step 8.25: after PR creation, check for glama.json and remind user
  to hit Sync in the Glama UI — Docker layer cache won't auto-update
@kalraakshit042
kalraakshit042 force-pushed the feat/mcp-packaging-checks branch from 4779b75 to 3e9414c Compare March 27, 2026 17:06
time-attack pushed a commit to time-attack/gstack that referenced this pull request Jul 14, 2026
The garrytan#579 packaging checks prescribed creating glama.json for any new MCP
server, pushing one vendor's registry onto users. The manifest check now
fires only when the project already publishes to a registry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@time-attack

Copy link
Copy Markdown
Contributor

Thanks for this. The change couples generic Node packaging advice to vendor-specific Glama guidance, and the proposed Glama schema requirement is not established. Split the concerns, make Node checks conditional on the actual runtime contract, correct the Glama wording, and add representative schema and build fixtures.

time-attack pushed a commit to time-attack/gstack that referenced this pull request Jul 22, 2026
garrytan#452

Three reviewed bug-fix overlays (MCP-packaging review, office-hours inline
approval doc, host-neutral ## Review calibration), pinned set 22 -> 25 with
executable regression fixtures. garrytan#1241 (compact AUQ preamble) held back: it
drifts 43 baseline-render oracle hashes and needs a separate provenance call.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants