Skip to main content
Glama
commit-check-mcp

commit-check-mcp

Official
by commit-check

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

commit-check-mcp validates commit messages, branch names, author metadata and push safety against commit-check rules. Every tool leaves your working tree and commits untouched; the two push checks may run git fetch to resolve SHAs. Workflow: (1) validate FIRST, before you commit or push, with the matching validate_* tool (pass repo_path so the repository's own cchk.toml/commit-check.toml is used). (2) Read the top-level status: only 'fail' is a rejection; 'skip' means nothing was validated (do not treat it as approval); 'warn' checks are reported but do not fail the run. (3) On 'fail', for each check with status 'fail': if its fix is non-empty, apply fix verbatim; otherwise rewrite the value following suggest (rule_id and docs_url point at the rule's docs). (4) Validate AGAIN with the corrected value and repeat until status is 'pass'. Use describe_validation_rules to see which rules are enabled before guessing at a format.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
server_healthA

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_messageA

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_nameA

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_infoA

Validate a commit author's name and/or email against the configured rules (e.g. allowed email domains, name patterns, and under ai_attribution forbid/disclose that the author is not an AI tool). 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_safetyA

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_contextA

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_stateA

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_rulesA

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.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 8 tools

Disambiguation4/5

Each tool targets a distinct validation aspect (author, branch, message, push, repo state) and descriptions explicitly cross-reference when to prefer the aggregate validate_commit_context or validate_repository_state. The only real overlap is validate_commit_context duplicating the three single-aspect validators, which is intentional but still leaves an agent a choice point between 'one aspect' and 'aggregate'.

Naming Consistency4/5

The set follows a clear verb_noun pattern (validate_*, describe_*) with consistent snake_case throughout. The lone deviation is server_health, which is a noun phrase with no verb, though it is a conventional health-check name.

Tool Count5/5

Eight tools is well-scoped for a commit-rule validation server: one discovery tool, five validators covering each aspect plus an aggregate and repo-state check, one push-safety tool, and a health probe. No tool appears redundant beyond the deliberately layered aggregate/single validators.

Completeness4/5

The surface covers the full pre-commit lifecycle: inspect effective rules, validate message/branch/author individually or together, validate an existing HEAD commit, and check push safety. A minor gap is validating arbitrary historical commits or commit ranges, since validate_repository_state only inspects the latest commit at HEAD.

Maintenance

ActivityActive
ResponsivenessNo recent community issues