This document describes the automated release process for the two npm packages shipped from this repo:
@ibm/ibmi-mcp-server— the MCP server binary (ibmi-mcp-server)@ibm/ibmi-cli— theibmicommand-line interface
Both packages always release with the same version on the same v* git tag. The CLI declares an exact-pinned dependency on the server (no caret), so npm will refuse to install a mismatched pair.
The release process is split into three phases to enable manual changelog review and enhancement:
- Prepare: Run prerelease checks, bump the root version, regenerate CHANGELOG, and propagate the version into both packages (WITHOUT committing)
- Review: Manually review and optionally enhance the changelog
- Finalize: Create commit, tag, and push to trigger automation
This workflow uses standard-version for version bumping and changelog generation at the repo root, with a follow-on scripts/sync-workspace-versions.mjs pass that writes the new version into packages/*/package.json and updates the CLI's server dependency pin.
All commands run from the repo root — no cd into subdirectories required.
- Commit Access: You must have push access to the
mainbranch - npm Publishing Rights: Verify you have publish permissions for
@ibm/ibmi-mcp-server(requires access to@ibmorganization) - Release Environment Access: You must be approved for the "Release" environment in GitHub (repository maintainers can configure this)
- Clean Working Directory: Ensure all changes are committed
- Up-to-date main: Pull latest changes from
origin/main
The new release workflow is split into three distinct phases for better control and changelog quality.
From the repo root, run the prepare script:
./scripts/release-prepare.sh [auto|patch|minor|major]What this does:
- ✅ Runs
npm test --workspaces --if-present(must pass for both packages) - ✅ Runs
npm run typecheck --workspaces --if-present(must pass) - 📝 Generates CHANGELOG.md from conventional commits (single changelog at repo root)
- 📝 Bumps version in root
package.json - 📝 Runs
scripts/sync-workspace-versions.mjsto write the new version intopackages/server/package.json,packages/cli/package.json, and update the CLI's exact-pinned dep on@ibm/ibmi-mcp-server - 📝 Refreshes root
package-lock.json ⚠️ Does NOT create commit or tag yet
Version bump options:
auto(default) - Automatically determines version from commitspatch- Patch release (0.1.0 → 0.1.1)minor- Minor release (0.1.0 → 0.2.0)major- Major release (0.1.0 → 1.0.0)
Example:
./scripts/release-prepare.sh minorIf tests or typecheck fail, the script exits without making any changes.
After prepare completes, you have uncommitted changes ready for review:
# View all changes
git diff
# Review the generated changelog
cat CHANGELOG.md
# (Optional) Enhance with Claude
claude "Review and enhance the v0.2.0 changelog for clarity and completeness"
# (Optional) Manually edit if needed
vim CHANGELOG.mdTips for enhancing changelogs:
- Add user-facing descriptions (not just technical commit messages)
- Group related changes together
- Add links to documentation or issues
- Highlight breaking changes clearly
- Remove internal/non-user-facing changes
Take your time in this phase - the changelog is what users see!
When you're satisfied with the changelog and changes:
./scripts/release-finalize.shWhat this does:
- Validates that release files are modified but not committed
- Shows final changelog preview
- Asks for confirmation
- Stages files: root
package.json,package-lock.json,CHANGELOG.md,packages/server/package.json,packages/cli/package.json - Creates commit:
chore(release): X.Y.Z(DCO-signed) - Creates annotated tag:
vX.Y.Z - Pushes commit and tag to
origin/main
This triggers the GitHub Actions workflow which:
- Runs type checking, linting, and tests across both workspaces
- Builds both packages (server first — CLI imports from its
dist/public) - Publishes
@ibm/ibmi-mcp-serverto npm with provenance - Waits for the server version to be visible on the registry (polls up to 30 × 5s)
- Publishes
@ibm/ibmi-clito npm with provenance
If you need to undo at any point before finalizing:
./scripts/release-undo.shThis intelligently handles two scenarios:
Scenario A - Uncommitted changes (after prepare):
- Resets
package.json,package-lock.json,CHANGELOG.mdto HEAD - You can re-run prepare
Scenario B - Committed and tagged (after finalize, before push):
- Deletes the local tag
- Resets to previous commit
- You can start over
You can also use npm scripts instead of calling the shell scripts directly:
# Prepare release
npm run release:prepare # auto version
npm run release:prepare:patch # patch version
npm run release:prepare:minor # minor version
npm run release:prepare:major # major version
# Finalize release
npm run release:finalize
# Undo release
npm run release:undo# Complete release workflow
npm run release:prepare:minor # Prepare with minor version bump
# Review and edit CHANGELOG.md
npm run release:finalize # Commit, tag, and push
# Undo if needed (before finalize)
npm run release:undoAfter the GitHub Actions workflow completes and npm publish succeeds:
- Go to GitHub Releases: https://github.com/IBM/ibmi-mcp-server/releases
- Click "Create a new release" or use the "Draft a new release" button
- Choose the tag you just pushed (e.g.,
v0.2.0) - Write release notes using the CHANGELOG.md as a guide:
- Add a friendly summary of the release
- Organize changes into sections (New Features, Improvements, Bug Fixes)
- Add links to documentation or examples
- Reference relevant issues/PRs
- Publish release when ready
Tip: Use CHANGELOG.md as your starting point, then enhance with:
- User-friendly descriptions (not just commit messages)
- Links to relevant documentation
- Migration guides for breaking changes
- Screenshots or examples where helpful
After publishing the GitHub release:
- Verify npm (both packages):
npm view @ibm/ibmi-mcp-server@X.Y.Z version npm view @ibm/ibmi-cli@X.Y.Z version # Confirm the CLI's server dep is exact-pinned: npm view @ibm/ibmi-cli@X.Y.Z dependencies - Check workflow: https://github.com/IBM/ibmi-mcp-server/actions
- Confirm GitHub release: https://github.com/IBM/ibmi-mcp-server/releases
- Smoke-test the CLI:
npm i -g @ibm/ibmi-cli@X.Y.Z && ibmi --version
For standard-version to work optimally, follow the conventional commit format:
<type>(<scope>): <description>
[optional body]
[optional footer]
| Type | Description | Version Bump |
|---|---|---|
feat |
New feature | Minor (0.1.0 → 0.2.0) |
fix |
Bug fix | Patch (0.1.0 → 0.1.1) |
docs |
Documentation only | None |
style |
Code style (formatting, etc) | None |
refactor |
Code refactoring | None |
perf |
Performance improvement | Patch |
test |
Adding/updating tests | None |
chore |
Maintenance tasks | None |
ci |
CI/CD changes | None |
To trigger a major version bump, add BREAKING CHANGE: in the commit footer:
feat(sql): redesign query execution API
BREAKING CHANGE: The executeSql function now returns a Promise<Result>
instead of Result. Update all callers to use await.
# Feature (minor bump)
git commit -m "feat(auth): add OAuth2 support for IBM i authentication"
# Bug fix (patch bump)
git commit -m "fix(sql): handle null values in query results correctly"
# Multiple fixes
git commit -m "fix(connection): resolve timeout issues
- Increase default timeout to 30s
- Add retry logic for transient failures
- Improve error messages"
# Documentation (no bump)
git commit -m "docs: update API documentation for executeSql"
# Breaking change (major bump)
git commit -m "feat(api)!: redesign tool interface
BREAKING CHANGE: All tools now use async/await instead of callbacks"Use scopes to indicate which part of the codebase changed:
auth: Authentication/authorizationsql: SQL execution and queriesconnection: IBM i connection managementtools: MCP toolsconfig: Configurationapi: Public APIdeps: Dependencies
The auto-generated changelog from conventional commits is a good starting point, but often benefits from human enhancement for clarity and user-friendliness.
Auto-generated changelogs:
- Use raw commit messages (often technical)
- May include internal changes users don't care about
- Lack context and examples
- Don't highlight important changes
Enhanced changelogs:
- Use user-friendly language
- Focus on user-facing changes
- Provide context and migration guides
- Highlight breaking changes clearly
During the review phase, you can use Claude to enhance the changelog:
# After running release-prepare.sh
claude "Review the CHANGELOG.md and enhance it for clarity. Focus on:
- Making descriptions user-friendly
- Highlighting breaking changes
- Adding migration guidance where needed
- Removing internal/non-user-facing changes"Example prompts:
"Enhance this changelog for v0.2.0 with user-friendly descriptions""Review this changelog and suggest improvements for clarity""Rewrite these technical commit messages as user-facing feature descriptions"
When manually editing CHANGELOG.md:
DO:
- ✅ Use clear, non-technical language
- ✅ Group related changes together
- ✅ Add links to issues/PRs for context
- ✅ Highlight breaking changes prominently
- ✅ Include migration guides for breaking changes
- ✅ Add code examples where helpful
DON'T:
- ❌ Remove the version header or date
- ❌ Change the markdown link format
- ❌ Remove important bug fixes
- ❌ Add unreleased changes to this version
Before (Auto-generated):
### Features
* feat(sql): add query timeout parameter (#123)After (Enhanced):
### Features
* **Query Timeouts**: SQL queries now support a timeout parameter to prevent long-running queries from blocking. Set `timeout: 30000` (in ms) in your query options. [#123](https://github.com/IBM/ibmi-mcp-server/pull/123)If npm test fails during the prepare phase:
- The script exits before making any changes
- Fix the failing tests
- Commit the fixes
- Run
release-prepare.shagain
No cleanup needed - nothing was changed.
If npm run typecheck fails during the prepare phase:
- The script exits before making any changes
- Fix the type errors
- Commit the fixes
- Run
release-prepare.shagain
No cleanup needed - nothing was changed.
If you ran release-prepare.sh but want to start over:
./scripts/release-undo.shThis resets package.json, package-lock.json, and CHANGELOG.md to HEAD.
If you ran release-finalize.sh but haven't pushed yet:
./scripts/release-undo.sh # Deletes tag and resets commit
# Make your changes
./scripts/release-prepare.sh [type]
# Review again
./scripts/release-finalize.shIf the GitHub Actions workflow fails after you've pushed:
- Check workflow logs: https://github.com/IBM/ibmi-mcp-server/actions
- Common issues:
- Tests failing: Fix tests and create a patch release
- npm token expired: Update
NPM_TOKENsecret in GitHub Settings - Build errors: Fix build and create a patch release
If you published the wrong version:
-
Delete GitHub release (if you created one):
gh release delete v0.2.0 # Or delete manually in GitHub UI -
Unpublish from npm (within 72 hours only):
npm unpublish @ibm/ibmi-mcp-server@0.2.0
-
Delete git tag:
git tag -d v0.2.0 git push origin :refs/tags/v0.2.0
-
Revert the release commit:
git revert HEAD git push origin main
-
Create correct release
If CHANGELOG.md is empty or missing entries:
- Ensure you're using conventional commit messages
- Check that commits exist since the last tag
- Manually edit CHANGELOG.md if needed
- Commit the changes and create a patch release
If you get permission errors:
- Verify you have write access to the repository
- Check branch protection rules allow tag creation
- Ensure you're on the main branch
To create beta, alpha, or release candidate versions:
# Create pre-release version
standard-version --prerelease alpha
# Creates: 0.2.0-alpha.0
# Subsequent pre-releases
standard-version --prerelease alpha
# Creates: 0.2.0-alpha.1
# Graduate to stable
npm run release
# Creates: 0.2.0Push with git push --follow-tags origin main as usual.
- All tests passing locally:
npm test - Typecheck passes:
npm run typecheck - Code builds successfully:
npm run build - Commits use conventional format
- BREAKING CHANGES documented in commits if applicable
- Main branch is up-to-date:
git pull origin main - No uncommitted changes:
git status
- Review generated
CHANGELOG.md - Enhance changelog with user-friendly descriptions
- Verify breaking changes are highlighted
- Check all version bumps are correct
- Optionally use Claude/AI for enhancement
- Manually edit if needed
- Satisfied with
CHANGELOG.mdcontent - Reviewed all changes:
git diff - Ready to commit and push
- GitHub Actions workflow completed successfully
- Package published to npm
- Version visible with
npm view @ibm/ibmi-mcp-server - GitHub release created manually with polished notes
- Announce release (if applicable)
The initial release (v0.1.0) uses a special command:
# From root directory (recommended)
npm run release:first
# OR from server directory
npm run release:firstThis creates the initial CHANGELOG.md and tags v0.1.0 without requiring commits since a previous release.
GitHub releases are created manually after npm publishing completes. This gives you full control over release note formatting and presentation.
- Wait for npm publish to complete (check GitHub Actions)
- Go to Releases page: https://github.com/IBM/ibmi-mcp-server/releases
- Click "Draft a new release"
- Choose your tag from the dropdown (e.g.,
v0.2.0) - Title your release (e.g., "Version 0.2.0" or "v0.2.0 - OAuth Support")
- Write release notes in the description:
- Start with CHANGELOG.md content as a base
- Enhance with user-friendly descriptions
- Add sections: New Features, Improvements, Bug Fixes
- Include links to docs, PRs, or issues
- Use formatting: bold,
code, bullet points
- Click "Publish release"
Good release notes include:
- Clear summary of what changed
- User-facing feature descriptions (not just commit messages)
- Links to relevant documentation
- Migration guides for breaking changes
- Screenshots or code examples where helpful
- Contributor acknowledgments
Example format:
## New Features 🎉
**OAuth2 Authentication**: Added modern OAuth2 support for secure IBM i connections. Configure your OAuth2 provider in connection settings. See [authentication docs](link).
## Improvements ⚡
**Performance**: Query execution is now 2x faster for large result sets.
## Bug Fixes 🐛
**Connection Timeout**: Fixed intermittent timeout issues when connecting to IBM i systems.
## What's Changed
* feat: add OAuth2 authentication by @ajshedivy in #123
* perf: optimize query execution by @contributor in #124
* fix: resolve connection timeout issue by @ajshedivy in #125
**Full Changelog**: https://github.com/IBM/ibmi-mcp-server/compare/v0.1.0...v0.2.0Important: Do NOT run npm publish manually. Publishing happens automatically via GitHub Actions when you push a release tag.
The workflow (npm run release → git push --follow-tags) triggers GitHub Actions, which:
- Runs all validation (typecheck, lint, test)
- Builds the package
- Publishes to npm automatically
After npm publishing succeeds, you create the GitHub release manually (see "Creating GitHub Releases" section above).
If you absolutely must publish manually (e.g., GitHub Actions is down):
# ONLY from server directory
npm publish
# For scoped packages (@ibm namespace)
npm publish --access public- Automated validation (tests, linting, type checking)
- Version consistency checks
- Audit trail in GitHub Actions
- Release environment approval gates
The workflow uses a GitHub "Release" environment for approval gates before npm publishing.
Repository administrators should configure the "Release" environment:
- Go to Settings → Environments → New environment
- Name it:
Release - Configure protection rules:
- ✅ Required reviewers: Add team members who can approve npm publishes
- ✅ Wait timer: Optional delay before publishing (e.g., 5 minutes)
- ✅ Deployment branches: Limit to
mainbranch only
The Release environment needs:
NPM_TOKEN- npm authentication token with publish permissions for @ibm organization
- Manual approval: Require approval before publishing to npm (even though automated)
- Audit trail: Track who approved each npm publish in GitHub
- Branch protection: Only publish from main branch
- Prevent accidents: Catch mistakes before they reach npm registry
- Conventional Commits: https://www.conventionalcommits.org/
- standard-version: https://github.com/conventional-changelog/standard-version
- Semantic Versioning: https://semver.org/
- npm Provenance: https://docs.npmjs.com/generating-provenance-statements
- GitHub Environments: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
If you encounter issues:
- Check GitHub Actions logs
- Review npm publish logs
- Verify Release environment configuration
- Consult this documentation
- Ask in the team chat or create an issue