commit-check-mcp 0.1.1.post1.dev1__tar.gz → 0.1.3__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.
Files changed (25) hide show
  1. commit_check_mcp-0.1.3/.github/dependabot.yml +23 -0
  2. commit_check_mcp-0.1.3/.github/workflows/labeler.yml +14 -0
  3. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/.github/workflows/main.yml +9 -1
  4. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/.github/workflows/release-drafter.yml +1 -1
  5. commit_check_mcp-0.1.3/PKG-INFO +221 -0
  6. commit_check_mcp-0.1.3/README.md +194 -0
  7. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/pyproject.toml +17 -3
  8. commit_check_mcp-0.1.3/src/commit_check_mcp.egg-info/PKG-INFO +221 -0
  9. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/src/commit_check_mcp.egg-info/SOURCES.txt +2 -0
  10. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/src/commit_check_mcp.egg-info/requires.txt +1 -0
  11. commit_check_mcp-0.1.3/uv.lock +1073 -0
  12. commit_check_mcp-0.1.1.post1.dev1/.github/workflows/labeler.yml +0 -22
  13. commit_check_mcp-0.1.1.post1.dev1/PKG-INFO +0 -86
  14. commit_check_mcp-0.1.1.post1.dev1/README.md +0 -71
  15. commit_check_mcp-0.1.1.post1.dev1/src/commit_check_mcp.egg-info/PKG-INFO +0 -86
  16. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/.github/workflows/publish.yml +0 -0
  17. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/.gitignore +0 -0
  18. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/LICENSE +0 -0
  19. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/setup.cfg +0 -0
  20. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/src/commit_check_mcp/__init__.py +0 -0
  21. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/src/commit_check_mcp/server.py +0 -0
  22. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/src/commit_check_mcp.egg-info/dependency_links.txt +0 -0
  23. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/src/commit_check_mcp.egg-info/entry_points.txt +0 -0
  24. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/src/commit_check_mcp.egg-info/top_level.txt +0 -0
  25. {commit_check_mcp-0.1.1.post1.dev1 → commit_check_mcp-0.1.3}/tests/test_server.py +0 -0
@@ -0,0 +1,23 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: github-actions
9
+ directory: /
10
+ schedule:
11
+ interval: "monthly"
12
+ groups:
13
+ github-actions:
14
+ patterns:
15
+ - "*"
16
+ - package-ecosystem: pip
17
+ directory: /
18
+ schedule:
19
+ interval: "monthly"
20
+ groups:
21
+ pip:
22
+ patterns:
23
+ - "*"
@@ -0,0 +1,14 @@
1
+ name: PR Autolabeler
2
+
3
+ permissions:
4
+ contents: write
5
+ pull-requests: write
6
+
7
+ on:
8
+ # pull_request event is required for autolabeler
9
+ pull_request:
10
+ types: [opened, reopened, synchronize]
11
+
12
+ jobs:
13
+ draft-release:
14
+ uses: commit-check/.github/.github/workflows/pr-labeler.yml@main
@@ -35,7 +35,15 @@ jobs:
35
35
  python -m pip install -e .[dev]
36
36
 
37
37
  - name: Run tests
38
- run: python -m pytest -q
38
+ run: python -m pytest -q --cov=src/commit_check_mcp --cov-report=xml
39
+
40
+ - name: Upload coverage reports to Codecov
41
+ if: matrix.python-version == '3.12'
42
+ uses: codecov/codecov-action@v5
43
+ with:
44
+ token: ${{ secrets.CODECOV_TOKEN }}
45
+ slug: commit-check/commit-check-mcp
46
+ files: ./coverage.xml
39
47
 
40
48
  build:
41
49
  runs-on: ubuntu-24.04
@@ -12,5 +12,5 @@ jobs:
12
12
  draft-release:
13
13
  permissions:
14
14
  contents: write
15
- pull-requests: read
15
+ pull-requests: write
16
16
  uses: commit-check/.github/.github/workflows/release-drafter.yml@main
@@ -0,0 +1,221 @@
1
+ Metadata-Version: 2.4
2
+ Name: commit-check-mcp
3
+ Version: 0.1.3
4
+ Summary: MCP server exposing commit-check validation tools
5
+ Author-email: Xianpeng Shen <xianpeng.shen@gmail.com>
6
+ License: MIT
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Software Development
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: commit-check<3,>=2.5.0
22
+ Requires-Dist: mcp<2,>=1.27.0
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest<10,>=9.0.0; extra == "dev"
25
+ Requires-Dist: pytest-cov<7,>=6.0.0; extra == "dev"
26
+ Dynamic: license-file
27
+
28
+ # commit-check-mcp
29
+
30
+ [![PyPI version](https://img.shields.io/pypi/v/commit-check-mcp)](https://pypi.org/project/commit-check-mcp/)
31
+ [![Python versions](https://img.shields.io/pypi/pyversions/commit-check-mcp)](https://pypi.org/project/commit-check-mcp/)
32
+ [![Build](https://github.com/commit-check/commit-check-mcp/actions/workflows/main.yml/badge.svg)](https://github.com/commit-check/commit-check-mcp/actions/workflows/main.yml)
33
+ [![Coverage](https://codecov.io/gh/commit-check/commit-check-mcp/graph/badge.svg)](https://codecov.io/gh/commit-check/commit-check-mcp)
34
+ [![MCP server](https://img.shields.io/badge/MCP-server-0A7B83)](https://modelcontextprotocol.io/)
35
+
36
+ Model Context Protocol (MCP) server for [commit-check](https://github.com/commit-check/commit-check).
37
+
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.
39
+
40
+ ## Features
41
+
42
+ This MCP server exposes commit-check validations as MCP tools:
43
+
44
+ - `server_health` — returns server/sdk versions
45
+ - `validate_commit_message` — validates a commit message
46
+ - `validate_branch_name` — validates a branch name or the current repo branch
47
+ - `validate_author_info` — validates author name/email or the repo's git author config
48
+ - `validate_commit_context` — runs combined checks in one call
49
+ - `validate_repository_state` — validates latest commit, current branch, and author state for a repo
50
+ - `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config
51
+
52
+ All validation tools return the same structured commit-check result shape:
53
+
54
+ ```json
55
+ {
56
+ "status": "pass|fail",
57
+ "checks": [
58
+ {
59
+ "check": "message",
60
+ "status": "pass|fail",
61
+ "value": "...",
62
+ "error": "...",
63
+ "suggest": "..."
64
+ }
65
+ ]
66
+ }
67
+ ```
68
+
69
+ ## Installation
70
+
71
+ ```bash
72
+ pip install commit-check-mcp
73
+ ```
74
+
75
+ This installs the `commit-check-mcp` CLI entrypoint.
76
+
77
+ For local development from this repository:
78
+
79
+ ```bash
80
+ pip install -e .
81
+ ```
82
+
83
+ ## Use With An MCP Client
84
+
85
+ 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
+
87
+ Generic MCP client config:
88
+
89
+ ```json
90
+ {
91
+ "mcpServers": {
92
+ "commit-check": {
93
+ "command": "commit-check-mcp"
94
+ }
95
+ }
96
+ }
97
+ ```
98
+
99
+ If the client needs the full path to the executable, first locate it:
100
+
101
+ ```bash
102
+ which commit-check-mcp
103
+ ```
104
+
105
+ Then use that absolute path in the client config.
106
+
107
+ Example using an absolute path:
108
+
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "commit-check": {
113
+ "command": "/absolute/path/to/commit-check-mcp"
114
+ }
115
+ }
116
+ }
117
+ ```
118
+
119
+ For local development from this repository, that absolute path may point to something like `.venv/bin/commit-check-mcp`.
120
+
121
+ ## Run Manually
122
+
123
+ ```bash
124
+ commit-check-mcp
125
+ ```
126
+
127
+ The server uses stdio transport, which is the recommended MCP default for local tool integrations.
128
+
129
+ ## Tool Usage
130
+
131
+ After the client starts the server, it will expose these tools:
132
+
133
+ - `server_health`: returns server, SDK, and dependency versions
134
+ - `validate_commit_message(message, config?, repo_path?, config_path?)`
135
+ - `validate_branch_name(branch?, config?, repo_path?, config_path?)`
136
+ - `validate_author_info(author_name?, author_email?, config?, repo_path?, config_path?)`
137
+ - `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?)`
139
+ - `describe_validation_rules(config?, repo_path?, config_path?)`
140
+
141
+ The common optional arguments are:
142
+
143
+ - `repo_path`: repository directory to validate against
144
+ - `config_path`: explicit TOML config file; relative paths resolve from `repo_path`
145
+ - `config`: ad-hoc config overrides merged on top of defaults and repo config
146
+
147
+ ## Common Examples
148
+
149
+ Validate a commit message using repo-local rules:
150
+
151
+ ```json
152
+ {
153
+ "message": "feat(api): add MCP validation tool",
154
+ "repo_path": "/path/to/repo"
155
+ }
156
+ ```
157
+
158
+ Validate the current repository branch using an explicit config file:
159
+
160
+ ```json
161
+ {
162
+ "repo_path": "/path/to/repo",
163
+ "config_path": ".github/commit-check.toml"
164
+ }
165
+ ```
166
+
167
+ Validate the full repository state:
168
+
169
+ ```json
170
+ {
171
+ "repo_path": "/path/to/repo",
172
+ "include_message": true,
173
+ "include_branch": true,
174
+ "include_author": true
175
+ }
176
+ ```
177
+
178
+ Inspect the final merged rules that will be applied:
179
+
180
+ ```json
181
+ {
182
+ "repo_path": "/path/to/repo",
183
+ "config": {
184
+ "commit": {
185
+ "require_body": true
186
+ }
187
+ }
188
+ }
189
+ ```
190
+
191
+ ## Repository-Aware Validation
192
+
193
+ `commit-check` is most useful when it runs against a real git repository and its `cchk.toml` or `commit-check.toml` file. This MCP server now supports that directly:
194
+
195
+ - `repo_path` — run git-based validations against a specific repository
196
+ - `config_path` — point to an explicit TOML config file; relative paths are resolved from `repo_path`
197
+ - `config` — apply ad-hoc overrides on top of defaults and repo config
198
+
199
+ Typical patterns:
200
+
201
+ - Validate an explicit message with a repository's rules
202
+ - Validate the current repository state without passing message/branch/author values manually
203
+ - Inspect which rules are actually enabled after config merging
204
+
205
+ Example payload for a repository-wide validation:
206
+
207
+ ```json
208
+ {
209
+ "repo_path": "/path/to/repo",
210
+ "include_message": true,
211
+ "include_branch": true,
212
+ "include_author": true
213
+ }
214
+ ```
215
+
216
+ Config precedence is:
217
+
218
+ 1. `commit-check` built-in defaults
219
+ 2. repository config loaded from `repo_path`
220
+ 3. `config_path` when explicitly provided
221
+ 4. inline `config` overrides passed to the tool
@@ -0,0 +1,194 @@
1
+ # commit-check-mcp
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/commit-check-mcp)](https://pypi.org/project/commit-check-mcp/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/commit-check-mcp)](https://pypi.org/project/commit-check-mcp/)
5
+ [![Build](https://github.com/commit-check/commit-check-mcp/actions/workflows/main.yml/badge.svg)](https://github.com/commit-check/commit-check-mcp/actions/workflows/main.yml)
6
+ [![Coverage](https://codecov.io/gh/commit-check/commit-check-mcp/graph/badge.svg)](https://codecov.io/gh/commit-check/commit-check-mcp)
7
+ [![MCP server](https://img.shields.io/badge/MCP-server-0A7B83)](https://modelcontextprotocol.io/)
8
+
9
+ Model Context Protocol (MCP) server for [commit-check](https://github.com/commit-check/commit-check).
10
+
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.
12
+
13
+ ## Features
14
+
15
+ This MCP server exposes commit-check validations as MCP tools:
16
+
17
+ - `server_health` — returns server/sdk versions
18
+ - `validate_commit_message` — validates a commit message
19
+ - `validate_branch_name` — validates a branch name or the current repo branch
20
+ - `validate_author_info` — validates author name/email or the repo's git author config
21
+ - `validate_commit_context` — runs combined checks in one call
22
+ - `validate_repository_state` — validates latest commit, current branch, and author state for a repo
23
+ - `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config
24
+
25
+ All validation tools return the same structured commit-check result shape:
26
+
27
+ ```json
28
+ {
29
+ "status": "pass|fail",
30
+ "checks": [
31
+ {
32
+ "check": "message",
33
+ "status": "pass|fail",
34
+ "value": "...",
35
+ "error": "...",
36
+ "suggest": "..."
37
+ }
38
+ ]
39
+ }
40
+ ```
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ pip install commit-check-mcp
46
+ ```
47
+
48
+ This installs the `commit-check-mcp` CLI entrypoint.
49
+
50
+ For local development from this repository:
51
+
52
+ ```bash
53
+ pip install -e .
54
+ ```
55
+
56
+ ## Use With An MCP Client
57
+
58
+ 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
+
60
+ Generic MCP client config:
61
+
62
+ ```json
63
+ {
64
+ "mcpServers": {
65
+ "commit-check": {
66
+ "command": "commit-check-mcp"
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ If the client needs the full path to the executable, first locate it:
73
+
74
+ ```bash
75
+ which commit-check-mcp
76
+ ```
77
+
78
+ Then use that absolute path in the client config.
79
+
80
+ Example using an absolute path:
81
+
82
+ ```json
83
+ {
84
+ "mcpServers": {
85
+ "commit-check": {
86
+ "command": "/absolute/path/to/commit-check-mcp"
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ For local development from this repository, that absolute path may point to something like `.venv/bin/commit-check-mcp`.
93
+
94
+ ## Run Manually
95
+
96
+ ```bash
97
+ commit-check-mcp
98
+ ```
99
+
100
+ The server uses stdio transport, which is the recommended MCP default for local tool integrations.
101
+
102
+ ## Tool Usage
103
+
104
+ After the client starts the server, it will expose these tools:
105
+
106
+ - `server_health`: returns server, SDK, and dependency versions
107
+ - `validate_commit_message(message, config?, repo_path?, config_path?)`
108
+ - `validate_branch_name(branch?, config?, repo_path?, config_path?)`
109
+ - `validate_author_info(author_name?, author_email?, config?, repo_path?, config_path?)`
110
+ - `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?)`
112
+ - `describe_validation_rules(config?, repo_path?, config_path?)`
113
+
114
+ The common optional arguments are:
115
+
116
+ - `repo_path`: repository directory to validate against
117
+ - `config_path`: explicit TOML config file; relative paths resolve from `repo_path`
118
+ - `config`: ad-hoc config overrides merged on top of defaults and repo config
119
+
120
+ ## Common Examples
121
+
122
+ Validate a commit message using repo-local rules:
123
+
124
+ ```json
125
+ {
126
+ "message": "feat(api): add MCP validation tool",
127
+ "repo_path": "/path/to/repo"
128
+ }
129
+ ```
130
+
131
+ Validate the current repository branch using an explicit config file:
132
+
133
+ ```json
134
+ {
135
+ "repo_path": "/path/to/repo",
136
+ "config_path": ".github/commit-check.toml"
137
+ }
138
+ ```
139
+
140
+ Validate the full repository state:
141
+
142
+ ```json
143
+ {
144
+ "repo_path": "/path/to/repo",
145
+ "include_message": true,
146
+ "include_branch": true,
147
+ "include_author": true
148
+ }
149
+ ```
150
+
151
+ Inspect the final merged rules that will be applied:
152
+
153
+ ```json
154
+ {
155
+ "repo_path": "/path/to/repo",
156
+ "config": {
157
+ "commit": {
158
+ "require_body": true
159
+ }
160
+ }
161
+ }
162
+ ```
163
+
164
+ ## Repository-Aware Validation
165
+
166
+ `commit-check` is most useful when it runs against a real git repository and its `cchk.toml` or `commit-check.toml` file. This MCP server now supports that directly:
167
+
168
+ - `repo_path` — run git-based validations against a specific repository
169
+ - `config_path` — point to an explicit TOML config file; relative paths are resolved from `repo_path`
170
+ - `config` — apply ad-hoc overrides on top of defaults and repo config
171
+
172
+ Typical patterns:
173
+
174
+ - Validate an explicit message with a repository's rules
175
+ - Validate the current repository state without passing message/branch/author values manually
176
+ - Inspect which rules are actually enabled after config merging
177
+
178
+ Example payload for a repository-wide validation:
179
+
180
+ ```json
181
+ {
182
+ "repo_path": "/path/to/repo",
183
+ "include_message": true,
184
+ "include_branch": true,
185
+ "include_author": true
186
+ }
187
+ ```
188
+
189
+ Config precedence is:
190
+
191
+ 1. `commit-check` built-in defaults
192
+ 2. repository config loaded from `repo_path`
193
+ 3. `config_path` when explicitly provided
194
+ 4. inline `config` overrides passed to the tool
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["setuptools>=77", "setuptools-scm", "wheel"]
2
+ requires = ["setuptools>=77", "setuptools-scm"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
@@ -9,7 +9,20 @@ readme = "README.md"
9
9
  requires-python = ">=3.10"
10
10
  license = { text = "MIT" }
11
11
  authors = [
12
- { name = "commit-check" }
12
+ { name = "Xianpeng Shen", email = "xianpeng.shen@gmail.com" }
13
+ ]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Programming Language :: Python :: 3.14",
25
+ "Topic :: Software Development",
13
26
  ]
14
27
  dependencies = [
15
28
  "commit-check>=2.5.0,<3",
@@ -19,7 +32,8 @@ dynamic = ["version"]
19
32
 
20
33
  [project.optional-dependencies]
21
34
  dev = [
22
- "pytest>=9.0.0,<10"
35
+ "pytest>=9.0.0,<10",
36
+ "pytest-cov>=6.0.0,<7"
23
37
  ]
24
38
 
25
39
  [project.scripts]