Github MCP Server

Widget generated by MCP Showcase

Introduction

The GitHub MCP Server is GitHub's official Model Context Protocol server, designed to connect AI assistants and agents directly to GitHub's platform. It exposes a comprehensive set of tools that allow language models to interact with repositories, issues, pull requests, files, branches, releases, and teams programmatically.

This server enables end-to-end software development workflows, from creating and managing repositories to handling code reviews and collaboration. The available tools cover repository management (creating repos, branches, and files), issue tracking (creating, updating, and commenting on issues), pull request review workflows (adding review comments, replies, and reactions), and organizational context (retrieving teams, members, and authenticated user details).

Maintained by GitHub and released under the MIT license, the server supports read-only and lockdown modes for security-conscious environments and is highly configurable. It serves as a powerful bridge for automating and streamlining common developer operations through natural language.

Use Cases

1. Repository Setup and Management

Quickly bootstrap new projects by creating repositories, initializing files, and setting up branches without leaving your AI assistant.

  • Sample prompt: Create a new private repository called "payment-service" in my organization "acme-corp", initialize it with a README, and add a description saying "Handles payment processing".

2. File Operations and Content Management

Create, update, retrieve, or delete files directly in a repository, useful for configuration changes or quick edits.

  • Sample prompt: Update the file "config/settings.yaml" on the "develop" branch of acme-corp/payment-service to change the timeout value to 30 seconds, and commit it with the message "Increase timeout".

3. Issue Tracking and Triage

Create, update, and organize issues, including assigning labels, milestones, assignees, and managing sub-issue hierarchies.

  • Sample prompt: Create a new issue in acme-corp/payment-service titled "Fix null pointer in checkout flow", assign it to user "janedoe", add the labels "bug" and "priority-high", and set the body describing the crash on the payment confirmation page.

4. Pull Request Creation and Review

Open pull requests, request reviewers, and add detailed line-by-line review comments on the diff to facilitate code review workflows.

  • Sample prompt: Create a pull request in acme-corp/payment-service from branch "feature/retry-logic" into "main" titled "Add retry logic for failed payments", and request review from "senior-dev-team".

5. Code Review Comments and Feedback

Add pending review comments, reply to existing comments, and react to feedback on specific lines of code.

  • Sample prompt: On pull request #42 in acme-corp/payment-service, add a review comment on line 85 of "src/checkout.js" on the RIGHT side saying "This should handle the timeout exception explicitly".

6. Issue and PR Collaboration

Add comments and emoji reactions to issues and pull requests to keep discussions moving and acknowledge contributors.

  • Sample prompt: Add a comment to issue #17 in acme-corp/payment-service saying "I've reproduced this bug and will have a fix by tomorrow", and add a rocket reaction to the issue itself.

7. Release and Tag Inspection

Retrieve the latest releases, specific releases by tag, or git tag details to track versioning and deployment history.

  • Sample prompt: Get the latest release for acme-corp/payment-service and show me its release notes and tag name.

8. Commit and Change Investigation

Fetch detailed commit information, including file-level stats or full diffs, to understand changes and troubleshoot regressions.

  • Sample prompt: Show me the full patch details for commit abc123def in acme-corp/payment-service so I can see exactly what changed in the checkout module.

9. Repository Forking and Branching for Contribution

Fork repositories and create feature branches to contribute to open-source or team projects.

  • Sample prompt: Fork the repository octocat/hello-world to my account, then create a new branch called "fix-typo" from the main branch.

10. Team and Organization Context

Retrieve team memberships and member lists to understand organizational structure and route reviews or assignments appropriately.

  • Sample prompt: List all the teams I'm a member of, and then show me the members of the "backend-engineers" team in the "acme-corp" organization.

11. Label Management and Standardization

Fetch label details to keep issue categorization consistent across a repository.

  • Sample prompt: Get the details of the "priority-high" label in acme-corp/payment-service including its color and description.

12. Authenticated User Profile Lookup

Retrieve details of the authenticated user to personalize actions or auto-fill ownership information in other operations.

  • Sample prompt: Who am I logged in as? Get my GitHub profile details and list the repositories I own.

Details

MCP Server URL:
https://api.githubcopilot.com/mcp/
Type:
HTTP Stream
Authentication:
API Key (Bearer Token)

Tools

add_comment_to_pending_review
Add review comment to the requester's latest pending pull request review. A pending review needs to already exist to call this (check with the user if not sure).
add_issue_comment
Add a comment and/or reaction to a specific issue or issue comment in a GitHub repository. Use this tool with pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add or react to review comments. At least one of body or reaction is required.
add_reply_to_pull_request_comment
Add a reply and/or reaction to an existing pull request comment. This can create a new comment linked as a reply to the specified comment, add an emoji reaction to the specified comment, or do both. At least one of body or reaction is required.
create_branch
Create a new branch in a GitHub repository
create_or_update_file
Create or update a single file in a GitHub repository. If updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations. In order to obtain the SHA of original file version before updating, use the following git command: git rev-parse <branch>:<path to file> SHA MUST be provided for existing file updates.
create_pull_request
Create a new pull request in a GitHub repository.
create_repository
Create a new GitHub repository in your account or specified organization
delete_file
Delete a file from a GitHub repository
fork_repository
Fork a GitHub repository to your account or specified organization
get_commit
Get details for a commit from a GitHub repository
get_file_contents
Get the contents of a file or directory from a GitHub repository
get_label
Get a specific label from a repository.
get_latest_release
Get the latest release in a GitHub repository
get_me
Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.
get_release_by_tag
Get a specific release by its tag name in a GitHub repository
get_tag
Get details about a specific git tag in a GitHub repository
get_team_members
Get member usernames of a specific team in an organization. Limited to organizations accessible with current credentials
get_teams
Get details of the teams the user is a member of. Limited to organizations accessible with current credentials
issue_read
Get information about a specific issue in a GitHub repository.
issue_write
Create a new or update an existing issue in a GitHub repository.
list_branches
List branches in a GitHub repository
list_commits
Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).
list_issue_fields
List issue fields for a repository or organization. Returns field definitions including name, type (text, number, date, single_select), and for single_select fields the list of valid option names. When repo is omitted, returns org-level fields directly.
list_issue_types
List supported issue types for a repository or its owner organization. When repo is omitted, returns org-level issue types directly.
list_issues
List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.
list_pull_requests
List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.
list_releases
List releases in a GitHub repository
list_repository_collaborators
List collaborators of a GitHub repository. Results are paginated; the response includes `nextPage`, `prevPage`, `firstPage`, and `lastPage` fields. To get the next page, use the `nextPage` value as the `page` parameter.
list_tags
List git tags in a GitHub repository
merge_pull_request
Merge a pull request in a GitHub repository.
pull_request_read
Get information on a specific pull request in GitHub repository.
pull_request_review_write
Create and/or submit, delete review of a pull request. Available methods: - create: Create a new review of a pull request. If "event" parameter is provided, the review is submitted. If "event" is omitted, a pending review is created. - submit_pending: Submit an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. The "body" and "event" parameters are used when submitting the review. - delete_pending: Delete an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. - resolve_thread: Resolve a review thread. Requires only "threadId" parameter with the thread's node ID (e.g., PRRT_kwDOxxx). The owner, repo, and pullNumber parameters are not used for this method. Resolving an already-resolved thread is a no-op. - unresolve_thread: Unresolve a previously resolved review thread. Requires only "threadId" parameter. The owner, repo, and pullNumber parameters are not used for this method. Unresolving an already-unresolved thread is a no-op.
push_files
Push multiple files to a GitHub repository in a single commit
request_copilot_review
Request a GitHub Copilot code review for a pull request. Use this for automated feedback on pull requests, usually before requesting a human reviewer.
run_secret_scanning
Scan files, content, or recent changes for secrets such as API keys, passwords, tokens, and credentials. This tool is intended for targeted scans of specific files, snippets, or diffs provided directly as content. The files parameter accepts either a single string or an array of strings containing raw file contents or diff hunks, and returns detected secrets with their locations and related secret scanning metadata. Content must not be empty. For full repository scanning, other mechanisms are available. Caveats: - Only files within the codebase should be scanned. Files outside of the codebase should not be sent. - Files listed in .gitignore should be skipped.
search_code
Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.
search_commits
Search for commits across GitHub repositories using GitHub's commit search syntax. Useful for finding specific changes, authors, or messages across one or many repositories. Searches the default branch only.
search_issues
Search for issues in GitHub repositories using issues search syntax already scoped to is:issue
search_pull_requests
Search for pull requests in GitHub repositories using issues search syntax already scoped to is:pr
search_repositories
Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.
search_users
Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.
sub_issue_write
Add a sub-issue to a parent issue in a GitHub repository.
update_pull_request
Update an existing pull request in a GitHub repository.
update_pull_request_branch
Update the branch of a pull request with the latest changes from the base branch.

Want to create a similar playground for your MCP?