git-auto-commit
Analyzes git repository changes to generate conventional commit messages and summaries using OpenAI's GPT-4o-mini. It provides detailed tracking of modified, added, and deleted files to streamline the version control process.
README
MCP Server to Auto commit changes š ļø
This implementation provides a Git changes analyzer that generates commit messages using OpenAI's GPT models.
<a href="https://glama.ai/mcp/servers/xm2dqoc1s6"> <img width="380" height="200" src="https://glama.ai/mcp/servers/xm2dqoc1s6/badge" alt="Git Auto Commit Server MCP server" /> </a>
Demo

Features
- Analyzes git changes in your repository (both staged and unstaged)
- Generates conventional commit messages using GPT-4o-mini
- Provides detailed summaries of:
- š Modified files
- ⨠Newly added files
- šļø Deleted files
- š Detailed changes (up to 10 lines per file)
- Built with @modelcontextprotocol/sdk
- Adds an auto-commit signature to each commit
Project Structure
mcp-server-auto-commit/
āāā index.ts # Main server implementation with git analysis tool
āāā package.json # Project dependencies
āāā tsconfig.json # TypeScript configuration
āāā build/ # Compiled JavaScript output
Prerequisites
- Node.js installed
- OpenAI API key
- Git repository to analyze
- pnpm package manager
Getting Started
- Clone this repository:
git clone https://github.com/jatinsandilya/mcp-server-auto-commit.git
cd mcp-server-auto-commit
- Install dependencies:
pnpm install
-
Set up your OpenAI API key using one of these methods:
- Set as an environment variable:
OPENAI_API_KEY=your-api-key - Pass as a command line argument:
--key your-api-key - Add to a
.envfile in the project root
- Set as an environment variable:
-
Build the project:
pnpm run build
This will generate the /build/index.js file - your compiled MCP server script.
Using with Cursor
- Go to Cursor Settings -> MCP -> Add new MCP server
- Configure your MCP:
- Name: git-auto-commit
- Type: command
- Command:
node ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js --key your-api-key(Replaceyour-api-keywith your actual OpenAI API key if not set in environment)
Using with Claude Desktop
Add the following MCP config to your Claude Desktop configuration:
{
"mcpServers": {
"git-auto-commit": {
"command": "node",
"args": ["ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js", "--key", "your-api-key"]
}
}
}
Available Tools
git-changes-commit-message
This tool analyzes the current git changes in your repository and generates a commit message using OpenAI's GPT-4o-mini model. It provides:
- List of modified files with status indicators
- List of newly added files
- List of deleted files
- Detailed changes for each file (limited to 10 lines per file for readability)
- A generated commit message following conventional commits format
- An auto-commit signature
Usage parameters:
autoCommitPath: Optional path to analyze specific directory/file. If not provided, uses current working directory.
Development
The implementation in index.ts showcases:
- Setting up the MCP server with proper configuration
- Handling command line arguments and environment variables
- Integrating with OpenAI's API using GPT-4o-mini model
- Git operations using child processes
- Error handling and fallback mechanisms
- Detailed change analysis and formatting
To modify or extend the implementation:
- Update the server configuration in
index.ts:
const server = new McpServer({
name: "git-auto-commit",
version: "0.0.1",
});
-
The tool is defined using
server.tool()with proper parameter validation using Zod schema. -
Build and test your changes:
pnpm run build
Contributing
Feel free to submit issues and enhancement requests!
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.