Skip to main content

A Model Context Protocol server providing tools to read, search, and manipulate Git repositories programmatically via LLMs

Project description

mcp-git: A git MCP server

A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.

Please note that mcp-git is currently in early development. The functionality and available tools are subject to change and expansion as we continue to develop and improve the server.

Available Tools

The current list of tools includes:

  • git_read_file: Read contents of a file at a specific Git reference
  • git_list_files: List all files in a repository or subdirectory
  • git_file_history: Get commit history for a specific file
  • git_commit: Create Git commits with messages and specified files
  • git_search_code: Search repository content with pattern matching
  • git_get_diff: View diffs between Git references
  • git_get_repo_structure: View repository file structure
  • git_list_repos: List available Git repositories
  • git_log: Retrieve commit log for the repository
  • git_list_branches: List all branches in the repository
  • git_list_tags: List all tags in the repository

This list is expected to grow as we add more functionality to the server. We welcome contributions from the community to expand and enhance the available tools.

Installation

Using uv (recommended)

When using uv no specific installation is needed. We will use uvx to directly run mcp-git.

Using PIP

Alternatively you can install mcp-git via pip:

pip install mcp-git

After installation, you can run it as a script using:

python -m mcp_git

Configuration

Configure for Claude.app

Add to your Claude settings:

"mcpServers": {
  "mcp-git": {
    "command": "uvx",
    "args": ["mcp-git", "--repository", "path/to/git/repo"]
  }
}

Alternatively, if using pip installation:

"mcpServers": {
  "mcp-git": {
    "command": "python",
    "args": ["-m", "mcp_git", "--repository", "path/to/git/repo"]
  }
}

Configure for Zed

Add to your Zed settings.json:

"context_servers": [
  "mcp-git": {
    "command": "uvx",
    "args": ["mcp-git"]
  }
],

Alternatively, if using pip installation:

"context_servers": {
  "mcp-git": {
    "command": "python",
    "args": ["-m", "mcp-git"]
  }
},

Contributing

We encourage contributions to help expand and improve mcp-git. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.

For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers

Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-git even more powerful and useful.

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_server_git-0.2.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

mcp_server_git-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_git-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_server_git-0.2.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mcp_server_git-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e11e3336bb9a1ec59fbf0b1582c7e53a0087527ca98fc3ece81116645d88ca7
MD5 d95853009d81c11f35bf1e2af143bad2
BLAKE2b-256 ffff8036f4f332a89dd971a04a747c44f87144b9384d213d619a407abef40467

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_git-0.2.0.tar.gz:

Publisher: python.yml on modelcontextprotocol/servers

Attestations:

File details

Details for the file mcp_server_git-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_git-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15333c46e4948b0e5892b8d69b889a3a2075bb0e980f688fc8354f9f0dbc0469
MD5 0da45efca25e025cf1ac8ce0c4987dfb
BLAKE2b-256 a813a4f891e2f7d922d81b58063b9e43450544b7863d358f51f6afddf3304214

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_git-0.2.0-py3-none-any.whl:

Publisher: python.yml on modelcontextprotocol/servers

Attestations:

Supported by

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