feat: package repo as Claude Code plugin with portable MCP config (sumit-mcp) - #2
Conversation
…mit-mcp) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59b938a582
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "mcpServers": { | ||
| "sumit": { | ||
| "command": "node", | ||
| "args": ["${CLAUDE_PLUGIN_ROOT}/dist/index.js"], |
There was a problem hiding this comment.
Ship a runnable MCP artifact with the plugin
When this plugin is installed from the marketplace, this command immediately fails with MODULE_NOT_FOUND: dist/index.js is neither committed nor otherwise produced during plugin installation (the repository's .gitignore excludes dist/, and only pnpm build creates it). A fresh plugin checkout therefore cannot start its sole MCP server; commit/build a distributable artifact or invoke a runtime command that installs/builds the server before launching it.
Useful? React with 👍 / 👎.
The skills/ entry is a committed git symlink (kept so existing packaging paths stay untouched). On Windows checkouts with core.symlinks=false it degrades to a text file and the plugin loads no skill — a verified limitation we accept for now (the team is macOS-only) and document for community users instead of restructuring seven repos. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f3744e42a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "mcpServers": { | ||
| "sumit": { | ||
| "command": "node", | ||
| "args": ["${CLAUDE_PLUGIN_ROOT}/dist/index.js"], |
There was a problem hiding this comment.
Bundle the MCP runtime before invoking it
On every fresh plugin installation from this commit, this entry points to a file that is not shipped: dist/ is ignored and absent from the Git archive, while the plugin has no installation hook that runs pnpm install or pnpm build. As a result, node exits because ${CLAUDE_PLUGIN_ROOT}/dist/index.js is missing, so none of the SUMIT tools load; bundle the compiled runtime and its dependencies or invoke an artifact that the plugin installation actually provides.
Useful? React with 👍 / 👎.
… (Codex round-1 P1)
.mcp.json pointed at ${CLAUDE_PLUGIN_ROOT}/dist/index.js, but dist/ was
gitignored and node_modules doesn't exist in a plugin-cache clone — a fresh
plugin install had no runnable server, only source.
Add a `bundle` script (esbuild src/index.ts --bundle --platform=node
--format=esm --outfile=dist/bundle.mjs), pin esbuild as a devDependency,
and commit the built dist/bundle.mjs while keeping the rest of dist/
gitignored. .mcp.json now points at dist/bundle.mjs.
Dropped the --banner:js shebang flag from the bundle command: src/index.ts
already carries its own #!/usr/bin/env node, esbuild hoists that to the top
of the bundle automatically, and adding a banner on top produced a duplicate
shebang line that node's ESM loader rejected as a syntax error. Verified the
final bundle starts standalone (no node_modules, no other files) and blocks
correctly on stdin as an MCP stdio server.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ons)
- .claude-plugin/plugin.json: author is now the studio ("Digitizer"), no
personal email.
- README Windows note: clarify core.symlinks must be set before cloning
(the plugin cache clone inherits it), and that flipping the config alone
doesn't repair an existing checkout with core.symlinks=false already
recorded — re-run `git checkout -- .` or re-clone.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@codex review |
… P2) The repair instruction used `&&` (unsupported in PowerShell 5.1) and a repo-wide `git checkout -- .`, which silently discards uncommitted edits everywhere. Now two separate commands, with the checkout scoped to `skills/` so only the symlink entry is re-materialized and the rest of the working tree is untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41005289c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "SUMIT_ALLOW_CHARGE": "${SUMIT_ALLOW_CHARGE}", | ||
| "SUMIT_MAX_CHARGE": "${SUMIT_MAX_CHARGE}", | ||
| "SUMIT_CONFIRM_SECRET": "${SUMIT_CONFIRM_SECRET}" |
There was a problem hiding this comment.
Provide defaults for optional charge variables
Claude Code's .mcp.json expansion treats ${VAR} without a :-default as required and rejects the MCP configuration when that variable is unset. These three settings are optional in the server itself—charging defaults to disabled, the cap defaults to 5000, and the confirmation secret is required only when executing a charge—so a normal read-only installation that supplies only account credentials cannot register the server. Use defaults such as ${SUMIT_ALLOW_CHARGE:-0} and ${SUMIT_MAX_CHARGE:-5000}, and avoid requiring the secret until charging is enabled.
Useful? React with 👍 / 👎.
|
@codex review |
${VAR} without :-default is treated as required by Claude Code's .mcp.json
expansion, so a read-only install providing only account credentials
could not register the server. Optional vars now carry the server's own
defaults (account=main, charging disabled, cap 5000, empty confirm
secret); company id and API key remain required.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9e482d4dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "build": "tsc -p tsconfig.json", | ||
| "bundle": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/bundle.mjs", |
There was a problem hiding this comment.
Rebuild the plugin bundle during the normal build
The plugin executes the checked-in dist/bundle.mjs, but pnpm build still runs only tsc; the inspected CI workflow likewise runs pnpm build without pnpm bundle (.github/workflows/ci.yml:26). After any future source or dependency change, CI can pass and the plugin can ship the stale pre-change runtime. Make the normal build regenerate the bundle, ideally with CI also verifying that regeneration leaves the worktree clean.
Useful? React with 👍 / 👎.
…odex P2) The scoped checkout fixed skills/ but left .claude/skills/<name> as a plain file on symlink-less checkouts (reproduced by the reviewer), so cloud-session discovery stayed broken after "repair". The command now re-materializes both entries; where .claude/skills/<name> is the real source directory the extra path is a no-op. cloudways also gains set -euo pipefail in the no-leak guard step so a missing perl or grep error fails CI loudly instead of passing silently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28d429f438
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ], | ||
| "scripts": { | ||
| "build": "tsc -p tsconfig.json", | ||
| "bundle": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/bundle.mjs", |
There was a problem hiding this comment.
Regenerate the plugin bundle during CI builds
When source or dependency changes are merged later, the checked .github/workflows/ci.yml runs only pnpm build, while that script remains tsc -p tsconfig.json; it never runs this new bundle command. Because the plugin executes the committed dist/bundle.mjs, CI can pass while plugin users continue running stale code, so the build or CI should regenerate the bundle and verify that it matches the committed artifact.
Useful? React with 👍 / 👎.
| touched): | ||
|
|
||
| git config core.symlinks true | ||
| git checkout -- skills/ .claude/skills/ |
There was a problem hiding this comment.
Avoid overwriting skill sources during symlink repair
On a Windows checkout where the developer has local edits under .claude/skills/, this path-form git checkout restores the whole tracked directory from the index and discards those edits, contradicting the preceding claim that only symlink entries are touched. The repository tree records only skills/sumit-mcp as a symlink; .claude/skills/sumit-mcp is the ordinary source directory, so it should not be included in the repair command.
Useful? React with 👍 / 👎.
…ookbehind (Codex P2s) In this repo .claude/skills/<name> is the REAL skill source, so including it in the repair checkout restored tracked files and silently discarded local edits (reproduced by the reviewer) — the repair now names only the skills/<name> symlink. cloudways also tightens the guard's org-prefix lookbehind to exclude hyphens, so foo-Digitizers/... is no longer stripped as an allowed token (verified: allowed forms still clean, hyphen smuggle now caught). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 414cf42c1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ], | ||
| "scripts": { | ||
| "build": "tsc -p tsconfig.json", | ||
| "bundle": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/bundle.mjs", |
There was a problem hiding this comment.
Regenerate the plugin bundle during normal builds
When src/ changes, the new standalone bundle script is not invoked by pnpm build, and the checked CI workflow (.github/workflows/ci.yml:23-26) only runs pnpm build. Consequently, a source change can pass CI while leaving the committed dist/bundle.mjs stale, even though .mcp.json executes that bundle for every plugin user. Include bundle generation in the normal build or add a CI freshness check.
Useful? React with 👍 / 👎.
…s gate (Codex round-4 P2) pnpm build now chains the esbuild bundle step, and CI fails if a source change leaves the committed dist/bundle.mjs stale (git diff --exit-code right after the build). Bundle rebuilt in this commit to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Packages sumit-mcp as a Claude Code plugin with portable MCP configuration using environment variable placeholders.
Note
.mcp.json ships placeholders only; values live in each machine's env — see references/installation.md
Files Changed
.claude-plugin/plugin.json— plugin metadata.mcp.json— MCP server config with ${VAR} placeholders.claude/settings.json— public settings blockskills/sumit-mcp— symlink to .claude/skills/sumit-mcp