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.1.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.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_git_training_wheels-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 311b069632f1d84688ad96bfdf1f244175798b54159905739b299f081ecfd68d
MD5 242adbd604c3830ec91df105bc8c53e0
BLAKE2b-256 51317eabf7d9f467ef4f96d8b1601da0a18edce5c42ae3c68e6a400f3ba72c96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_git_training_wheels-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 394fd514a44ed7a90407c7a9f8e1862d4b322f509ed786d9feebe00ea44d550f
MD5 e342c368c048fb86742b416b4c35e8ad
BLAKE2b-256 3ea4857980f9cefcdbbe8f4334c9ec0b448ba9ee107b04272dabc092dbf05de1

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