Metadata-Version: 2.4
Name: mcp-git-training-wheels
Version: 0.1.1
Summary: MCP server providing a safer 'git commit' alternative
Project-URL: Homepage, https://github.com/lava/mcp-git-training-wheels
Project-URL: Issues, https://github.com/lava/mcp-git-training-wheels/issues
Author-email: Benno Evers <benno.martin.evers@gmail.com>
License: MIT
License-File: LICENSE
Keywords: git,mcp,model-context-protocol
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: git-revise>=0.7.0
Description-Content-Type: text/markdown

# 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

```bash
uvx mcp-git-training-wheels
```

### From source

```bash
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

```sh
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.

```json
{
  "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:**

```json
{
  "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:**

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