Skip to content

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

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

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

Conversation

@kalraakshit042
Copy link
Copy Markdown

@kalraakshit042 kalraakshit042 commented Mar 27, 2026

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
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.

1 participant