release(mcp): make the MCP server package installable and registry-ready - #95
Merged
Conversation
The server built a local binary but was private and depended on eight private workspace packages, so a published tarball could not install. Bundle those packages into the entrypoint, declare the real runtime dependencies, add public package metadata, a draft MCP Registry entry, and an offline smoke test that starts the packed binary outside the monorepo. Closes #60. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the MCP server installable from npm as
@7shep/universal-mcp, so users can connect an MCP client without cloning the monorepo.directory), homepage, bugs, keywords,engines.node >= 22,bin, explicitfiles,publishConfig.access: public.private: trueremoved. Version starts at0.1.0-alpha.0.scripts/bundle.mjsproduces the published entrypoint with esbuild.test/package.test.mjsis the install smoke test.server.jsondraft for the official MCP Registry underio.github.7shep/*.docs/MCP_RELEASE.mdcovers client configuration, environment variables, tarball contents, versioning, the release steps, and rollback.Why a bundle was necessary
The server depends on eight private
@universal/*workspace packages. Publishing it as-is would produce a tarball that cannot install, because npm would try to resolve those from the registry.bundle.mjsinlines them and keeps only the genuine runtime dependencies external —@modelcontextprotocol/sdk,zod, and the three the runtime build path actually needs (playwright,sharp,fonteditor-core) plustypescript. Those five move from transitive workspace deps to declareddependencies; nothing new was added to the repo's dependency graph, they are just now honest about being runtime requirements.esbuildis the one new devDependency.Two bundled packages read files relative to their own module URL — the runtime's project
template/, and the deterministic provider's.txtsources. The bundle copies each to exactly where the bundled code will look, then asserts it landed there, so a layout change fails the build rather than a user's first run. The script also fails if any import other than a declared dependency is left external.The smoke test is a real one
test/package.test.mjsruns offline and:dist/index.js, the provider assets,template/,server.json,README.md,LICENSE.MD— and nosrc/, noscripts/, no*.test.*, notsconfig.json;@universal/*orworkspace:dependency, is not private, and has license/repository/engines;create_design_planso the bundled internals actually execute.Step 3 is the one that matters: if the bundle reaches for a workspace package or a monorepo source path, the server does not start and the test fails. It links from the local store rather than installing from the registry, so it does not download Playwright or Sharp — what it proves is that nothing outside those five is needed.
Wired into
pnpm --filter @7shep/universal-mcp test, so it runs in the existing CI gate.Publishing stays maintainer-triggered
No workflow publishes, and no npm or registry credential is added to the repository or CI.
docs/MCP_RELEASE.mddocuments the manual steps, the pre-1.0 "no API stability" expectation, why pre-releases must not take thelatesttag, and rollback vianpm dist-tag/npm deprecaterather than unpublish.server.jsonis checked in as a draft. Registry submission additionally needs namespace-ownership proof via the registry CLI, which is deliberately not automated here.Renaming
The workspace package name changes from
@universal/design-mcpto@7shep/universal-mcp(nothing depends on it internally). The 13pnpm --filterreferences across README, CONTRIBUTING, and docs are updated. The directory stayspackages/design-mcp.Also added:
UNIVERSAL_REPOSITORY_ROOTso the containment guard can be set explicitly when installed rather than inferred from a monorepo-relative path, and an eslint block giving**/*.mjsNode globals.Validation
pnpm --filter @7shep/universal-mcp test— 14 server tests + 3 packaging tests, all passingpnpm lint,pnpm typecheck,pnpm format:checkNot done: nothing is published.
@7shep/universal-mcpshould be checked as available (and the scope claimed) before the first release.Closes #60.
🤖 Generated with Claude Code