MCP Git Commit Generator
Analyzes Git repository changes to generate conventional commit messages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Git Commit Generator Generate a commit message for my staged changes."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A Python package implementing the Model Context Protocol (MCP) to generate meaningful Git commit messages by analyzing repository changes.
π Overview
MCP Git Commit Generator is a Python package that leverages the Model Context Protocol (MCP) to analyze your Git repository and generate conventional, context-aware commit messages. It supports multiple deployment modes and integrates seamlessly with DXT and MCP environments.
Related MCP server: Git Auto Commit MCP Server
π οΈ Tool Reference
For a complete list of available tools and their input schemas, see TOOLS.md.
π¦ Installation
Prerequisites
Python 3.11+ (with type hints)
UV Package Manager (Install UV) or use pip
Git (for repository operations)
Desktop Extensions (DXT) (Install DXT) for packaging .dxt files for Claude Desktop
Clone the Repository
git clone https://github.com/LuiccianDev/mcp_git_commit_generator.git
cd mcp_git_commit_generatorInstall in Development Mode
pip install -e .π Project Structure
mcp_git_commit_generator/
βββ src/
β βββ core/ # Core logic and utilities
β β βββ __init__.py
β βββ tools/ # MCP tool implementations
β β βββ __init__.py
β β βββ commit_analysis.py # Commit message generation logic
β β βββ git_operations.py # Git repository operations
β β βββ register_tools.py # Tool registration for MCP
β βββ __init__.py # Package metadata
β βββ __main__.py # CLI entry point
β βββ server.py # MCP server implementation
βββ tests/ # Unit and integration tests
β βββ test_commit_analysis.py
βββ manifest.json # DXT packaging manifest
βββ TOOLS.md # Tool reference documentation
βββREADME.md # Project documentationπ§ͺ Development
Setup Development Environment
Clone the repository and navigate to the project directory.
Install development dependencies:
pip install -e ".[dev]"Install pre-commit hooks:
pre-commit install
βοΈ Deployment Modes
MCP Git Commit Generator Server supports three deployment modes to fit different workflows and environments:
DXT Package Deployment
Recommended for: Users in the DXT ecosystem who want seamless configuration management.
Package the project:
dxt packUsage: Once packaged, the tool integrates directly with DXT-compatible clients with automatic user configuration variable substitution.
Server Configuration: This project includes manifest.json for building the .dxt package.
For more details, see DXT Package Documentation.
Traditional MCP Server
Recommended for: Standard MCP server deployments with existing MCP infrastructure.
Add to your MCP configuration file (e.g., Claude Desktop's mcp_config.json):
# Build packages
uv build
# Install packages
pip install dist/your_package*.whlThen configure MCP:
{
"mcpServers": {
"mcp_git_commit": {
"command": "uv",
"args": ["run", "mcp_git_commit"]
}
}
}Or use this configuration (less recommended):
{
"mcp-word": {
"command": "/Users/user/to/repo/.venv/Scripts/python",
"args": [
"/Users/user/to/repo/src/mcp_git_commit_generator/server.py"
]
}
}π€ Contributing
Contributions are welcome! Please read the contribution guidelines before submitting pull requests.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
15 toolsgenerate_commit_messageA
Analyses staged changes and produces a conventional commit message suggestion.
Reads staged diffs and file metadata to generate a commit message in the
format type(scope): description. The LLM should use the returned analysis
to craft the final message.
Inputs: repo_path (required), commit_type, scope, lite_mode. Returns: result
git_add_toolA
Adds file contents to the staging area.
Inputs: repo_path (required), files (required). Returns: result
git_branch_toolB
Lists Git branches (local, remote, or all).
Inputs: repo_path (required), branch_type, contains, not_contains. Returns: result
git_checkout_toolC
Switches to the specified branch.
Inputs: repo_path (required), branch_name (required). Returns: result
git_commit_toolB
Records staged changes to the repository with the given commit message.
Inputs: repo_path (required), message (required). Returns: result
git_create_branch_toolB
Creates a new branch from an optional base branch.
Inputs: repo_path (required), branch_name (required), base_branch. Returns: result
git_diff_staged_toolB
Shows changes that are staged for commit.
Inputs: repo_path (required), context_lines. Returns: result
git_diff_toolB
Shows differences between branches or commits.
Inputs: repo_path (required), target (required), context_lines. Returns: result
git_diff_unstaged_toolB
Shows changes in the working directory that are not yet staged.
Inputs: repo_path (required), context_lines. Returns: result
git_init_toolB
Initialises a new Git repository at the given path.
Inputs: repo_path (required). Returns: result
git_log_toolB
Shows the commit log of the repository.
Inputs: repo_path (required), max_count. Returns: result
git_optimized_statusA
Fast status check using GitPython β shows staged, unstaged, and untracked files.
Preferred over git_status_tool when you only need a quick overview
before deciding whether to generate a commit message.
Inputs: repo_path (required). Returns: result
git_reset_toolA
Unstages all staged changes (non-destructive β does not discard modifications).
Inputs: repo_path (required). Returns: result
git_show_toolB
Shows the metadata and diff of a specific commit.
Inputs: repo_path (required), revision (required). Returns: result
git_status_toolC
Shows the working tree status.
Inputs: repo_path (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 15 tools
Most tools are clearly distinct, but git_optimized_status and git_status_tool overlap in purpose; however, the description helps differentiate them. Diff tools are separated into staged/unstaged and general, which is clear.
All tools follow snake_case and most use the git_ prefix, but generate_commit_message lacks the prefix, and git_optimized_status deviates from the verb_noun pattern.
15 tools cover the essential Git commit generation workflow without being excessive. Each tool serves a distinct purpose in the pipeline.
The tool set provides full coverage for generating commits: staging, committing, status checks, diffs, branching, and history. No obvious gaps for the intended domain.
Maintenance
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.β¦
Generate changelogs, release emails, help-center articles, banners, and social posts from commits.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
AI-native git hosting β repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server for creating commit messages from git staged files.21MIT
- AlicenseNot gradedqualityDmaintenanceAnalyzes git changes in repositories and generates conventional commit messages using OpenAI's GPT models, supporting both staged and unstaged changes with detailed summaries.15MIT
- AlicenseBqualityBmaintenanceAutomatically generates conventional commit messages from staged git changes and checks repository status. Analyzes git diffs to create properly formatted commit messages following conventional commit standards.29MIT
- FlicenseBqualityDmaintenanceProvides comprehensive Git repository insights including author statistics, branch health, and code churn analysis. It enables users to perform data-driven assessments of their codebase and track development patterns through the Model Context Protocol.3-