Git Polite

MCP server that autonomously organizes WIP changes into atomic commits and supports line-based staging for AI-assisted Git workflows.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "uneco-mcp-git-polite": {
      "command": "uv",
      "args": [
        "run",
        "git_polite.py",
        "mcp"
      ]
    }
  }
}

Git Polite MCP Server brings intelligent git staging to AI agents, letting you reorganize messy work in progress into clean, focused commits. It can also perform surgical, line-by-line staging for precise control, all through an MCP client workflow.

How to use

You run this MCP server to enable AI-assisted git staging with MCP clients. Start the server, then connect your MCP client to issue tools like listing changes, viewing complete diffs, applying selected changes, and initiating autopilot commits. The server handles text diffs, line-based selections, and range-based changes while respecting untracked files and binary-file detection.

  • Start autopilot mode to organize all changes into focused commits
  • View unstaged changes including untracked files
  • Stage changes by line numbers or ranges
  • View complete diffs for large files without truncation
  • Apply selected changes to the index (including partial staging of untracked files)

How to install

Prerequisites you need on your machine are Python 3.10 or higher and the ability to run the MCP server through the uv command. You should also have Git installed to work with the repository’s changes.

Install the required tooling and dependencies, then start the MCP server as described in the next steps.

uv sync

# Run tests (optional)
uv run pytest

# Format code (optional)
uv run black git_polite.py

# Type check (optional)
uv run mypy git_polite.py

# Start the MCP server in MCP mode
uv run git_polite.py mcp

Additional notes

The server exposes four MCP tools to interact with git changes. Use them in conjunction with an MCP client to automate or semi-automate your commit workflow.

Available tools

list_changes

List unstaged git changes (including untracked files) as numbered lines, with smart truncation for large diffs and pagination by bytes or files.

diff

View the complete diff for a single file without truncation, returning the same numbered line format as list_changes and including size information.

apply_changes

Apply selected changes to the git index by number, enabling partial staging of specific additions and deletions, including untracked files.

auto_commit

Start autopilot mode to organize all unstaged changes into focused, atomic commits, guided by recent commit messages for style consistency.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational