Integrations / MCP server and tools
MCP server and tools
Reference of the mergecat MCP server, every tool with its parameters, the compliance lock, environment variables and how to use the server without the plugin.
The mergecat MCP server gives an AI assistant the changesets of a branch, its tags and releases, and Keep a Changelog drafts. It runs locally over stdio, reads the repository with your Git and never changes it. The Claude Code plugin installs it together with the skills; you can also add it on its own, and use it with GitHub Copilot, OpenAI Codex and GitLab Duo.
Tool names
| Installed as | Tool names in Claude Code |
|---|---|
| Plugin | mcp__plugin_mergecat_mergecat__<tool> |
Standalone server named mergecat | mcp__mergecat__<tool> |
Compliance lock
The repository tools (repository_info, tags, changelog, changesets, where_entered) are locked until the compliance question of the session has been answered with outcome proceed. While locked, they return an error with the questions to ask and the instruction to call record_compliance_answer; they read nothing.
compliance_status, record_compliance_answer and render_pdf are not locked: they do not read the history of the repository.
One answer per session
The answer is kept in the memory of the server process. Claude Code, like the other clients, starts one process per session, so every new session asks again, and every answer is written as an audit record. The question names the AI service of the client: a Claude Team or Enterprise account in Claude Code, a GitHub Copilot Business or Enterprise license in Copilot, and so on (see the question of each assistant). See AI usage records.
Which repository
Every repository tool takes an optional repository parameter: the path of a Git repository (any folder inside it). Without it, the server uses, in this order:
MERGECAT_REPOSITORY;CLAUDE_PROJECT_DIR(the Claude Code project);- the folders open in the client, when it reports them to MCP servers (VS Code does): the first one that is a Git repository;
- the current directory of the server.
Tools
compliance_status
Whether the compliance question was answered in this session, and the exact questions to ask. No parameters. Does not read the repository.
Returns aiService (the AI service the questions are about), confirmed, askedThisSession, lastOutcome, lastRecordedAt, lastRecordFile, questions.account, questions.proceedIfNotTeamOrEnterprise and recordsFolder. Field descriptions: AI usage records.
record_compliance_answer
Records the answers the user gave in the conversation as an audit record on this computer (Markdown document and JSON Lines log) and unlocks the repository tools for the session when the outcome is proceed.
| Parameter | Type | Required | Description |
|---|---|---|---|
team_or_enterprise_account | boolean | yes | true if the user uses the business or enterprise plan named in the first question (in Claude Code: a Claude Team or Enterprise account) |
aware_and_proceed | boolean | when the first answer is false | true if the user is aware of the EU AI Act and NIS2 and wants to proceed anyway |
requested_action | string | yes | What the user asked for, e.g. changelog v1.2.0..v1.3.0 or tags |
answers_verbatim | string | no | The user’s answers as written, or the options chosen |
language | string | no | Language the questions were asked in (ISO 639-1) |
ai_model | string | no | The model ID of the assistant |
repository | string | no | Repository path |
Returns the outcome, the record ID, the paths of the record and of the log, and the record as Markdown. When the outcome is stopped, that Markdown leaves out user, computer and repository details.
render_pdf
Converts a Markdown document (a changelog, release notes, a compliance record) into a PDF file. Does not read the repository.
| Parameter | Type | Required | Description |
|---|---|---|---|
markdown | string | yes | The Markdown document (up to 2,000,000 characters) |
file_name | string | no | File name, e.g. changelog-web-v1.3.0.pdf. Default: from the title |
folder | string | no | Absolute folder for the file. Default: mergecat in the system temporary folder |
title | string | no | Document title for the PDF metadata and the page footer. Default: the first # heading |
allow_in_project | boolean | no | Allow writing inside the project folder; only when the user asked to save the PDF there |
The server refuses to write inside the project (the folder from Which repository) unless allow_in_project is set. The file name keeps letters, digits, ., _ and -. Returns file, pages and bytes. For the font limits see Changelogs.
repository_info
The default branch, the current branch, the hosting service and the version tags on the default branch with their dates (newest first, up to 30). Also says whether pull request data is available (GitHub (GITHUB_TOKEN set) or none (local Git data only)), the last fetch and whether the clone is shallow.
| Parameter | Type | Required | Description |
|---|---|---|---|
repository | string | no | Repository path |
tags
Every tag, newest first: date, commit, annotated or lightweight, message, tagger, whether it looks like a version and whether it is on the branch. For version tags on the branch: the previous version tag and the number of changesets since it. Also the number of changesets not released yet and the newest version tag.
| Parameter | Type | Required | Description |
|---|---|---|---|
repository | string | no | Repository path |
branch | string | no | Branch the releases are made from. Default: the default branch |
pattern | string | no | Text contained in the name, or a glob with * and ? (e.g. v2.*); case-insensitive |
versions_only | boolean | no | Only tags that look like versions (v1.2.3, 1.2) |
limit | integer | no | Maximum tags, 1 to 500. Default 50 |
changelog
A Keep a Changelog draft of what entered the branch, one line per changeset, grouped by release (version tags) and by section (Added, Changed, Deprecated, Removed, Fixed, Security). Returns the Markdown draft and structured data: per changeset the section and the reason, the pull request number and link, the branch, the commits, and breaking and internal flags; for a range, how each end was resolved; notes such as swapped ends or missing pull request data.
| Parameter | Type | Required | Description |
|---|---|---|---|
repository | string | no | Repository path |
branch | string | no | Branch whose history is described. Default: the default branch (e.g. origin/main) |
range | string | no | One range from..to (also [from..to]); each end a tag, a date (YYYY-MM-DD, optionally with a time) or a commit; open ends allowed (v1.3.0.., ..v1.0.0) |
from | string | no | Start of a range, excluded: tag, date or commit |
to | string | no | End of a range, included: tag, date or commit. Default: the branch |
max_releases | integer | no | Releases to include when no range is given, 0 to 100. Default 5 |
unreleased_only | boolean | no | Only the changes after the newest version tag |
include_internal | boolean | no | Also list docs, tests, CI and chores in the Markdown. Default false (they stay in the data) |
header | boolean | no | Start with the # Changelog title and the Keep a Changelog preamble |
language | string | no | ISO 639-1 code. Default en. Headings are translated for en, it, de, fr, es; for other languages they stay in English and the data says headingsTranslated: false |
Give either range or from/to, not both. The tool never translates change descriptions.
changesets
What entered a branch, newest first, grouped by integration: merged pull requests and merges with the commits they brought in, and direct commits. Also returns the warnings of the history (shallow clone, no merges, squash merges).
| Parameter | Type | Required | Description |
|---|---|---|---|
repository | string | no | Repository path |
branch | string | no | Branch to describe. Default: the default branch |
base | string | no | Only what entered after this tag, branch or commit |
since | string | no | Integration date from, YYYY-MM-DD |
until | string | no | Integration date to, YYYY-MM-DD |
search | string | no | Text in subject, SHA, branch name or pull request title (also inside groups) |
author | string | no | Author or integrator name or e-mail |
limit | integer | no | Maximum entries, 1 to 500. Default 50 |
where_entered
For a commit: the integration (pull request, merge or direct commit) that brought it into the branch, when, who integrated it, and the first tag that contains it.
| Parameter | Type | Required | Description |
|---|---|---|---|
repository | string | no | Repository path |
sha | string | yes | Commit SHA, at least 7 hexadecimal characters |
branch | string | no | Branch. Default: the default branch |
Pull request data
With a token of the repository’s hosting service in the environment, the tools add pull request (merge request) titles, numbers, labels and linked issues: GITHUB_TOKEN (or GH_TOKEN) for GitHub, GITLAB_TOKEN (or GL_TOKEN) for GitLab, AZURE_DEVOPS_EXT_PAT (a personal access token) or AZURE_DEVOPS_TOKEN (a Microsoft Entra token) for Azure DevOps. Without a token they use local Git data only and say which variable to set.
Use the server without the plugin
The server is also a plain MCP server: no skills, tools named mcp__mergecat__<tool>. Its instructions tell the client to ask the compliance question and to give documents to the user in the conversation, not as files in the project.
Get the server
Download the single file mergecat-mcp.cjs from the download section, or build it from a clone with npm run mcp:build (it is written to plugins/mergecat/server/mergecat-mcp.cjs). It needs Node.js 20 or newer.
Add it to Claude Code
claude mcp add --transport stdio --scope user mergecat -- node /path/to/mergecat-mcp.cjsTo pass environment variables, add -e NAME=value before --, for example -e MERGECAT_COMPLIANCE_DIR=/path/to/records.
Check it
Start Claude Code in a Git repository and run /mcp: the mergecat server should be connected. The server logs to stderr and prints mergecat MCP server 0.3.0 ready when it starts.
Other MCP clients that start stdio servers run it the same way, node /path/to/mergecat-mcp.cjs: see Other AI assistants for GitHub Copilot, OpenAI Codex and GitLab Duo. Outside Claude Code CLAUDE_PROJECT_DIR is not set: the server uses the folders open in the client when it reports them, otherwise set MERGECAT_REPOSITORY or pass repository to the tools.
Environment variables
| Variable | Effect |
|---|---|
GITHUB_TOKEN | GitHub token for pull request data; GH_TOKEN is used when GITHUB_TOKEN is not set |
GITLAB_TOKEN | GitLab token (read_api) for merge request data; GL_TOKEN is used when GITLAB_TOKEN is not set |
AZURE_DEVOPS_EXT_PAT | Azure DevOps personal access token for pull request data; AZURE_DEVOPS_TOKEN takes a Microsoft Entra token instead |
MERGECAT_AI_SERVICE | The AI service the compliance question is about, when the client is not recognized: claude, copilot, openai, gitlab-duo or another name |
MERGECAT_GIT_PATH | Git executable, when git is not on the PATH |
MERGECAT_COMPLIANCE_DIR | Folder of the AI usage records instead of the default folder |
MERGECAT_REPOSITORY | Repository used when a tool gets no repository parameter; also the project folder that render_pdf protects |
CLAUDE_PROJECT_DIR | Set by Claude Code: the project, used when neither the parameter nor MERGECAT_REPOSITORY is given |
In Claude Code, the plugin passes the token variables above, MERGECAT_GIT_PATH and MERGECAT_COMPLIANCE_DIR from the environment you start Claude Code in.