AI Agents (MCP)
Give your AI coding agents (Claude Code, Cursor, Copilot, Codex...) the release preview, the commit linting and the docs of the installed Relizy, through its MCP server.
An agent cannot guess what the next release will do: which packages, which versions, why, which changelog. Relizy ships an MCP server that answers these questions from your repository, with the docs and the config reference of the version you installed.
Quick Start
npx relizy mcp initIt writes the Relizy rules for your agents and registers the MCP server in their configs: see relizy mcp init for the files and the options. relizy init offers the same step when the project already uses an AI agent.
Install Relizy as a devDependency of the project: the agents then start the installed version in about a second, at the version of your lockfile.
What the Agents Get
| Tool | What it answers |
|---|---|
preview_release | What the next release bumps: the version of each package and group, and why (its commits, a bumped dependency, a peer range rejecting the new version, another version group) |
preview_changelog | The changelog entries the release would write |
lint_commit | Lints a message before committing: problems and fixes, suggested header, bump, packages and changelog entry. Also lints the commits of a branch |
get_project | Config files, version mode or groups, packages, last tag, steps of the release and resolved config (secrets masked) |
get_config_option | Type, default and description of any option of relizy.config.ts |
search_docs | Search in the guides, the config, the CLI, the commitlint docs and the API of @relizy/core |
get_doc | Read a page of the docs (core/<domain> for @relizy/core: each export with its signature, options and example), or some of its sections |
check_migration | What to change to upgrade from Relizy 1: the dependency, the removed and renamed options, the social templates, the version groups, the hooks, the CLI calls of the scripts and the CI, and the code calling the API, file by file and line by line |
It also provides prompts: write-commit, prepare-release, setup-relizy, migrate-to-v2 and setup-ci. To upgrade from Relizy 1, ask your agent for migrate-to-v2: it reads the migration guide, runs check_migration and proposes the changes.
Guarantees
- Read-only: the tools never write a file, commit, tag, push nor publish. The rules ask the agents to run
relizy release(and the other writing commands) only with your approval, and--dry-runotherwise. - No hook: the hooks of your config never run in the MCP server.
- No network by default: the local tags are used (
fetchTags: truerunsgit fetch --tags), and the changelog previews leave the contributors out (contributors: truemay query the GitHub API). - Version-matched: the docs, the config reference and the rules come from the installed Relizy. Each release of Relizy ships them up to date.
Manual Configuration
relizy mcp init writes these files for you. To configure another agent, register the relizy mcp command:
{
"mcpServers": {
"relizy": {
"type": "stdio",
"command": "pnpm",
"args": ["exec", "relizy", "mcp"]
}
}
}{
"mcpServers": {
"relizy": {
"command": "npx",
"args": ["--no-install", "relizy", "mcp"]
}
}
}{
"servers": {
"relizy": {
"type": "stdio",
"command": "npx",
"args": ["--no-install", "relizy", "mcp"]
}
}
}[mcp_servers.relizy]
command = "npx"
args = [
"-y",
"relizy",
"mcp"
]Without Relizy in the dependencies of the project, use npx -y relizy@<version> mcp: a pinned version starts faster than relizy@latest, which queries the registry at every start.
Keeping the Agents Up to Date
The MCP server always serves the installed Relizy: upgrading Relizy upgrades the tools and the docs. The rules of the project are files in the repository, so they are updated by relizy mcp update (or relizy mcp init, which also writes the missing files). When their content is older than the installed Relizy, get_project and the instructions of the MCP server tell the agent to propose it, and the CLI prints one line outside the CI.
To update them at each install, the root package.json runs relizy mcp update in its prepare script: relizy mcp init adds it (except with --no-prepare), and relizy init asks before adding it. To add it by hand:
{
"scripts": {
"prepare": "relizy mcp update"
}
}relizy mcp update only rewrites the rule files that already exist: a rule you deleted (or an AGENTS.md without the Relizy section) is never recreated, and the MCP config you may have changed is never touched. With an existing prepare script, append the command: "prepare": "husky && relizy mcp update". The files are only rewritten when the rules change, so a new release of Relizy that does not change them leaves the repository clean.
prepare also runs when you install without the devDependencies (npm ci --omit=dev, pnpm install --prod), where the relizy command is missing: add --ignore-scripts to these installs.
Rules you edited by hand are no longer updated: delete the file (or the AGENTS.md section) to get the new ones.
The Rules
The rules written by relizy mcp init:
This project releases with relizy: versions, changelogs, git tags, npm publishing and GitHub/GitLab releases, computed from the commits and configured in relizy.config.ts.
Look it up before you guess
- MCP server
relizy(when available):preview_release(what the next release bumps and why),preview_changelog,lint_commit,get_project(resolved config, version mode, groups, packages),get_config_option,search_docs,get_doc,check_migration(what to change to upgrade from relizy 1). - Version-matched docs in
node_modules/relizy/agent-docs/(start withREADME.md). @relizy/coreas a library: its API (every export with its signature, options and example) is in thecore/*docs:search_docs("<function or need>"), thenget_doc({ id: "core/<domain>", sections: ["<name>"] }), instead of reading its code.
Never invent a config option nor a CLI flag: check it with get_config_option or the docs.
Commits drive the releases
- Write Conventional Commits:
type(scope): subject. The type decides the bump and the changelog section:featis a minor,fixandperfa patch,!after the type or aBREAKING CHANGE:footer a major (thetypesof the config can change this). - Lint the message before committing:
lint_commitorrelizy commitlint --message "<message>". It also shows the changelog entry the commit produces. - In a monorepo, a commit belongs to the packages whose files it changes: one package (or one concern) per commit gives precise bumps and changelogs.
- The body of a commit can end up in the changelog: write it for the users of the package.
Releasing
- Preview, never guess:
preview_releaseandpreview_changelog, orrelizy release --dry-run. - Never run
relizy release,bump,publish,changelog,provider-release,social,pr-commentormerge-previewwithout the explicit approval of the user: they write versions and changelogs, commit, tag, push, publish or comment the pull requests. Most projects release from their CI. - Never edit the versions of the
package.jsonfiles, theCHANGELOG.mdfiles nor the release tags by hand: relizy computes them from the commits and the tags.
Configuration
defineConfigfromrelizytypesrelizy.config.ts. Several configs can coexist (relizy.<name>.config.ts, selected with--config <name>).- Monorepos:
monorepo.versionModeisunified,selective(one version, only the changed packages) orindependent;monorepo.groupsreleases several sets of packages, each with its own mode. - Set up a new project with
relizy init(--yeswithout questions), and the AI agents withrelizy mcp init.
Troubleshooting
- The agent does not see the tools: restart it after
relizy mcp init, and check thatrelizy mcpstarts from the root of the project (npx relizy mcpshould wait for input without printing anything). - "The docs bundle of relizy is missing": reinstall Relizy. In the Relizy repository, run
pnpm build. - A monorepo whose apps are released from a subfolder: start the server with
relizy mcp --cwd <folder>.