This guide covers how to publish the YNAB MCP Server to various distribution channels.
Before publishing, ensure:
- All tests pass:
npm test - Build succeeds:
npm run build - Version is updated in
package.json - CHANGELOG is updated (if applicable)
- README is up to date
- You have necessary access rights to publish
-
Create an npm account (if you don't have one):
npm adduser
-
Login to npm:
npm login
Since the original ynab-mcp-server package is owned by calebl, you have two options:
This allows you to publish without conflicts:
-
Update
package.jsonname to:{ "name": "@issmirnov/ynab-mcp-server" } -
Publish:
npm publish --access public
Contact the original author to request package transfer or publishing rights.
Change the package name to something unique:
{
"name": "ynab-mcp-server-enhanced"
}-
Clean build:
npm run build
-
Test the package locally:
npm pack # This creates a .tgz file you can test with: npm install -g ./ynab-mcp-server-0.1.3.tgz -
Dry run (see what will be published):
npm publish --dry-run
-
Publish:
# For unscoped packages (requires ownership): npm publish # For scoped packages: npm publish --access public
-
Verify publication:
npm view ynab-mcp-server # or your package name
Follow semantic versioning (semver):
- Patch (0.1.3 → 0.1.4): Bug fixes
- Minor (0.1.3 → 0.2.0): New features (backward compatible)
- Major (0.1.3 → 1.0.0): Breaking changes
Update version:
npm version patch # or minor, or major
npm publishSmithery automatically indexes packages from npm, GitHub, and other sources.
- Package must be published to npm first
smithery.jsonfile must be present in the repository (✓ already created)
-
Visit Smithery: https://smithery.ai/submit
-
Submit your package:
- Package name:
ynab-mcp-server(or your chosen name) - Repository:
https://github.com/issmirnov/ynab-mcp-server - Description: Auto-filled from package.json
- Package name:
-
Verify listing: Your package should appear at
https://smithery.ai/server/ynab-mcp-server
Once published to npm, Smithery may automatically discover your package if it:
- Has
mcpin keywords - Has a valid
smithery.jsonfile - Follows MCP conventions
Docker images are published via GitHub Actions to GitHub Container Registry (GHCR).
Images are automatically built and published to:
ghcr.io/issmirnov/ynab-mcp-server:latest
ghcr.io/issmirnov/ynab-mcp-server:v0.1.3
-
Build the image:
docker build -t ghcr.io/issmirnov/ynab-mcp-server:latest . docker build -t ghcr.io/issmirnov/ynab-mcp-server:v0.1.3 .
-
Test the image:
docker run --rm -e YNAB_API_TOKEN=test ghcr.io/issmirnov/ynab-mcp-server:latest
-
Login to GHCR:
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
-
Push the image:
docker push ghcr.io/issmirnov/ynab-mcp-server:latest docker push ghcr.io/issmirnov/ynab-mcp-server:v0.1.3
The repository should have a GitHub Action workflow that automatically builds and publishes Docker images on:
- Push to
mainbranch - New version tags (e.g.,
v0.1.3)
Example workflow (.github/workflows/docker-publish.yml):
name: Docker Build and Publish
on:
push:
branches: [ main ]
tags: [ 'v*' ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}Before each release:
- Update version in
package.json - Update version in
smithery.json - Update version in CLAUDE.md (Project Status section)
- Run all tests:
npm test - Build the project:
npm run build - Test locally:
npm link && ynab-mcp-server - Test Docker image:
docker build -t test . && docker run --rm -e YNAB_API_TOKEN=test test - Update README if needed
- Commit all changes
- Create a git tag:
git tag v0.1.3 && git push origin v0.1.3 - Publish to npm:
npm publish - Verify npm package:
npx ynab-mcp-server@latest - Verify Docker image:
docker pull ghcr.io/issmirnov/ynab-mcp-server:latest - Update Smithery listing (if needed)
- Create GitHub release with release notes
- Ensure you're logged in:
npm whoami - Check package ownership:
npm owner ls ynab-mcp-server - Consider using a scoped package name:
@yourusername/ynab-mcp-server
- Login to GHCR:
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin - Ensure you have write permissions to the repository
- Ensure package is published to npm
- Ensure
smithery.jsonis present - Submit manually at https://smithery.ai/submit
- Wait 24-48 hours for automatic indexing
- Verify package is public:
npm view ynab-mcp-server - Check that
binfield is correctly set in package.json - Ensure
dist/index.jshas a shebang:#!/usr/bin/env node - Test with:
npx ynab-mcp-server@latest
After publishing a new version:
-
Test installation:
# Test npm npx -y ynab-mcp-server # Test Docker docker pull ghcr.io/issmirnov/ynab-mcp-server:latest # Test Smithery npx -y @smithery/cli install ynab-mcp-server --client claude
-
Update documentation:
- Update README badges if version changed
- Update any example code with new version numbers
-
Announce:
- Create GitHub release with release notes
- Post in relevant communities (if applicable)
- Update any related blog posts or documentation