Releasing
Guide
How nsf-awards-mcp is versioned and released, and what the CI pipeline builds and publishes for a version tag.
A release of nsf-awards-mcp is a version bump in package.json, a commit, and a vX.Y.Z git tag.
Pushing the tag makes CI build and push a multi-architecture Docker image to the GitHub Container
Registry (GHCR) and create a GitHub release.1 The release is the container image
and the tagged source. CI does not publish an npm package.2
The current version in package.json is 2.0.0.3 For the breaking changes that
2.0.0 made for callers, see Migrating from 1.x.
Where the version comes from
package.json is the only version source that the code reads.4 src/version.ts loads
it with createRequire and exports PACKAGE_NAME and VERSION.5 That one value
appears in three places at run time:
| Where | How |
|---|---|
| MCP server info | SERVER_INFO.name is PACKAGE_NAME and SERVER_INFO.version is VERSION, reported to clients in the handshake.6 |
| HTTP health check | GET /health answers {"status":"ok","version":"<VERSION>"}.7 |
| NSF API requests | The client sends User-Agent: nsf-awards-mcp/<VERSION>.8 |
The Jest stand-in tests/support/version.ts reads the same package.json, so the tests that check
server info follow the bump without changes (see Testing).9
Static version labels
Some deployment files carry their own version labels. The code does not read them, and they must be
bumped by hand.1 At the time of writing they lag package.json:
| File | Label | Current value |
|---|---|---|
Dockerfile |
LABEL version |
1.1.010 |
docker-compose.yml |
build arg VERSION default |
1.0.011 |
docker-compose.yml |
label app.version |
1.0.011 |
deployment/gcp/cloud-run.yaml |
template label version |
1.0.012 |
The OCI label org.opencontainers.image.version in the Dockerfile comes from the VERSION build
argument, which CI fills in from the image metadata of the tag. It does not need a manual
bump.10
Release steps
- Bump
versioninpackage.json, and the static labels above if you keep them in step.1 -
Check. Run the CI commands and the live suite:
npm ci npm run type-check npm run lint npm run format:check npm test npm run build npm run test:liveThese are the gates of the
qualityjob plus the live suite.2 See Testing for what each one covers. - Document. Before tagging, if the release changes what callers see (tool names, parameters,
output fields), make sure
USAGE.md,README.mdand, if assistants need to know,SERVER_INSTRUCTIONSinsrc/server.tsare updated in the same change. The developer guide makes this a step of adding or changing a tool; see Adding a tool.1 - Commit with the message
chore: release vX.Y.Z, create the tagvX.Y.Z, and push the tag.1 Follow the commit conventions in Development setup.
What CI does for a tag
The CI/CD Pipeline workflow runs on v* tags as well as on branch pushes.2 For a tag
it runs these jobs:
| Job | Needs | What it does |
|---|---|---|
quality |
Type-check, lint, format check, offline tests and build. | |
security |
quality |
npm audit (runtime dependencies at moderate, all at high) and a non-blocking Snyk scan. |
docker |
quality, security |
Builds the image for linux/amd64 and linux/arm64, pushes it to ghcr.io/<owner>/<repo>, then smoke-tests a local copy over stdio and HTTP. |
release |
quality, security, docker |
Creates a GitHub release named Release vX.Y.Z for the tag. |
deploy-production |
quality, security, docker, release |
Skipped for prerelease tags. A placeholder (see below). |
Image tags. The docker job derives tags with docker/metadata-action: the branch name for
branch pushes, the PR reference for pull requests, three semver tags for a version tag (the full
version, major.minor, and major), latest on the default branch, and a tag from the commit
SHA.2 It passes BUILD_DATE, VCS_REF (the commit SHA) and VERSION as build
arguments, uses the GitHub Actions build cache, and pushes on every event except pull requests. So
pushes to main, develop and claude/** also publish images, not only tags.
The GitHub release. The release job is not a draft. It is marked a prerelease when the tag
name contains rc, beta or alpha. Its body lists the version-tagged and latest image names,
shows a docker run and a docker-compose up example, and links to INSTALL.md.2
Deployment jobs are placeholders. deploy-staging (on pushes to main) and deploy-production
(on non-prerelease tags) only print messages. Their environment URLs are example.com
placeholders, and the steps say to add real deployment commands.2 To deploy a release,
use the options in Deployment.
After a release
- The weekly live API workflow keeps checking the server against the real NSF API, so upstream changes show up between releases.
-
Developer guide (DEVELOPMENT.md), Releasing; Adding or changing a tool ↩ ↩2 ↩3 ↩4 ↩5
-
package.json ↩
-
Project guidance for Claude Code (CLAUDE.md), Version ↩
-
Version module ↩
-
Server factory (SERVER_INFO) ↩
-
HTTP transport (/health) ↩
-
NSF API client (User-Agent) ↩
-
Jest stand-in for the version module ↩
-
Cloud Run service definition ↩