commit-check-mcp 0.1.3__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/.github/dependabot.yml +1 -1
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/.github/workflows/main.yml +4 -4
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/.github/workflows/publish.yml +4 -4
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/PKG-INFO +176 -16
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/README.md +173 -13
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/pyproject.toml +2 -2
- commit_check_mcp-0.1.5/server.json +36 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/src/commit_check_mcp/server.py +58 -6
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/src/commit_check_mcp.egg-info/PKG-INFO +176 -16
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/src/commit_check_mcp.egg-info/SOURCES.txt +3 -0
- commit_check_mcp-0.1.5/src/commit_check_mcp.egg-info/requires.txt +6 -0
- commit_check_mcp-0.1.5/src/commit_check_mcp.egg-info/scm_file_list.json +18 -0
- commit_check_mcp-0.1.5/src/commit_check_mcp.egg-info/scm_version.json +8 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/tests/test_server.py +95 -1
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/uv.lock +3 -3
- commit_check_mcp-0.1.3/src/commit_check_mcp.egg-info/requires.txt +0 -6
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/.github/workflows/labeler.yml +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/.github/workflows/release-drafter.yml +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/.gitignore +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/LICENSE +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/setup.cfg +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/src/commit_check_mcp/__init__.py +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/src/commit_check_mcp.egg-info/dependency_links.txt +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/src/commit_check_mcp.egg-info/entry_points.txt +0 -0
- {commit_check_mcp-0.1.3 → commit_check_mcp-0.1.5}/src/commit_check_mcp.egg-info/top_level.txt +0 -0
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
matrix:
|
|
25
25
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
26
26
|
steps:
|
|
27
|
-
- uses: actions/checkout@
|
|
27
|
+
- uses: actions/checkout@v7
|
|
28
28
|
- uses: actions/setup-python@v6
|
|
29
29
|
with:
|
|
30
30
|
python-version: ${{ matrix.python-version }}
|
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
|
|
40
40
|
- name: Upload coverage reports to Codecov
|
|
41
41
|
if: matrix.python-version == '3.12'
|
|
42
|
-
uses: codecov/codecov-action@
|
|
42
|
+
uses: codecov/codecov-action@v7
|
|
43
43
|
with:
|
|
44
44
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
45
45
|
slug: commit-check/commit-check-mcp
|
|
@@ -48,7 +48,7 @@ jobs:
|
|
|
48
48
|
build:
|
|
49
49
|
runs-on: ubuntu-24.04
|
|
50
50
|
steps:
|
|
51
|
-
- uses: actions/checkout@
|
|
51
|
+
- uses: actions/checkout@v7
|
|
52
52
|
- uses: actions/setup-python@v6
|
|
53
53
|
with:
|
|
54
54
|
python-version: "3.12"
|
|
@@ -65,7 +65,7 @@ jobs:
|
|
|
65
65
|
run: python -m twine check dist/*
|
|
66
66
|
|
|
67
67
|
- name: Upload distributions
|
|
68
|
-
uses: actions/upload-artifact@
|
|
68
|
+
uses: actions/upload-artifact@v7
|
|
69
69
|
with:
|
|
70
70
|
name: dist
|
|
71
71
|
path: dist/*
|
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
outputs:
|
|
21
21
|
artifact-name: python-package-distributions
|
|
22
22
|
steps:
|
|
23
|
-
- uses: actions/checkout@
|
|
23
|
+
- uses: actions/checkout@v7
|
|
24
24
|
with:
|
|
25
25
|
fetch-depth: 0
|
|
26
26
|
|
|
@@ -45,13 +45,13 @@ jobs:
|
|
|
45
45
|
commit-check-mcp --help
|
|
46
46
|
|
|
47
47
|
- name: Upload distributions
|
|
48
|
-
uses: actions/upload-artifact@
|
|
48
|
+
uses: actions/upload-artifact@v7
|
|
49
49
|
with:
|
|
50
50
|
name: python-package-distributions
|
|
51
51
|
path: dist/*
|
|
52
52
|
|
|
53
53
|
- name: Create attestations
|
|
54
|
-
uses: actions/attest-build-provenance@
|
|
54
|
+
uses: actions/attest-build-provenance@v4
|
|
55
55
|
with:
|
|
56
56
|
subject-path: dist/*
|
|
57
57
|
|
|
@@ -65,7 +65,7 @@ jobs:
|
|
|
65
65
|
id-token: write
|
|
66
66
|
steps:
|
|
67
67
|
- name: Download distributions
|
|
68
|
-
uses: actions/download-artifact@
|
|
68
|
+
uses: actions/download-artifact@v8
|
|
69
69
|
with:
|
|
70
70
|
name: python-package-distributions
|
|
71
71
|
path: dist
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: commit-check-mcp
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: MCP server exposing commit-check validation tools
|
|
5
5
|
Author-email: Xianpeng Shen <xianpeng.shen@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -18,24 +18,28 @@ Classifier: Topic :: Software Development
|
|
|
18
18
|
Requires-Python: >=3.10
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: commit-check<3,>=2.
|
|
21
|
+
Requires-Dist: commit-check<3,>=2.7.0
|
|
22
22
|
Requires-Dist: mcp<2,>=1.27.0
|
|
23
23
|
Provides-Extra: dev
|
|
24
24
|
Requires-Dist: pytest<10,>=9.0.0; extra == "dev"
|
|
25
|
-
Requires-Dist: pytest-cov<
|
|
25
|
+
Requires-Dist: pytest-cov<8,>=6.0.0; extra == "dev"
|
|
26
26
|
Dynamic: license-file
|
|
27
27
|
|
|
28
28
|
# commit-check-mcp
|
|
29
29
|
|
|
30
|
+
mcp-name: io.github.commit-check/commit-check-mcp
|
|
31
|
+
|
|
30
32
|
[](https://pypi.org/project/commit-check-mcp/)
|
|
31
33
|
[](https://pypi.org/project/commit-check-mcp/)
|
|
32
34
|
[](https://github.com/commit-check/commit-check-mcp/actions/workflows/main.yml)
|
|
33
35
|
[](https://codecov.io/gh/commit-check/commit-check-mcp)
|
|
34
36
|
[](https://modelcontextprotocol.io/)
|
|
37
|
+
[](https://registry.modelcontextprotocol.io/)
|
|
38
|
+
[](https://glama.ai/mcp/servers/github/commit-check/commit-check-mcp)
|
|
35
39
|
|
|
36
40
|
Model Context Protocol (MCP) server for [commit-check](https://github.com/commit-check/commit-check).
|
|
37
41
|
|
|
38
|
-
`commit-check-mcp` exposes `commit-check` as local MCP tools so an MCP client can validate commit messages, branch names, author info, and repository state.
|
|
42
|
+
`commit-check-mcp` exposes `commit-check` as local MCP tools so an MCP client can validate commit messages, branch names, author info, push safety, and repository state.
|
|
39
43
|
|
|
40
44
|
## Features
|
|
41
45
|
|
|
@@ -44,9 +48,10 @@ This MCP server exposes commit-check validations as MCP tools:
|
|
|
44
48
|
- `server_health` — returns server/sdk versions
|
|
45
49
|
- `validate_commit_message` — validates a commit message
|
|
46
50
|
- `validate_branch_name` — validates a branch name or the current repo branch
|
|
51
|
+
- `validate_push_safety` — validates that a push is not a force push
|
|
47
52
|
- `validate_author_info` — validates author name/email or the repo's git author config
|
|
48
53
|
- `validate_commit_context` — runs combined checks in one call
|
|
49
|
-
- `validate_repository_state` — validates latest commit, current branch,
|
|
54
|
+
- `validate_repository_state` — validates latest commit, current branch, author state, and optional push safety for a repo
|
|
50
55
|
- `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config
|
|
51
56
|
|
|
52
57
|
All validation tools return the same structured commit-check result shape:
|
|
@@ -84,44 +89,174 @@ pip install -e .
|
|
|
84
89
|
|
|
85
90
|
This server runs over stdio, so it is meant to be launched by an MCP client rather than used as a long-running HTTP service.
|
|
86
91
|
|
|
87
|
-
|
|
92
|
+
With `uvx` (recommended — no install needed):
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Run once, no pip install required
|
|
96
|
+
uvx commit-check-mcp
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
> **Tip**: If `uv` is not installed, get it via `curl -LsSf https://astral.sh/uv/install.sh | sh`.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### Claude Desktop
|
|
88
104
|
|
|
89
105
|
```json
|
|
90
106
|
{
|
|
91
107
|
"mcpServers": {
|
|
92
108
|
"commit-check": {
|
|
93
|
-
"command": "
|
|
109
|
+
"command": "uvx",
|
|
110
|
+
"args": ["commit-check-mcp"]
|
|
94
111
|
}
|
|
95
112
|
}
|
|
96
113
|
}
|
|
97
114
|
```
|
|
98
115
|
|
|
99
|
-
|
|
116
|
+
### Claude Code CLI
|
|
100
117
|
|
|
101
|
-
```
|
|
102
|
-
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"mcpServers": {
|
|
121
|
+
"commit-check": {
|
|
122
|
+
"command": "uvx",
|
|
123
|
+
"args": ["commit-check-mcp"]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Add to your `~/.claude/settings.json` or project-level `.claude/settings.local.json`.
|
|
130
|
+
|
|
131
|
+
### Cursor
|
|
132
|
+
|
|
133
|
+
In Cursor, go to **Settings → Cursor Settings → MCP → Add new MCP server** and paste:
|
|
134
|
+
|
|
135
|
+
| Field | Value |
|
|
136
|
+
|---|---|
|
|
137
|
+
| **Name** | `commit-check` |
|
|
138
|
+
| **Type** | `command` |
|
|
139
|
+
| **Command** | `uvx commit-check-mcp` |
|
|
140
|
+
|
|
141
|
+
Or add to your project's `.cursor/mcp.json`:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"mcpServers": {
|
|
146
|
+
"commit-check": {
|
|
147
|
+
"command": "uvx",
|
|
148
|
+
"args": ["commit-check-mcp"]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Windsurf
|
|
155
|
+
|
|
156
|
+
Add to your `~/.codeium/windsurf/mcp_config.json`:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"mcpServers": {
|
|
161
|
+
"commit-check": {
|
|
162
|
+
"command": "uvx",
|
|
163
|
+
"args": ["commit-check-mcp"]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Cline (VS Code)
|
|
170
|
+
|
|
171
|
+
Add a new MCP server in the Cline extension settings:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"mcpServers": {
|
|
176
|
+
"commit-check": {
|
|
177
|
+
"command": "uvx",
|
|
178
|
+
"args": ["commit-check-mcp"]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
103
182
|
```
|
|
104
183
|
|
|
105
|
-
|
|
184
|
+
### Continue.dev (VS Code / JetBrains)
|
|
106
185
|
|
|
107
|
-
|
|
186
|
+
Add to your `~/.continue/config.json`:
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"experimental": {
|
|
191
|
+
"mcpServers": {
|
|
192
|
+
"commit-check": {
|
|
193
|
+
"command": "uvx",
|
|
194
|
+
"args": ["commit-check-mcp"]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Roo Code
|
|
202
|
+
|
|
203
|
+
Add to your Roo Code MCP settings:
|
|
108
204
|
|
|
109
205
|
```json
|
|
110
206
|
{
|
|
111
207
|
"mcpServers": {
|
|
112
208
|
"commit-check": {
|
|
113
|
-
"command": "
|
|
209
|
+
"command": "uvx",
|
|
210
|
+
"args": ["commit-check-mcp"]
|
|
114
211
|
}
|
|
115
212
|
}
|
|
116
213
|
}
|
|
117
214
|
```
|
|
118
215
|
|
|
119
|
-
|
|
216
|
+
### Zed
|
|
217
|
+
|
|
218
|
+
Add to your `~/.config/zed/settings.json`:
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"mcp_servers": {
|
|
223
|
+
"commit-check": {
|
|
224
|
+
"command": "uvx",
|
|
225
|
+
"args": ["commit-check-mcp"]
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Generic / Any MCP Client
|
|
232
|
+
|
|
233
|
+
If your client does not support `uvx`, use `pip` and the direct path:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
pip install commit-check-mcp
|
|
237
|
+
which commit-check-mcp
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Then use the absolute path in your config:
|
|
241
|
+
|
|
242
|
+
```json
|
|
243
|
+
{
|
|
244
|
+
"mcpServers": {
|
|
245
|
+
"commit-check": {
|
|
246
|
+
"command": "/path/to/commit-check-mcp"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
```
|
|
120
251
|
|
|
121
252
|
## Run Manually
|
|
122
253
|
|
|
123
254
|
```bash
|
|
255
|
+
# If installed via pip
|
|
124
256
|
commit-check-mcp
|
|
257
|
+
|
|
258
|
+
# Or via uvx (no install needed)
|
|
259
|
+
uvx commit-check-mcp
|
|
125
260
|
```
|
|
126
261
|
|
|
127
262
|
The server uses stdio transport, which is the recommended MCP default for local tool integrations.
|
|
@@ -133,9 +268,10 @@ After the client starts the server, it will expose these tools:
|
|
|
133
268
|
- `server_health`: returns server, SDK, and dependency versions
|
|
134
269
|
- `validate_commit_message(message, config?, repo_path?, config_path?)`
|
|
135
270
|
- `validate_branch_name(branch?, config?, repo_path?, config_path?)`
|
|
271
|
+
- `validate_push_safety(push_refs?, config?, repo_path?, config_path?)`
|
|
136
272
|
- `validate_author_info(author_name?, author_email?, config?, repo_path?, config_path?)`
|
|
137
273
|
- `validate_commit_context(message?, branch?, author_name?, author_email?, config?, repo_path?, config_path?)`
|
|
138
|
-
- `validate_repository_state(repo_path?, config?, config_path?, include_message?, include_branch?, include_author?)`
|
|
274
|
+
- `validate_repository_state(repo_path?, config?, config_path?, include_message?, include_branch?, include_author?, include_push?)`
|
|
139
275
|
- `describe_validation_rules(config?, repo_path?, config_path?)`
|
|
140
276
|
|
|
141
277
|
The common optional arguments are:
|
|
@@ -175,6 +311,15 @@ Validate the full repository state:
|
|
|
175
311
|
}
|
|
176
312
|
```
|
|
177
313
|
|
|
314
|
+
Validate push safety from git pre-push hook ref metadata:
|
|
315
|
+
|
|
316
|
+
```json
|
|
317
|
+
{
|
|
318
|
+
"repo_path": "/path/to/repo",
|
|
319
|
+
"push_refs": "refs/heads/main abc123 refs/heads/main def456"
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
178
323
|
Inspect the final merged rules that will be applied:
|
|
179
324
|
|
|
180
325
|
```json
|
|
@@ -200,6 +345,7 @@ Typical patterns:
|
|
|
200
345
|
|
|
201
346
|
- Validate an explicit message with a repository's rules
|
|
202
347
|
- Validate the current repository state without passing message/branch/author values manually
|
|
348
|
+
- Validate push safety using pre-push ref metadata, or check the current branch against its upstream
|
|
203
349
|
- Inspect which rules are actually enabled after config merging
|
|
204
350
|
|
|
205
351
|
Example payload for a repository-wide validation:
|
|
@@ -209,7 +355,8 @@ Example payload for a repository-wide validation:
|
|
|
209
355
|
"repo_path": "/path/to/repo",
|
|
210
356
|
"include_message": true,
|
|
211
357
|
"include_branch": true,
|
|
212
|
-
"include_author": true
|
|
358
|
+
"include_author": true,
|
|
359
|
+
"include_push": true
|
|
213
360
|
}
|
|
214
361
|
```
|
|
215
362
|
|
|
@@ -219,3 +366,16 @@ Config precedence is:
|
|
|
219
366
|
2. repository config loaded from `repo_path`
|
|
220
367
|
3. `config_path` when explicitly provided
|
|
221
368
|
4. inline `config` overrides passed to the tool
|
|
369
|
+
|
|
370
|
+
## Published On
|
|
371
|
+
|
|
372
|
+
| Directory | Link |
|
|
373
|
+
|---|---|
|
|
374
|
+
| **Official MCP Registry** | [`io.github.commit-check/commit-check-mcp`](https://registry.modelcontextprotocol.io/) |
|
|
375
|
+
| **Glama.ai** | [`github/commit-check/commit-check-mcp`](https://glama.ai/mcp/servers/github/commit-check/commit-check-mcp) |
|
|
376
|
+
| **PyPI** | [`commit-check-mcp`](https://pypi.org/project/commit-check-mcp/) |
|
|
377
|
+
|
|
378
|
+
To also add this server to your preferred directory, open a pull request at:
|
|
379
|
+
|
|
380
|
+
- [punkpeye/awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers) — community-maintained list
|
|
381
|
+
- [Smithery.ai](https://smithery.ai/) — hosted MCP server registry
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# commit-check-mcp
|
|
2
2
|
|
|
3
|
+
mcp-name: io.github.commit-check/commit-check-mcp
|
|
4
|
+
|
|
3
5
|
[](https://pypi.org/project/commit-check-mcp/)
|
|
4
6
|
[](https://pypi.org/project/commit-check-mcp/)
|
|
5
7
|
[](https://github.com/commit-check/commit-check-mcp/actions/workflows/main.yml)
|
|
6
8
|
[](https://codecov.io/gh/commit-check/commit-check-mcp)
|
|
7
9
|
[](https://modelcontextprotocol.io/)
|
|
10
|
+
[](https://registry.modelcontextprotocol.io/)
|
|
11
|
+
[](https://glama.ai/mcp/servers/github/commit-check/commit-check-mcp)
|
|
8
12
|
|
|
9
13
|
Model Context Protocol (MCP) server for [commit-check](https://github.com/commit-check/commit-check).
|
|
10
14
|
|
|
11
|
-
`commit-check-mcp` exposes `commit-check` as local MCP tools so an MCP client can validate commit messages, branch names, author info, and repository state.
|
|
15
|
+
`commit-check-mcp` exposes `commit-check` as local MCP tools so an MCP client can validate commit messages, branch names, author info, push safety, and repository state.
|
|
12
16
|
|
|
13
17
|
## Features
|
|
14
18
|
|
|
@@ -17,9 +21,10 @@ This MCP server exposes commit-check validations as MCP tools:
|
|
|
17
21
|
- `server_health` — returns server/sdk versions
|
|
18
22
|
- `validate_commit_message` — validates a commit message
|
|
19
23
|
- `validate_branch_name` — validates a branch name or the current repo branch
|
|
24
|
+
- `validate_push_safety` — validates that a push is not a force push
|
|
20
25
|
- `validate_author_info` — validates author name/email or the repo's git author config
|
|
21
26
|
- `validate_commit_context` — runs combined checks in one call
|
|
22
|
-
- `validate_repository_state` — validates latest commit, current branch,
|
|
27
|
+
- `validate_repository_state` — validates latest commit, current branch, author state, and optional push safety for a repo
|
|
23
28
|
- `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config
|
|
24
29
|
|
|
25
30
|
All validation tools return the same structured commit-check result shape:
|
|
@@ -57,44 +62,174 @@ pip install -e .
|
|
|
57
62
|
|
|
58
63
|
This server runs over stdio, so it is meant to be launched by an MCP client rather than used as a long-running HTTP service.
|
|
59
64
|
|
|
60
|
-
|
|
65
|
+
With `uvx` (recommended — no install needed):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Run once, no pip install required
|
|
69
|
+
uvx commit-check-mcp
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
> **Tip**: If `uv` is not installed, get it via `curl -LsSf https://astral.sh/uv/install.sh | sh`.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### Claude Desktop
|
|
61
77
|
|
|
62
78
|
```json
|
|
63
79
|
{
|
|
64
80
|
"mcpServers": {
|
|
65
81
|
"commit-check": {
|
|
66
|
-
"command": "
|
|
82
|
+
"command": "uvx",
|
|
83
|
+
"args": ["commit-check-mcp"]
|
|
67
84
|
}
|
|
68
85
|
}
|
|
69
86
|
}
|
|
70
87
|
```
|
|
71
88
|
|
|
72
|
-
|
|
89
|
+
### Claude Code CLI
|
|
73
90
|
|
|
74
|
-
```
|
|
75
|
-
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"mcpServers": {
|
|
94
|
+
"commit-check": {
|
|
95
|
+
"command": "uvx",
|
|
96
|
+
"args": ["commit-check-mcp"]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Add to your `~/.claude/settings.json` or project-level `.claude/settings.local.json`.
|
|
103
|
+
|
|
104
|
+
### Cursor
|
|
105
|
+
|
|
106
|
+
In Cursor, go to **Settings → Cursor Settings → MCP → Add new MCP server** and paste:
|
|
107
|
+
|
|
108
|
+
| Field | Value |
|
|
109
|
+
|---|---|
|
|
110
|
+
| **Name** | `commit-check` |
|
|
111
|
+
| **Type** | `command` |
|
|
112
|
+
| **Command** | `uvx commit-check-mcp` |
|
|
113
|
+
|
|
114
|
+
Or add to your project's `.cursor/mcp.json`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"commit-check": {
|
|
120
|
+
"command": "uvx",
|
|
121
|
+
"args": ["commit-check-mcp"]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Windsurf
|
|
128
|
+
|
|
129
|
+
Add to your `~/.codeium/windsurf/mcp_config.json`:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mcpServers": {
|
|
134
|
+
"commit-check": {
|
|
135
|
+
"command": "uvx",
|
|
136
|
+
"args": ["commit-check-mcp"]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Cline (VS Code)
|
|
143
|
+
|
|
144
|
+
Add a new MCP server in the Cline extension settings:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"mcpServers": {
|
|
149
|
+
"commit-check": {
|
|
150
|
+
"command": "uvx",
|
|
151
|
+
"args": ["commit-check-mcp"]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
76
155
|
```
|
|
77
156
|
|
|
78
|
-
|
|
157
|
+
### Continue.dev (VS Code / JetBrains)
|
|
79
158
|
|
|
80
|
-
|
|
159
|
+
Add to your `~/.continue/config.json`:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"experimental": {
|
|
164
|
+
"mcpServers": {
|
|
165
|
+
"commit-check": {
|
|
166
|
+
"command": "uvx",
|
|
167
|
+
"args": ["commit-check-mcp"]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Roo Code
|
|
175
|
+
|
|
176
|
+
Add to your Roo Code MCP settings:
|
|
81
177
|
|
|
82
178
|
```json
|
|
83
179
|
{
|
|
84
180
|
"mcpServers": {
|
|
85
181
|
"commit-check": {
|
|
86
|
-
"command": "
|
|
182
|
+
"command": "uvx",
|
|
183
|
+
"args": ["commit-check-mcp"]
|
|
87
184
|
}
|
|
88
185
|
}
|
|
89
186
|
}
|
|
90
187
|
```
|
|
91
188
|
|
|
92
|
-
|
|
189
|
+
### Zed
|
|
190
|
+
|
|
191
|
+
Add to your `~/.config/zed/settings.json`:
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"mcp_servers": {
|
|
196
|
+
"commit-check": {
|
|
197
|
+
"command": "uvx",
|
|
198
|
+
"args": ["commit-check-mcp"]
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Generic / Any MCP Client
|
|
205
|
+
|
|
206
|
+
If your client does not support `uvx`, use `pip` and the direct path:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
pip install commit-check-mcp
|
|
210
|
+
which commit-check-mcp
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Then use the absolute path in your config:
|
|
214
|
+
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"mcpServers": {
|
|
218
|
+
"commit-check": {
|
|
219
|
+
"command": "/path/to/commit-check-mcp"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
```
|
|
93
224
|
|
|
94
225
|
## Run Manually
|
|
95
226
|
|
|
96
227
|
```bash
|
|
228
|
+
# If installed via pip
|
|
97
229
|
commit-check-mcp
|
|
230
|
+
|
|
231
|
+
# Or via uvx (no install needed)
|
|
232
|
+
uvx commit-check-mcp
|
|
98
233
|
```
|
|
99
234
|
|
|
100
235
|
The server uses stdio transport, which is the recommended MCP default for local tool integrations.
|
|
@@ -106,9 +241,10 @@ After the client starts the server, it will expose these tools:
|
|
|
106
241
|
- `server_health`: returns server, SDK, and dependency versions
|
|
107
242
|
- `validate_commit_message(message, config?, repo_path?, config_path?)`
|
|
108
243
|
- `validate_branch_name(branch?, config?, repo_path?, config_path?)`
|
|
244
|
+
- `validate_push_safety(push_refs?, config?, repo_path?, config_path?)`
|
|
109
245
|
- `validate_author_info(author_name?, author_email?, config?, repo_path?, config_path?)`
|
|
110
246
|
- `validate_commit_context(message?, branch?, author_name?, author_email?, config?, repo_path?, config_path?)`
|
|
111
|
-
- `validate_repository_state(repo_path?, config?, config_path?, include_message?, include_branch?, include_author?)`
|
|
247
|
+
- `validate_repository_state(repo_path?, config?, config_path?, include_message?, include_branch?, include_author?, include_push?)`
|
|
112
248
|
- `describe_validation_rules(config?, repo_path?, config_path?)`
|
|
113
249
|
|
|
114
250
|
The common optional arguments are:
|
|
@@ -148,6 +284,15 @@ Validate the full repository state:
|
|
|
148
284
|
}
|
|
149
285
|
```
|
|
150
286
|
|
|
287
|
+
Validate push safety from git pre-push hook ref metadata:
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"repo_path": "/path/to/repo",
|
|
292
|
+
"push_refs": "refs/heads/main abc123 refs/heads/main def456"
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
151
296
|
Inspect the final merged rules that will be applied:
|
|
152
297
|
|
|
153
298
|
```json
|
|
@@ -173,6 +318,7 @@ Typical patterns:
|
|
|
173
318
|
|
|
174
319
|
- Validate an explicit message with a repository's rules
|
|
175
320
|
- Validate the current repository state without passing message/branch/author values manually
|
|
321
|
+
- Validate push safety using pre-push ref metadata, or check the current branch against its upstream
|
|
176
322
|
- Inspect which rules are actually enabled after config merging
|
|
177
323
|
|
|
178
324
|
Example payload for a repository-wide validation:
|
|
@@ -182,7 +328,8 @@ Example payload for a repository-wide validation:
|
|
|
182
328
|
"repo_path": "/path/to/repo",
|
|
183
329
|
"include_message": true,
|
|
184
330
|
"include_branch": true,
|
|
185
|
-
"include_author": true
|
|
331
|
+
"include_author": true,
|
|
332
|
+
"include_push": true
|
|
186
333
|
}
|
|
187
334
|
```
|
|
188
335
|
|
|
@@ -192,3 +339,16 @@ Config precedence is:
|
|
|
192
339
|
2. repository config loaded from `repo_path`
|
|
193
340
|
3. `config_path` when explicitly provided
|
|
194
341
|
4. inline `config` overrides passed to the tool
|
|
342
|
+
|
|
343
|
+
## Published On
|
|
344
|
+
|
|
345
|
+
| Directory | Link |
|
|
346
|
+
|---|---|
|
|
347
|
+
| **Official MCP Registry** | [`io.github.commit-check/commit-check-mcp`](https://registry.modelcontextprotocol.io/) |
|
|
348
|
+
| **Glama.ai** | [`github/commit-check/commit-check-mcp`](https://glama.ai/mcp/servers/github/commit-check/commit-check-mcp) |
|
|
349
|
+
| **PyPI** | [`commit-check-mcp`](https://pypi.org/project/commit-check-mcp/) |
|
|
350
|
+
|
|
351
|
+
To also add this server to your preferred directory, open a pull request at:
|
|
352
|
+
|
|
353
|
+
- [punkpeye/awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers) — community-maintained list
|
|
354
|
+
- [Smithery.ai](https://smithery.ai/) — hosted MCP server registry
|
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Topic :: Software Development",
|
|
26
26
|
]
|
|
27
27
|
dependencies = [
|
|
28
|
-
"commit-check>=2.
|
|
28
|
+
"commit-check>=2.7.0,<3",
|
|
29
29
|
"mcp>=1.27.0,<2"
|
|
30
30
|
]
|
|
31
31
|
dynamic = ["version"]
|
|
@@ -33,7 +33,7 @@ dynamic = ["version"]
|
|
|
33
33
|
[project.optional-dependencies]
|
|
34
34
|
dev = [
|
|
35
35
|
"pytest>=9.0.0,<10",
|
|
36
|
-
"pytest-cov>=6.0.0,<
|
|
36
|
+
"pytest-cov>=6.0.0,<8"
|
|
37
37
|
]
|
|
38
38
|
|
|
39
39
|
[project.scripts]
|