commit-check-mcp 0.1.1.post1.dev1__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.
@@ -0,0 +1,22 @@
1
+ name: PR Autolabeler
2
+
3
+ on:
4
+ pull_request_target:
5
+ types:
6
+ - opened
7
+ - reopened
8
+ - synchronize
9
+ - edited
10
+
11
+ permissions:
12
+ contents: read
13
+ pull-requests: write
14
+
15
+ jobs:
16
+ labeler:
17
+ runs-on: ubuntu-24.04
18
+ steps:
19
+ - uses: actions/labeler@v5
20
+ with:
21
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
22
+ sync-labels: true
@@ -0,0 +1,63 @@
1
+ name: main
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ paths:
9
+ - "**.py"
10
+ - "pyproject.toml"
11
+ - "README.md"
12
+ - ".github/workflows/**"
13
+ - ".github/*.yml"
14
+ workflow_dispatch:
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+ runs-on: ubuntu-24.04
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
26
+ steps:
27
+ - uses: actions/checkout@v6
28
+ - uses: actions/setup-python@v6
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ python -m pip install --upgrade pip
35
+ python -m pip install -e .[dev]
36
+
37
+ - name: Run tests
38
+ run: python -m pytest -q
39
+
40
+ build:
41
+ runs-on: ubuntu-24.04
42
+ steps:
43
+ - uses: actions/checkout@v6
44
+ - uses: actions/setup-python@v6
45
+ with:
46
+ python-version: "3.12"
47
+
48
+ - name: Install build tooling
49
+ run: |
50
+ python -m pip install --upgrade pip
51
+ python -m pip install build twine
52
+
53
+ - name: Build distributions
54
+ run: python -m build
55
+
56
+ - name: Check distributions
57
+ run: python -m twine check dist/*
58
+
59
+ - name: Upload distributions
60
+ uses: actions/upload-artifact@v4
61
+ with:
62
+ name: dist
63
+ path: dist/*
@@ -0,0 +1,74 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ attestations: write
11
+
12
+ jobs:
13
+ build:
14
+ name: Build distributions
15
+ runs-on: ubuntu-24.04
16
+ permissions:
17
+ contents: read
18
+ attestations: write
19
+ id-token: write
20
+ outputs:
21
+ artifact-name: python-package-distributions
22
+ steps:
23
+ - uses: actions/checkout@v6
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - uses: actions/setup-python@v6
28
+ with:
29
+ python-version: "3.12"
30
+
31
+ - name: Install build tooling
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ python -m pip install --upgrade build twine pkginfo
35
+
36
+ - name: Build distributions
37
+ run: python -m build
38
+
39
+ - name: Check distributions
40
+ run: python -m twine check dist/*
41
+
42
+ - name: Verify wheel install
43
+ run: |
44
+ python -m pip install dist/*.whl
45
+ commit-check-mcp --help
46
+
47
+ - name: Upload distributions
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: python-package-distributions
51
+ path: dist/*
52
+
53
+ - name: Create attestations
54
+ uses: actions/attest-build-provenance@v3
55
+ with:
56
+ subject-path: dist/*
57
+
58
+ publish:
59
+ name: Publish to PyPI
60
+ needs: build
61
+ runs-on: ubuntu-24.04
62
+ environment: pypi
63
+ permissions:
64
+ contents: read
65
+ id-token: write
66
+ steps:
67
+ - name: Download distributions
68
+ uses: actions/download-artifact@v4
69
+ with:
70
+ name: python-package-distributions
71
+ path: dist
72
+
73
+ - name: Publish to PyPI
74
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,16 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "main"
7
+ workflow_dispatch:
8
+
9
+ permissions: {}
10
+
11
+ jobs:
12
+ draft-release:
13
+ permissions:
14
+ contents: write
15
+ pull-requests: read
16
+ uses: commit-check/.github/.github/workflows/release-drafter.yml@main
@@ -0,0 +1,207 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Commit Check
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,86 @@
1
+ Metadata-Version: 2.4
2
+ Name: commit-check-mcp
3
+ Version: 0.1.1.post1.dev1
4
+ Summary: MCP server exposing commit-check validation tools
5
+ Author: commit-check
6
+ License: MIT
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: commit-check<3,>=2.5.0
11
+ Requires-Dist: mcp<2,>=1.27.0
12
+ Provides-Extra: dev
13
+ Requires-Dist: pytest<10,>=9.0.0; extra == "dev"
14
+ Dynamic: license-file
15
+
16
+ # commit-check-mcp
17
+
18
+ Model Context Protocol (MCP) server for [commit-check](https://github.com/commit-check/commit-check).
19
+
20
+ ## Features
21
+
22
+ This MCP server exposes commit-check validations as MCP tools:
23
+
24
+ - `server_health` — returns server/sdk versions
25
+ - `validate_commit_message` — validates a commit message
26
+ - `validate_branch_name` — validates a branch name or the current repo branch
27
+ - `validate_author_info` — validates author name/email or the repo's git author config
28
+ - `validate_commit_context` — runs combined checks in one call
29
+ - `validate_repository_state` — validates latest commit, current branch, and author state for a repo
30
+ - `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config
31
+
32
+ All validation tools return the same structured commit-check result shape:
33
+
34
+ ```json
35
+ {
36
+ "status": "pass|fail",
37
+ "checks": [
38
+ {
39
+ "check": "message",
40
+ "status": "pass|fail",
41
+ "value": "...",
42
+ "error": "...",
43
+ "suggest": "..."
44
+ }
45
+ ]
46
+ }
47
+ ```
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ pip install -e .
53
+ ```
54
+
55
+ ## Run
56
+
57
+ ```bash
58
+ commit-check-mcp
59
+ ```
60
+
61
+ The server runs over stdio transport (recommended MCP default for local tool integrations).
62
+
63
+ ## Repository-Aware Validation
64
+
65
+ `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:
66
+
67
+ - `repo_path` — run git-based validations against a specific repository
68
+ - `config_path` — point to an explicit TOML config file; relative paths are resolved from `repo_path`
69
+ - `config` — apply ad-hoc overrides on top of defaults and repo config
70
+
71
+ Typical patterns:
72
+
73
+ - Validate an explicit message with a repository's rules
74
+ - Validate the current repository state without passing message/branch/author values manually
75
+ - Inspect which rules are actually enabled after config merging
76
+
77
+ Example payload for a repository-wide validation:
78
+
79
+ ```json
80
+ {
81
+ "repo_path": "/path/to/repo",
82
+ "include_message": true,
83
+ "include_branch": true,
84
+ "include_author": true
85
+ }
86
+ ```
@@ -0,0 +1,71 @@
1
+ # commit-check-mcp
2
+
3
+ Model Context Protocol (MCP) server for [commit-check](https://github.com/commit-check/commit-check).
4
+
5
+ ## Features
6
+
7
+ This MCP server exposes commit-check validations as MCP tools:
8
+
9
+ - `server_health` — returns server/sdk versions
10
+ - `validate_commit_message` — validates a commit message
11
+ - `validate_branch_name` — validates a branch name or the current repo branch
12
+ - `validate_author_info` — validates author name/email or the repo's git author config
13
+ - `validate_commit_context` — runs combined checks in one call
14
+ - `validate_repository_state` — validates latest commit, current branch, and author state for a repo
15
+ - `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config
16
+
17
+ All validation tools return the same structured commit-check result shape:
18
+
19
+ ```json
20
+ {
21
+ "status": "pass|fail",
22
+ "checks": [
23
+ {
24
+ "check": "message",
25
+ "status": "pass|fail",
26
+ "value": "...",
27
+ "error": "...",
28
+ "suggest": "..."
29
+ }
30
+ ]
31
+ }
32
+ ```
33
+
34
+ ## Install
35
+
36
+ ```bash
37
+ pip install -e .
38
+ ```
39
+
40
+ ## Run
41
+
42
+ ```bash
43
+ commit-check-mcp
44
+ ```
45
+
46
+ The server runs over stdio transport (recommended MCP default for local tool integrations).
47
+
48
+ ## Repository-Aware Validation
49
+
50
+ `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:
51
+
52
+ - `repo_path` — run git-based validations against a specific repository
53
+ - `config_path` — point to an explicit TOML config file; relative paths are resolved from `repo_path`
54
+ - `config` — apply ad-hoc overrides on top of defaults and repo config
55
+
56
+ Typical patterns:
57
+
58
+ - Validate an explicit message with a repository's rules
59
+ - Validate the current repository state without passing message/branch/author values manually
60
+ - Inspect which rules are actually enabled after config merging
61
+
62
+ Example payload for a repository-wide validation:
63
+
64
+ ```json
65
+ {
66
+ "repo_path": "/path/to/repo",
67
+ "include_message": true,
68
+ "include_branch": true,
69
+ "include_author": true
70
+ }
71
+ ```
@@ -0,0 +1,40 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "setuptools-scm", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "commit-check-mcp"
7
+ description = "MCP server exposing commit-check validation tools"
8
+ readme = "README.md"
9
+ requires-python = ">=3.10"
10
+ license = { text = "MIT" }
11
+ authors = [
12
+ { name = "commit-check" }
13
+ ]
14
+ dependencies = [
15
+ "commit-check>=2.5.0,<3",
16
+ "mcp>=1.27.0,<2"
17
+ ]
18
+ dynamic = ["version"]
19
+
20
+ [project.optional-dependencies]
21
+ dev = [
22
+ "pytest>=9.0.0,<10"
23
+ ]
24
+
25
+ [project.scripts]
26
+ commit-check-mcp = "commit_check_mcp.server:main"
27
+
28
+ [tool.setuptools]
29
+ package-dir = {"" = "src"}
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["src"]
33
+
34
+ [tool.setuptools_scm]
35
+ version_scheme = "no-guess-dev"
36
+ local_scheme = "no-local-version"
37
+ fallback_version = "0.0.0"
38
+
39
+ [tool.pytest.ini_options]
40
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,6 @@
1
+ """commit-check-mcp package."""
2
+
3
+ from importlib.metadata import version
4
+
5
+ __all__ = ["__version__"]
6
+ __version__ = version("commit-check-mcp")