Skip to content

fix: add repository field to workspace package.json files for npm trusted publishing#1202

Merged
olaservo merged 1 commit intomodelcontextprotocol:mainfrom
cliffhall:fix/repository-url-workspaces
Apr 14, 2026
Merged

fix: add repository field to workspace package.json files for npm trusted publishing#1202
olaservo merged 1 commit intomodelcontextprotocol:mainfrom
cliffhall:fix/repository-url-workspaces

Conversation

@cliffhall
Copy link
Copy Markdown
Member

Summary

  • Follow-up to Update package.json to contain repository.url in for npm trusted publisher setup #1201. The previous fix added repository.url only to the root package.json, but npm publish --workspaces publishes each workspace using its own package.json, and the provenance check runs per-package.
  • The last publish run failed at @modelcontextprotocol/inspector-client with: Failed to validate repository information: package.json: "repository.url" is "", expected to match "https://github.com/modelcontextprotocol/inspector" from provenance.
  • This PR adds a repository block to cli, client, and server workspace package.json files, and adds type: "git" to the root. Workspaces also include directory so npm/GitHub link to the correct subpath in the monorepo.

Test plan

  • Next release publish succeeds under OIDC trusted publishing for all four packages.

🤖 Generated with Claude Code

…publishing

Previous fix only added repository.url to the root package.json, but npm
publish --workspaces publishes each workspace using its own package.json.
The provenance check runs per-package, so each published workspace package
also needs repository.url to match the GitHub repo URL. Also adds type: "git"
to the root and directory fields to the workspaces for correct monorepo
linking on npm/GitHub.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cliffhall cliffhall self-assigned this Apr 14, 2026
@olaservo olaservo merged commit adfcccc into modelcontextprotocol:main Apr 14, 2026
6 checks passed
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.

2 participants