Skip to main content

MCP server providing a safer 'git commit' alternative

Project description

MCP Git Training Wheels

LLMs try to please, but as the context window gets larger and larger, errors start to happen. In particular, current models have a tendency to just git add -a the whole source tree, accidentally adding lots of random stuff to their commits.

These issues become especially noticable when multiple agents are working on a codebase in parallel, or if you're doing quick fixes while an agent is working. And no current model has the ability to un-fuck a git history.

This MCP server gives the agent some training wheels for using git safely,. It ensures that only a specific named set of files can be committed, and also provides a convenient way to fixup earlier commits.

Installation

Using uv

uvx mcp-git-training-wheels

From source

git clone https://github.com/lava/mcp-git-training-wheels
cd mcp-git-training-wheels
uv pip install -e .

Usage

Add the following

Depending on your agent of choice, run something like the following

claude mcp add git-commit -- uvx mcp-git-training-wheels

or drop the following JSON into .mcp.json or any other location of your choice.

{
  "mcpServers": {
    "gtw": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-git-training-wheels"
      ],
      "env": {}
    }
  }
}

The specific command may change depending on your installation method.

Available Tools

git_commit

Commits specified files with a message and saves the commit information for later use.

Parameters:

  • files: List of file paths to commit
  • message: Commit message

Example:

{
  "tool": "git_commit",
  "parameters": {
    "files": ["src/main.py", "tests/test_main.py"],
    "message": "Add main functionality and tests"
  }
}

fixup_commit

Adds files to a previously created commit. If the commit is still HEAD, it uses git commit --amend. Otherwise, it uses the gitrevise module to edit the commit in history.

Parameters:

  • files: List of file paths to add to the commit

Example:

{
  "tool": "fixup_commit",
  "parameters": {
    "files": ["src/utils.py"]
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_git_training_wheels-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_git_training_wheels-0.1.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file mcp_git_training_wheels-0.1.2.tar.gz.

File metadata

  • Download URL: mcp_git_training_wheels-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mcp_git_training_wheels-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9e25fb668668fa066ff2a9efd37e1491a634f1de9d023e5ad2b3bb706c4225d5
MD5 5ead40653b5f55d4e4336de27865094b
BLAKE2b-256 a9587454a7b41242197c1e7ac6b64b8e4706d329ea715844c13ac9876453aa03

See more details on using hashes here.

File details

Details for the file mcp_git_training_wheels-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_git_training_wheels-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 31134d8ca58d1507d12f543736f589c51c7a8dffa230a655a424ef7f9547f52d
MD5 0f7616ac61c5e4e863f1011bc65e1249
BLAKE2b-256 2ba545f6fa839f6e2e9633e35fd7136ffaa43dbb8a60d35dcaa6ab2704530b12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page