# commit-check MCP [Health: Active]

**Category:** 🔄 Version Control  
**Repository:** https://github.com/commit-check/commit-check-mcp  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/commit-check-mcp

## Description
Validate commit messages, branch names, author info, push safety, and repo state.

## Tools
Capabilities this server exposes over MCP:

- **server_health** — Return server and dependency versions. Read-only, no side effects.

Returns {server, server_version, commit_check_version, mcp_sdk_version}. Useful as a first call
to verify the server is running and to check version compatibility.
- **validate_commit_message** — Validate a commit message against commit-check rules (Conventional Commits type and format,
subject length and case, body, sign-off, WIP/fixup markers, AI attribution: whatever the
effective config enables). Read-only; touches no git state.

Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.

Use this when you have one commit message string to check before committing. To check message,
branch and author in one call use validate_commit_context; to check the latest commit already
in a repository use validate_repository_state.
- **validate_branch_name** — Validate a branch name against the configured naming convention (e.g. feature/*, bugfix/*)
and, when configured, that the branch is based on the required merge base. Read-only.

Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.

Use this before creating or pushing a branch. Omit branch to check the branch currently checked
out in repo_path. For combined message+branch+author validation use validate_commit_context.
- **validate_author_info** — Validate a commit author's name and/or email against the configured rules (e.g. allowed
email domains, name patterns). Read-only.

Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.

Use this to check author metadata before committing. Only the values you pass are checked; if
neither is given, both are read from repo_path's git config (falling back to the latest commit)
and repo_path must be a git repository. For combined validation use validate_commit_context.
- **validate_push_safety** — Check that a pending push is not a force push (rule CC301, no_force_push): fails when a
remote_sha is not an ancestor of its local_sha, i.e. the push would rewrite remote history.
Leaves your working tree and commits untouched, but may run `git fetch <remote> <ref>` to
resolve SHAs, which updates FETCH_HEAD and remote-tracking refs. A SHA that cannot be resolved
even then is a tool error, never a pass. Force pushes are always rejected by this tool;
push.allow_force_push in config cannot re-enable them here.

Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.

Call this before `git push`. Only the no_force_push rule runs. When it fails there is no
automatic fix (fix is ''): follow suggest, i.e. push without --force/--force-with-lease or
rebase onto the remote first, then validate again.
- **validate_commit_context** — Run the commit message, branch name and author checks together in one call, for whichever of
message, branch, author_name and author_email you pass. Read-only.

Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.

Use this to validate several aspects of a commit you are about to make with a single call. At
least one of message, branch, author_name or author_email is required; omitted aspects are not
checked. For one aspect use validate_commit_message, validate_branch_name or
validate_author_info; for the commit already at HEAD use validate_repository_state.
- **validate_repository_state** — Validate what is already in a local git repository: the latest commit's message and author,
the checked-out branch name and, optionally, whether pushing that branch to its upstream would
be a force push. Leaves the working tree and commits untouched; the push check may run
`git fetch`, which updates FETCH_HEAD and remote-tracking refs.

Returns {status, warnings, checks[]}. status is 'pass', 'fail' or 'skip': only 'fail' is a rejection; 'skip' means every check skipped, so nothing was validated and the result is not approval. warnings is the number of checks with status 'warn'. Each check has: rule_id (stable rule id, e.g. 'CC001'); check (rule name, e.g. 'message'); status 'pass' | 'fail' | 'warn' | 'skip' ('warn' = the config lists the check under warn, so the finding is reported without failing the run; 'skip' = the rule did not run, e.g. the author is in ignore_authors or there was nothing to check); value (what was checked); error (why it failed); suggest (advice for a person); fix (the corrected value when the correction is unambiguous, else ''); docs_url (documentation for the rule). On 'fail', apply a non-empty fix verbatim; when fix is '', rewrite following suggest; then validate again.

Use this to check a repository's current state in one call, e.g. after committing and before
pushing, or in a hook. The include_* flags select the checks; at least one must be true. To
validate values that are not yet committed use validate_commit_context or the single-aspect
tools.
- **describe_validation_rules** — Return the commit-check rules that are in effect after merging the built-in defaults, the
repository's config file (or config_path) and the inline config overrides. Read-only, no side
effects.

Returns {commit_check_version, config (the merged config), supported_checks (every check name
commit-check knows), enabled_rules[]} where each enabled rule carries its check name, config
and pattern details.

Use this before writing a commit message or branch name to learn the expected format instead
of guessing, and to debug why a validation failed or was skipped.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "commit-check-mcp": {
    "command": "uvx",
    "args": ["commit-check-mcp"]
  }
}
```

## Documentation

## What commit-check MCP does

commit-check MCP exposes Commit Check's policy validation through the Model Context Protocol. It lets an AI agent check values before they are committed, or inspect the latest commit and checked-out branch in an existing local Git repository.

Validation can cover Conventional Commits formatting, subject length and capitalization, required bodies and sign-offs, WIP or fixup markers, AI attribution, branch naming patterns, configured merge-base requirements, and author name or email rules. Push validation checks whether a proposed update would rewrite remote history through a force push.

The server also reports the effective validation configuration and provides a health check containing the server, Commit Check, and MCP SDK versions.

## How it works

Each validation call returns a common result containing an overall `status`, a warning count, and individual checks. `fail` means a rule rejected the input; `warn` reports a finding without failing the run; `pass` means the applicable checks passed; and `skip` means every check was skipped, not that the input was approved.

Checks include stable rule IDs, the checked value, an explanation, guidance, an optional unambiguous replacement, and a documentation URL. An agent can apply a non-empty `fix` exactly, or follow `suggest` when no automatic correction is available, then run validation again.

Use `validate_commit_context` to check a proposed message, branch, and author in one call. Use `validate_repository_state` for the latest commit, current branch, author, and optionally its upstream push. `describe_validation_rules` resolves built-in defaults, repository configuration, a selected configuration file, and inline overrides so an agent can learn the rules before generating a value.

## Setup and configuration

The server runs over stdio. With `uv` installed, register it using:

```bash
uvx commit-check-mcp
```

MCP client configurations use `uvx` as the command and `commit-check-mcp` as its argument. Installation through `pip install commit-check-mcp` is an alternative when a client cannot launch `uvx`; the installed `commit-check-mcp` executable can then be used directly.

Validation tools accept `repo_path`, `config_path`, and `config`. `repo_path` identifies the repository whose `cchk.toml` or `commit-check.toml` should apply. A plain directory is sufficient when all values are supplied directly, but Git state requires a repository. `config_path` selects another configuration file, with relative paths resolved from `repo_path`; `config` supplies inline overrides merged above the selected configuration.

The server can be configured in Claude Code, Claude Desktop, Cursor, VS Code Copilot agent mode, Cline, Roo Code, Windsurf, Continue, and Zed. Each client has its own MCP configuration location and, in some cases, a different top-level configuration key.

## Tools and capabilities

- `server_health` reports server and dependency versions without side effects.
- `validate_commit_message` checks one message against the active rules.
- `validate_branch_name` checks a supplied branch or the currently checked-out branch.
- `validate_author_info` checks supplied author fields or reads them from Git configuration and, if needed, the latest commit.
- `validate_commit_context` combines message, branch, and author checks for values supplied in the request.
- `validate_push_safety` rejects force-push updates by checking whether the remote commit is an ancestor of the local commit.
- `validate_repository_state` inspects committed message and author data, the current branch, and optionally upstream push safety.
- `describe_validation_rules` returns the merged configuration, supported checks, and enabled rule details.

## Limitations and notes

The validation tools do not modify the working tree or commits. Push-related checks can run `git fetch` to resolve SHAs, which may update `FETCH_HEAD` and remote-tracking refs. An unresolved SHA produces a tool error rather than a passing result.

`validate_push_safety` only checks the no-force-push rule, and configuration cannot enable force pushes through this tool. At least one validation target is required for combined or repository-state checks. Empty messages, invalid configurations, missing paths, and repository requirements are reported as tool errors rather than successful validation.

_Full upstream README: https://allmcps.com/mcp/commit-check-mcp/readme_

