Skip to content

@genclass/mcp: the plugin's repository vendors the released server; the lockfile is gone - #127

Merged
Karanvir1729 merged 2 commits into
mainfrom
mcp/plugin-vendored-server
Oct 28, 2026
Merged

Karanvir1729 merged 2 commits into
mainfrom
mcp/plugin-vendored-server

Conversation

@Karanvir1729

Copy link
Copy Markdown
Collaborator

Anthropic's directory holds the plugin for a reviewer on two grounds: the npx launcher ("Runs a pinned npx or uvx package") and, since the lockfile landed (68507fa), "Dependencies install from a lockfile". Its hold text names the way out: the package's built files inside the plugin, each under 256 KiB, run from ${CLAUDE_PLUGIN_ROOT}, with no package.json or lockfile. This makes genclass-dev/genclass-plugin exactly that.

What changes

  • packages/mcp/scripts/plugin-repo.mjs fetches the released @genclass/mcp at package.json's version from npm (npm install --ignore-scripts into a temporary prefix, so the registry's integrity check applies; --server <package dir> takes a local build instead) and writes server/cli.mjs (the package's dist/cli.js, byte for byte) and server/genclass-mcp.mjs (its bin/genclass-mcp.mjs importing that file). In the assembled repository .mcp.json runs node ${CLAUDE_PLUGIN_ROOT}/server/genclass-mcp.mjs and the hook node "${CLAUDE_PLUGIN_ROOT}/server/genclass-mcp.mjs" hook; nothing else in those two files changes, and every other file stays byte-identical to packages/mcp/plugin/.
  • plugin/package.json and plugin/package-lock.json are removed, with their pins in test/manifests.test.ts.
  • The plugin folder in GenClass-lib keeps the npx launchers (nothing built is committed here; the marketplace in GenClass-lib still lists it). The Agent Plugins mcp.json keeps npx everywhere: that format has no plugin-root variable (Codex's docs give ${PLUGIN_ROOT} for hooks only, and set CLAUDE_PLUGIN_ROOT as an environment variable for compatibility), and Codex and Cursor read it.
  • Between a version bump and its release the script exits 3 (npm does not serve the version yet); the generated sync.yml treats that as nothing to do, so the repository stays at the previous release until the first sync after the publish.
  • test/manifests.test.ts: the assembled tree is the plugin folder byte for byte except the two launchers; the launchers are exactly the vendored form; the server is byte-identical to the source package; --version prints package.json's version; no package.json, lockfile or node_modules, every file under 256 KiB; the mcp.json launcher is still the pinned npx one; the workflow carries the exit-3 handling; and the default fetch path works against npm (lenient when npm is unreachable or the version is unpublished).
  • Docs: the plugin README (what the directory shows), CHANGELOG.md (the unreleased lockfile entry becomes this one), docs/adoption/listings/mcp.md section 3, one phrase in AGENTS.md.

Checked locally (Node 22, Claude Code 2.1.311): npm run typecheck -w @genclass/mcp, npm run build -w @genclass/mcp, npx vitest run in packages/mcp (153 tests), claude plugin validate --profile directory on the assembled folder and on packages/mcp/plugin (nothing to report), the vendored server answering --version and an MCP initialize over stdio from the assembled folder, the hook exiting 0 silently without a bridge, and the unpublished path (ETARGET → exit 3).

Not checked here: the directory's reading of the vendored version, which needs the sync to push it, and the Chromium e2e (CI's job runs it).

After the merge: the plugin repository's .github/workflows/sync.yml is excluded from the sync (the default token cannot change workflow files), so the new workflow text is pushed there by a person once, then the sync is run.

Stacked on #126 (the listings record), so its commit shows here until that one merges.

🤖 Generated with Claude Code

Karanvir1729 and others added 2 commits October 28, 2026 14:51
…tion (listings/mcp.md section 3)

What the portal said on 2026-10-28: the first validation at e911b25 (7 passed, 4 warnings, 2 holds), the
listing and data-handling answers, the push webhook, the scan and review state; then the lockfile commit
68507fa, found by the scheduled check, validated with "Launcher locked" and held on a second reason,
"Dependencies install from a lockfile", which a reviewer clears.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…he lockfile is gone

scripts/plugin-repo.mjs fetches @genclass/mcp at package.json's version from npm (npm install --ignore-scripts
into a temporary prefix; --server <package dir> takes a local build) and writes it as server/cli.mjs with the
package's bin next to it; the assembled .mcp.json and hook run node ${CLAUDE_PLUGIN_ROOT}/server/genclass-mcp.mjs.
plugin/package.json and plugin/package-lock.json are removed: Anthropic's directory held the lockfile install for
review next to the npx launcher hold, and its hold text names built files inside the plugin, run from the plugin
root with no lockfile, as the way out. The plugin folder in GenClass-lib and the Agent Plugins mcp.json keep npx
(nothing built is committed here; that format has no plugin-root variable). The sync workflow treats the script's
exit code 3 (the version is not on npm yet) as nothing to do. manifests.test.ts checks the assembled tree against
the plugin folder, the vendored server byte for byte, the absence of package.json, lockfile and node_modules, and
runs the vendored server.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Karanvir1729
Karanvir1729 merged commit 9a5170c into main Oct 28, 2026
5 checks passed
@MeharPro
MeharPro deleted the mcp/plugin-vendored-server branch October 28, 2026 19:49
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