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

uv pip install mcp-git-training-wheels

From source

git clone https://github.com/yourusername/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.0.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.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_git_training_wheels-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 a8d6a82f92bc7cb4b2892c44e0d56c5494e868a1aff26e523b3d1c35c7cc9418
MD5 5499f9ade70299779776d47d4fd919b0
BLAKE2b-256 ebd55d5ef2a940774ee3b4eee38d3911e7b1be084490f8f21f44ff45d75ae327

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_git_training_wheels-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e083346d7612a3f630325f22001f45fb128db4a305363778ed80cc25a589e3bd
MD5 e9c857cd9285c3ed51e0adf89bd06e40
BLAKE2b-256 8551cc4e81bcfe67ad6b02d5a1342259cceae4a83bc4999d1c751c50287306d6

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