mcp-server-auto-commit

mcp-server-auto-commit

11

This project provides a Git changes analyzer that generates commit messages using OpenAI's GPT models, offering detailed file change summaries. The MCP server supports integration with tools like Cursor and Claude Desktop for enhanced automation in coding workflows.

MCP Server to Auto commit changes 🛠️

This project provides a Git changes analyzer that generates commit messages using OpenAI's GPT models. It analyzes git changes in your repository and generates conventional commit messages using GPT-4o-mini, providing detailed summaries of modified, newly added, and deleted files. Key features include integration with the @modelcontextprotocol/sdk, and automatic commit signatures.

Features

  • Analyzes both staged and unstaged git changes
  • Generates conventional commit messages
  • Detailed file change summaries

Prerequisites

  • Node.js
  • OpenAI API key
  • Git repository
  • pnpm package manager

Getting Started

  1. Clone the repository
  2. Install dependencies
  3. Set up OpenAI API key
  4. Build the project

Using with Cursor

  • Add a new MCP server with the command: node ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js --key your-api-key.

Using with Claude Desktop

  • Add the provided MCP config to your Claude Desktop configuration.

Available Tools

  • Analyzes git changes and generates commit messages with status indicators and detailed change information.

Development

  • Setup involves configuring the MCP server, handling arguments, and integrating with OpenAI's API.