Skip to content

fix: add @cfworker/json-schema as runtime dependency in client package#2144

Closed
sekerderya wants to merge 2 commits into
modelcontextprotocol:mainfrom
sekerderya:fix/client-missing-cfworker-peer-dependency
Closed

fix: add @cfworker/json-schema as runtime dependency in client package#2144
sekerderya wants to merge 2 commits into
modelcontextprotocol:mainfrom
sekerderya:fix/client-missing-cfworker-peer-dependency

Conversation

@sekerderya
Copy link
Copy Markdown

Fixes #2143

Problem

@modelcontextprotocol/client imports @cfworker/json-schema at runtime
(via src/validators/cfWorker.ts) but does not declare it as a dependency.
This causes ERR_MODULE_NOT_FOUND for users who install the package, since
npm/pnpm does not automatically install undeclared dependencies.

Manually installing @cfworker/json-schema works around the issue, but
users should not need to do this.

Fix

Added @cfworker/json-schema to the dependencies field in
packages/client/package.json.

@sekerderya sekerderya requested a review from a team as a code owner May 22, 2026 10:36
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

🦋 Changeset detected

Latest commit: 0de4e60

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@modelcontextprotocol/client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sekerderya
Copy link
Copy Markdown
Author

Verified that current main no longer reproduces the issue — importing @modelcontextprotocol/client after a fresh build succeeds without installing @cfworker/json-schema separately. Closing in favor of a new alpha publish.

@sekerderya sekerderya closed this May 23, 2026
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.

@modelcontextprotocol/client 2.0.0-alpha.2 is missing peer dependency declaration for @cfworker/json-schema

1 participant