mcp-gh-pr-mini
@y-hirakaw
A minimal MCP (Model Context Protocol) server for interacting with GitHub pull requests.
Overview
What is mcp-gh-pr-mini?
mcp-gh-pr-mini is a minimal MCP (Model Context Protocol) server for interacting with GitHub pull requests. It runs in your local environment and works with MCP-compatible clients like Copilot Agent, enabling creation, listing, diff viewing, reviewer requests, and commenting on PRs.
How to use mcp-gh-pr-mini?
Configure the server in your VSCode settings.json using the command npx mcp-gh-pr-mini and set the GITHUB_PERSONAL_ACCESS_TOKEN environment variable. You need Node.js and a VSCode extension that supports MCP (e.g., Copilot Agent). The server is invoked automatically by your MCP client when you use the provided tools.
Key features of mcp-gh-pr-mini
- Create a pull request in a GitHub repository
- List open pull requests
- Get the diff for a pull request
- Request reviewers for a pull request
- Add comments (prefixes with "[AI] Generated using MCP")
- Get comments and file changes with comment positions
Use cases of mcp-gh-pr-mini
- Automate pull request creation from AI-assisted workflows
- Review diffs of open PRs directly in your editor
- Request specific reviewers without leaving the chat
- Add code review comments at file or position-specific levels
- Retrieve existing comments and changed file details for analysis
FAQ from mcp-gh-pr-mini
What type of GitHub token is required?
A fine-grained personal access token with Pull requests (Read and write), Issues (Read and write), and Contents (Read and write) permissions.
Can I add both general and position-specific comments?
Yes. The server supports general PR comments and position-specific code review comments, both automatically prefixed with "[AI] Generated using MCP".
Where does mcp-gh-pr-mini run?
It runs as an MCP server in your local environment. There is no hosted or remote service; you configure it in VSCode's settings.json and it uses your local Node.js installation.
What are the dependencies?
Node.js is required. For use with VSCode, you need an MCP-compatible extension such as Copilot Agent.
Is this a full-featured GitHub client?
No. This is a minimal, focused implementation for essential pull request tasks (create, list, diff, reviewers, comments, file changes). It is intended as a simple reference and learning tool.