{"id":29114882,"url":"https://github.com/peterj/git-pr-mcp","last_synced_at":"2026-03-15T22:15:05.082Z","repository":{"id":297270843,"uuid":"996267232","full_name":"peterj/git-pr-mcp","owner":"peterj","description":"A Model Context Protocol (MCP) server for Git and Pull Request operations, providing tools for repository management and PR workflows.","archived":false,"fork":false,"pushed_at":"2025-06-07T22:15:47.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T11:11:36.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T17:45:15.000Z","updated_at":"2025-06-07T22:15:51.000Z","dependencies_parsed_at":"2025-06-04T22:53:54.737Z","dependency_job_id":"619da94e-d23b-44b4-9f5e-7a02d2b76c05","html_url":"https://github.com/peterj/git-pr-mcp","commit_stats":null,"previous_names":["peterj/git-pr-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peterj/git-pr-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fgit-pr-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fgit-pr-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fgit-pr-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fgit-pr-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterj","download_url":"https://codeload.github.com/peterj/git-pr-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fgit-pr-mcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267067813,"owners_count":24030902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-29T11:06:44.922Z","updated_at":"2026-03-15T22:15:00.045Z","avatar_url":"https://github.com/peterj.png","language":"Python","funding_links":[],"categories":["Version Control"],"sub_categories":["How to Submit"],"readme":"# Git PR MCP Server\n\nA Model Context Protocol (MCP) server for Git and Pull Request operations, providing tools for repository management and PR workflows.\n\nBuilt with FastMCP and runs in SSE mode by default on `0.0.0.0:8000`.\n\n## Features\n\nThis MCP server provides the following tools and capabilities:\n\n**Core Git Operations (on specified repository path):**\n- **get_git_status**: Get the current git status of a repository.\n- **list_branches**: List all branches in the repository (with optional remote branches).\n- **create_pr_summary**: Create a summary for a pull request based on git diff.\n- **get_commit_history**: Get commit history for a branch.\n- **get_git_diff**: Get git diff between commits, branches, or working directory.\n\n**Automated PR Workflow (operates on an internally managed \"active\" repository):**\n- **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.\n- **create_git_branch**: Creates a new branch in the active repository.\n- **write_file_in_repo**: Creates or overwrites files within the active repository.\n- **git_commit_changes**: Stages all changes (`git add .`) and commits them in the active repository.\n- **git_push_branch**: Pushes a specified branch from the active repository to its remote origin.\n- **create_github_pr**: Creates a pull request on GitHub for the active repository using the PyGithub library. Requires `GITHUB_TOKEN`.\n\n**State Management:**\n- 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.\n\n## Installation\n\n1. Clone this repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd git-pr-mcp\n```\n\n2. Install using uv:\n```bash\nuv sync\n```\n\n## Usage\n\nThe 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:\n\n```\nFASTMCP_HOST=0.0.0.0\nFASTMCP_PORT=9999\nGITHUB_TOKEN=your_github_token\n```\n\n### Quick Start\n\n```bash\n# Run with defaults (0.0.0.0:8000)\nuv run python main.py\n\n# Or run the server module directly\nuv run python -m src.git_pr_mcp.server\n```\n\nYou can then access the MCP server at `http://localhost:9999/sse`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterj%2Fgit-pr-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterj%2Fgit-pr-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterj%2Fgit-pr-mcp/lists"}