This monorepo uses Changesets for coordinated version management and automatic changelog generation across all packages.
The following packages are published to npm:
- mcp-use - Main library for MCP integration
- @mcp-use/cli - CLI tool for building MCP widgets
- @mcp-use/inspector - MCP Inspector UI
- create-mcp-use-app - Project scaffolding tool
When you make changes that should be published:
# After making your changes, create a changeset
pnpm changesetThis will:
- Ask which packages were affected
- Ask whether it's a major, minor, or patch change
- Ask you to write a summary of the changes
The changeset file will be created in .changeset/ directory.
Follow Semantic Versioning:
- Major (x.0.0) - Breaking changes
- Minor (0.x.0) - New features (backward compatible)
- Patch (0.0.x) - Bug fixes (backward compatible)
# Interactive mode (recommended)
pnpm changeset
# Example prompts:
# ? Which packages would you like to include?
# ✔ mcp-use
# ✔ @mcp-use/cli
#
# ? What kind of change is this for mcp-use?
# ○ major (breaking)
# ● minor (feature)
# ○ patch (fix)
#
# ? Please enter a summary for this change:
# Added support for custom headers in HTTP connectionsWhen you're ready to release:
# Consume all changesets and update package versions
pnpm version
# This will:
# - Update version numbers in package.json files
# - Update CHANGELOG.md files
# - Delete consumed changeset files
# - Update pnpm-lock.yaml# Build and publish all updated packages
pnpm release
# This will:
# - Build all packages
# - Publish updated packages to npm
# - Create git tags# 1. Make your changes
git checkout -b feat/my-new-feature
# 2. Create a changeset
pnpm changeset
# 3. Commit the changeset
git add .changeset
git commit -m "feat: add my new feature"
# 4. Push and create PR
git push origin feat/my-new-feature
# 5. After PR is merged to main, on main branch:
git checkout main
git pull
# 6. Version packages
pnpm version
# 7. Commit version changes
git add .
git commit -m "chore: version packages"
git push
# 8. Publish to npm
pnpm releasepnpm changeset---
"mcp-use": minor
---
Added support for WebSocket reconnection with exponential backoff
pnpm changeset---
"@mcp-use/cli": patch
---
Fixed TypeScript compilation errors in widget builder
pnpm changeset---
"mcp-use": major
---
BREAKING: Changed `createMCPServer` API to require explicit configuration object
pnpm changeset---
"mcp-use": minor
"@mcp-use/cli": patch
"@mcp-use/inspector": patch
---
- Added new React hooks for MCP connections
- Fixed CLI build output paths
- Updated inspector UI dependencies
| Command | Description |
|---|---|
pnpm changeset |
Create a new changeset (interactive) |
pnpm version |
Apply changesets and update versions |
pnpm release |
Build and publish packages to npm |
pnpm version:check |
Check which packages have changesets |
If you want packages to always be versioned together:
{
"linked": [
["mcp-use", "@mcp-use/cli"]
]
}If you want packages to always have the same version:
{
"fixed": [
["@mcp-use/*"]
]
}Packages already ignored (in .changeset/config.json):
test-ui(test application, not published)
Create .github/workflows/release.yml:
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10.6.1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}- Create changesets with your PRs - Add a changeset file with every PR that changes package behavior
- Be descriptive - Write clear, user-focused changeset summaries
- Version appropriately - Follow semver strictly to avoid breaking users
- Batch releases - Accumulate multiple changesets before versioning
- Review CHANGELOGs - Check generated changelogs before publishing
If you run pnpm version and see this message, you need to create changesets first:
pnpm changesetMake sure all packages are in the workspace config (pnpm-workspace.yaml):
packages:
- 'packages/*'
- 'test_app'Ensure package has publishConfig.access set to "public" in its package.json.
After running pnpm version, your CHANGELOG.md files will look like:
# mcp-use
## 0.3.0
### Minor Changes
- abc1234: Added support for WebSocket reconnection with exponential backoff
### Patch Changes
- def5678: Fixed memory leak in session cleanup
## 0.2.0
### Minor Changes
- ghi9012: Added React hooks for MCP connectionsWhen updating internal dependencies (workspace packages), Changesets will automatically:
- Update version ranges in dependent packages
- Create appropriate changeset entries
- Maintain workspace protocol (
workspace:*) in development
Example: If you update mcp-use with a minor change, and @mcp-use/cli depends on it, @mcp-use/cli will get a patch version bump (configured by updateInternalDependencies: "patch").