{"id":28239954,"url":"https://github.com/saidsef/mcp-github-pr-issue-analyser","last_synced_at":"2026-05-30T22:00:31.968Z","repository":{"id":294013336,"uuid":"981760924","full_name":"saidsef/mcp-github-pr-issue-analyser","owner":"saidsef","description":"A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management. Enables LLMs to fetch PR details, analyse diffs, manage issues, and handle releases through a standardised interface","archived":false,"fork":false,"pushed_at":"2026-05-25T13:43:02.000Z","size":676,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-25T15:29:38.318Z","etag":null,"topics":["devops-tools","github","issue-management","llm-integration","mcp","mcp-client","mcp-github","mcp-server","mcp-tools","pull-requests","workflow-automation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saidsef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://revolut.me/saidsef"]}},"created_at":"2025-05-11T20:28:13.000Z","updated_at":"2026-05-20T15:22:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"644d3797-00a5-4f92-b55e-97ab6e4e636b","html_url":"https://github.com/saidsef/mcp-github-pr-issue-analyser","commit_stats":null,"previous_names":["saidsef/mcp-github-pr-issue-analyser"],"tags_count":84,"template":false,"template_full_name":null,"purl":"pkg:github/saidsef/mcp-github-pr-issue-analyser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saidsef%2Fmcp-github-pr-issue-analyser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saidsef%2Fmcp-github-pr-issue-analyser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saidsef%2Fmcp-github-pr-issue-analyser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saidsef%2Fmcp-github-pr-issue-analyser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saidsef","download_url":"https://codeload.github.com/saidsef/mcp-github-pr-issue-analyser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saidsef%2Fmcp-github-pr-issue-analyser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":["devops-tools","github","issue-management","llm-integration","mcp","mcp-client","mcp-github","mcp-server","mcp-tools","pull-requests","workflow-automation"],"created_at":"2025-05-19T03:12:17.687Z","updated_at":"2026-05-30T22:00:31.962Z","avatar_url":"https://github.com/saidsef.png","language":"Python","funding_links":["https://revolut.me/saidsef"],"categories":["Version Control"],"sub_categories":["How to Submit"],"readme":"# MCP for GitHub PR, Issues, Tags and Releases\n\n[![CI](https://github.com/saidsef/mcp-github-pr-issue-analyser/actions/workflows/ci.yml/badge.svg)](https://github.com/saidsef/mcp-github-pr-issue-analyser/actions/workflows/ci.yml) [![Tag and Release](https://github.com/saidsef/mcp-github-pr-issue-analyser/actions/workflows/tag_release.yml/badge.svg)](https://github.com/saidsef/mcp-github-pr-issue-analyser/actions/workflows/tag_release.yml) [![Maintainability](https://qlty.sh/gh/saidsef/projects/mcp-github-pr-issue-analyser/maintainability.svg)](https://qlty.sh/gh/saidsef/projects/mcp-github-pr-issue-analyser) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/9ca2ee03cbfa4407944a2450b1719d5d)](https://app.codacy.com/gh/saidsef/mcp-github-pr-issue-analyser/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n\nThe [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) (MCP) is an open standard that enables seamless integration between Large Language Models (LLMs) and external tools. Whilst it can be implemented in any AI system, including custom LLM setups, the degree of integration and optimisation varies based on the model's architecture and capabilities.\n\nThis MCP application serves as a bridge between LLMs and GitHub's repository management features, offering automated analysis of pull requests and comprehensive issue management. It provides a robust set of tools to fetch PR details, create issues, and update issues directly from your desktop LLM. The application is designed with modularity in mind, supporting extensibility via the MCP tool interface and seamless integration with existing workflows.\n\nThe toolset enables automated PR analysis, issue tracking, tagging and release management through a standardised MCP interface, making it ideal for teams seeking to streamline their GitHub workflow automation.\n\n## Features\n\n| Function                                 | Description                                                                                       |\n|------------------------------------------|---------------------------------------------------------------------------------------------------|\n| Analyse GitHub Pull Requests and fetch diffs         | Retrieve the diff/patch for any PR in a repository.                                                |\n| Fetch content and metadata for specific PRs          | Get PR title, description, author, timestamps, and state.                                          |\n| Fetch linked issues for a PR                         | Get the issues that will auto-close when a PR is merged, via GraphQL `closingIssuesReferences`.    |\n| Fetch CI status checks for a PR                      | Get check run conclusions and legacy commit status for a PR's HEAD commit.                         |\n| Create Pull Requests                                 | Open new PRs with title, body, head/base branch, and draft option.                                 |\n| Update PR title and description                      | Change the title and body of any PR.                                                               |\n| Merge Pull Requests                                  | Merge a PR using merge, squash, or rebase method.                                                  |\n| Add comments to PRs                                  | Post general comments to a PR thread.                                                              |\n| Add inline review comments to PRs                    | Comment on specific lines in PR files for code review.                                             |\n| Submit PR Reviews                                    | Approve, request changes, or comment on a PR review.                                               |\n| Update PR Assignees                                  | Assign or update users on a PR or issue.                                                           |\n| Create and update GitHub Issues                      | Open new issues or update existing ones with title, body, labels, and state.                       |\n| List all open Issues or Pull Requests                | View all open PRs or issues for any user or organisation.                                          |\n| Create tags and releases                             | Tag repository commits and publish releases with changelogs.                                       |\n| Search GitHub Users                                  | Retrieve user profile information via GraphQL.                                                     |\n| Get User Activity                                    | Fetch commit, PR, issue, and review contributions with org/repo/date filtering.                    |\n\n## Requirements\n\n- Python 3.12+\n- GitHub Personal Access Token (with `repo` scope) **or** a GitHub OAuth App (client ID, secret, and a public base URL)\n\n## Authentication\n\nTwo auth modes are supported. The active mode is selected automatically from environment variables.\n\n| Mode | When active | Token used for API calls |\n|------|-------------|--------------------------|\n| **Static token** (default) | `GITHUB_TOKEN` set; no `GITHUB_OAUTH_*` vars | Server's `GITHUB_TOKEN` for all calls |\n| **GitHub OAuth2** | `GITHUB_TOKEN` + all three `GITHUB_OAUTH_*` vars set | Each user's own `gho_*` token |\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `GITHUB_TOKEN` | Yes | GitHub PAT with `repo` scope; used as the Bearer token in static-token HTTP mode |\n| `MCP_ENABLE_REMOTE` | No | Any non-empty value enables HTTP mode (required for OAuth2) |\n| `GITHUB_OAUTH_CLIENT_ID` | OAuth2 only | GitHub OAuth App client ID |\n| `GITHUB_OAUTH_CLIENT_SECRET` | OAuth2 only | GitHub OAuth App client secret |\n| `GITHUB_OAUTH_BASE_URL` | OAuth2 only | Public base URL of the MCP server (used for the OAuth2 redirect) |\n| `REDIS_HOST_PORT` | No | Redis connection string. Accepts `host:port` or a full URI: `redis://[:password@]host:port[/db]` (plaintext) or `rediss://[:password@]host:port[/db]` (TLS). When set, OAuth token state is stored in Redis instead of in-process memory. |\n| `REDIS_PASSWORD` | No | Redis AUTH password fallback — used when the password is not embedded in the URI. |\n| `PORT` | No (default `8081`) | HTTP server port |\n| `HOST` | No (default `localhost`) | HTTP server host |\n| `GITHUB_API_TIMEOUT` | No (default `5`) | Timeout in seconds for GitHub API requests |\n\n\u003e To create a GitHub OAuth App, go to **Settings → Developer settings → OAuth Apps → New OAuth App** and set the Authorization callback URL to `\u003cGITHUB_OAUTH_BASE_URL\u003e/auth/callback` (e.g. `https://mcp.example.com/auth/callback`).\n\n## Architecture Diagram\n\n```ascii\n                              +------------------------+\n                              |                        |\n                              |    MCP Client/User     |\n                              |                        |\n                              +------------------------+\n                                         |\n                                         | (stdio/http)\n                                         v\n                              +------------------------+\n                              |      Auth Layer        +--\u003e+------------------------+\n                              |   (auth.py)            |   | OAuth Token Store      |\n                              |                        |   | MemoryStore (default)  |\n                              | stdio : no auth        |   | RedisStore             |\n                              | http  : APIKeyVerifier |   |   (REDIS_HOST_PORT set)|\n                              | oauth : GitHub OAuth2  |   |   redis:// / rediss:// |\n                              |   (DCR + token proxy)  |   +------------------------+\n                              +------------------------+             |\n                                         |                           v\n                                         |                     +----------+\n                                         |                     |  Redis   |\n                                         |                     +----------+\n                                         v\n                              +------------------------+\n                              |    PRIssueAnalyser     |\n                              |    (FastMCP Server)    |\n                              +------------------------+\n                                         |\n                                         | (API calls)\n                                         v\n                              +------------------------+\n                              |   GitHub Integration   |\n                              +------------------------+\n                                         |\n                     +-------------------+-------------------+\n                     | (REST API)                            | (GraphQL API)\n                     v                                       v\n   +---------------------------------------+   +-----------------------------+\n   |                                       |   |                             |\n   | PRs (diff, content, status, linked    |   | User Search \u0026 Activity      |\n   | issues, reviews, comments, merge)     |   | (contributions, profile)    |\n   |                                       |   |                             |\n   | Issues (create, update, list, assign) |   | PR Linked Issues            |\n   |                                       |   | PR Status Checks            |\n   | Tags and Releases                     |   |                             |\n   +---------------------------------------+   +-----------------------------+\n```\n\n### Tool Categories\n\n1. PR Management: Fetch diffs, content, linked issues, CI status - create, review, merge, and update\n2. Issue Tracking: Create, update, list, and assign\n3. Release Management: Tags and releases\n4. User Search: Profile lookup and activity tracking via GraphQL\n\n### Main Flows\n\n- MCP Client: Interacts via stdio or streamable HTTP\n- Auth Layer: Selects APIKeyVerifier (static token) or GitHub OAuth2 provider; token state in MemoryStore or RedisStore\n- PRIssueAnalyser: FastMCP server - handles tool registration and request routing\n- GitHub Integration: All GitHub API calls (REST v3 + GraphQL v4)\n\n## Local Installation\n\n1. **Clone the repository:**\n```sh\ngit clone https://github.com/saidsef/mcp-github-pr-issue-analyser.git\ncd mcp-github-pr-issue-analyser\n```\n\n2. **Install dependencies:**\n\nLaunch MCP in `stdio` mode.\n```sh\nexport GITHUB_TOKEN=\"\u003cgithub-token\u003e\"\nuvx ./\n```\n\nAlternatively, launch MCP in `http` mode.\n```sh\nexport GITHUB_TOKEN=\"\u003cgithub-token\u003e\"\nexport MCP_ENABLE_REMOTE=true\nuvx ./\n```\n\u003e You can access it via `http` i.e. `http(s)://localhost:8081/mcp`\n\u003e In HTTP mode, clients must authenticate with `Authorization: Bearer \u003cGITHUB_TOKEN\u003e`.\n\nAlternatively, launch MCP in `http` mode with GitHub OAuth2 authentication.\n```sh\nexport GITHUB_TOKEN=\"\u003cgithub-token\u003e\"\nexport MCP_ENABLE_REMOTE=true\nexport GITHUB_OAUTH_CLIENT_ID=\"\u003coauth-app-client-id\u003e\"\nexport GITHUB_OAUTH_CLIENT_SECRET=\"\u003coauth-app-client-secret\u003e\"\nexport GITHUB_OAUTH_BASE_URL=\"https://\u003cyour-public-host\u003e\"\nuvx ./\n```\n\u003e In OAuth2 mode, users authenticate via GitHub's OAuth flow. Each user's own GitHub token is used for API calls.\n\nAlternatively, run via Docker using the published image.\n```sh\ndocker run -e GITHUB_TOKEN=\"\u003cgithub-token\u003e\" \\\n  -p 8081:8081 \\\n  ghcr.io/saidsef/mcp-github-pr-issue-analyser:latest\n```\n\n## Local Integration with IDEs and LLMs\n\nTo add an MCP server to your IDE or LLM, you need to add this section to the configuration file. The basic structure involves defining a server name and providing the command and any necessary arguments to run the server.\n\n\u003cdetails\u003e\n\u003csummary\u003eClaude / Cursor / Windsurf\u003c/summary\u003e\n\n```json\n{\n  \"mcpServers\": {\n    \"github_prs_issues\": {\n      \"command\": \"uvx\",\n      \"env\": {\n        \"GITHUB_TOKEN\": \"\u003cyour-github-token\u003e\"\n      },\n      \"args\": [\n        \"https://github.com/saidsef/mcp-github-pr-issue-analyser.git\",\n      ]\n    }\n  }\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVS Code\u003c/summary\u003e\n\n```json\n{\n  \"inputs\": [\n    {\n      \"type\": \"promptString\",\n      \"id\": \"github-token\",\n      \"description\": \"Enter your GitHub token\",\n      \"password\": true\n    }\n  ],\n  \"servers\": {\n    \"github-prs-issues\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\n        \"https://github.com/saidsef/mcp-github-pr-issue-analyser.git\",\n      ],\n      \"env\": {\n        \"GITHUB_TOKEN\": \"${input:github-token}\"\n      }\n    }\n  }\n}\n```\n\u003c/details\u003e\n\n## Source\n\nOur latest and greatest source of *mcp-github-pr-issue-analyser* can be found on [GitHub]. [Fork us](https://github.com/saidsef/mcp-github-pr-issue-analyser/fork)!\n\n## Contributing\n\nWe would :heart: you to contribute by making a [pull request](https://github.com/saidsef/mcp-github-pr-issue-analyser/pulls).\n\nPlease read the official [Contribution Guide](./CONTRIBUTING.md) for more information on how you can contribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaidsef%2Fmcp-github-pr-issue-analyser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaidsef%2Fmcp-github-pr-issue-analyser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaidsef%2Fmcp-github-pr-issue-analyser/lists"}