Git PR MCP Server

Git PR MCP Server

An MCP server that enables Git repository operations and GitHub PR workflows, allowing users to manage repositories, create branches, commit changes, and create pull requests through natural language.

Category
Visit Server

README

Git PR MCP Server

A Model Context Protocol (MCP) server for Git and Pull Request operations, providing tools for repository management and PR workflows.

Built with FastMCP and runs in SSE mode by default on 0.0.0.0:8000.

Features

This MCP server provides the following tools and capabilities:

Core Git Operations (on specified repository path):

  • get_git_status: Get the current git status of a repository.
  • list_branches: List all branches in the repository (with optional remote branches).
  • create_pr_summary: Create a summary for a pull request based on git diff.
  • get_commit_history: Get commit history for a branch.
  • get_git_diff: Get git diff between commits, branches, or working directory.

Automated PR Workflow (operates on an internally managed "active" repository):

  • clone_repository: Clones a GitHub repository into a managed temporary directory, making it the "active" repository for subsequent operations. Automatically cleans up any previously active repository's temporary directory.
  • create_git_branch: Creates a new branch in the active repository.
  • write_file_in_repo: Creates or overwrites files within the active repository.
  • git_commit_changes: Stages all changes (git add .) and commits them in the active repository.
  • git_push_branch: Pushes a specified branch from the active repository to its remote origin.
  • create_github_pr: Creates a pull request on GitHub for the active repository using the PyGithub library. Requires GITHUB_TOKEN.

State Management:

  • The server maintains the state of the currently "active" cloned repository (path, URL, owner, name) in an active_repo_state.json file. This allows some persistence across server restarts, though the temporary clone directory itself might be OS-managed.

Installation

  1. Clone this repository:
git clone <repository-url>
cd git-pr-mcp
  1. Install using uv:
uv sync

Usage

The server runs in SSE mode by default on 0.0.0.0:9999 and is configured via environment variables. Here's a sample .env file:

FASTMCP_HOST=0.0.0.0
FASTMCP_PORT=9999
GITHUB_TOKEN=your_github_token

Quick Start

# Run with defaults (0.0.0.0:8000)
uv run python main.py

# Or run the server module directly
uv run python -m src.git_pr_mcp.server

You can then access the MCP server at http://localhost:9999/sse.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured