From 31ffb26092656385f971b8a541a42e3a07bee3fc Mon Sep 17 00:00:00 2001 From: ldraney Date: Wed, 28 Jan 2026 11:59:05 -0700 Subject: [PATCH] fix: make .mcpb a thin npx wrapper instead of bundling node_modules The mcpb bundle was 23 MB because it included all of node_modules. Since npm already publishes the package (73 KB), the .mcpb just needs to call `npx @ldraney/github-mcp@latest --preset core`. Changes: - manifest.json: command changed from node to npx - .mcpbignore: exclude everything except manifest.json and README.md - release.yml: publish npm before mcpb pack (wrapper depends on it), remove continue-on-error from npm publish Closes #66 Refs #69 Co-Authored-By: Claude Opus 4.5 --- .github/workflows/release.yml | 12 ++++++------ .mcpbignore | 36 +++-------------------------------- manifest.json | 7 +++---- 3 files changed, 12 insertions(+), 43 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f9cf4d..c69cf76 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,12 @@ jobs: - name: Build run: npm run build + # Publish npm first — the .mcpb wrapper depends on this package existing + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Install mcpb CLI run: npm install -g @anthropic-ai/mcpb @@ -43,9 +49,3 @@ jobs: with: generate_release_notes: true files: github-mcp.mcpb - - - name: Publish to npm - run: npm publish - continue-on-error: true - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.mcpbignore b/.mcpbignore index 820eaca..f816280 100644 --- a/.mcpbignore +++ b/.mcpbignore @@ -1,34 +1,4 @@ -# Backend (separate deployment) -backend/ - -# Development files -src/ -*.ts -!*.d.ts - -# Build artifacts -*.map -*.d.ts - -# Documentation -docs/ -*.md +# Bundle is a thin npx wrapper — exclude everything except manifest.json and README.md +* +!manifest.json !README.md - -# Git -.git/ -.github/ - -# IDE -.vscode/ -.idea/ - -# Claude dev files -.claude/ -poc/ -*.html -.current-issue -.gitignore -tsconfig.json -.mcpbignore -package-lock.json diff --git a/manifest.json b/manifest.json index a0a748c..4da14e7 100644 --- a/manifest.json +++ b/manifest.json @@ -15,13 +15,12 @@ "type": "node", "entry_point": "dist/index.js", "mcp_config": { - "command": "node", + "command": "npx", "args": [ - "${__dirname}/dist/index.js", + "@ldraney/github-mcp@latest", "--preset", "core" - ], - "env": {} + ] } }, "license": "MIT"