GitHub MCP server for Claude, ChatGPT, Claude Code and Cursor
GitHub is a code hosting platform for version control and collaboration, offering Git-based repository management, issue tracking, and continuous integration features
Examples of what your AI apps can do in GitHub. You'll see the exact list of tools after you connect it.
add_an_email_address_for_the_authenticated_user
ToolThis action allows the authenticated user to add new email addresses to their GitHub account. It handles unverified emails, ensuring that duplicates and verified emails from other accounts are managed correctly.
add_a_repository_collaborator
ToolThis action adds a specified user as a collaborator to a given GitHub repository. If the user is already a collaborator, their permissions can be updated accordingly.
add_assignees_to_an_issue
ToolAdds one or more GitHub users as assignees to an issue. This action adds to the existing assignees (does not replace them). You need push access to the repository to modify assignees. Use 'remove_assignees_from_an_issue' to remove assignees.
add_labels_to_an_issue
ToolThis action allows users to add specified labels to an existing issue in a repository. If the labels do not exist, they will be created automatically.
approve_a_workflow_run_for_a_fork_pull_request
ToolApproves a workflow run that originates from a pull request in a forked repository. This action requires manual approval when the run is subject to specific workflow rules.
compare_two_commits
ToolThis action compares two specific commits, branches, or tags in a repository. It provides detailed information on the differences between these two commit points, including the number of commits ahead or behind, and details about changed files.
create_a_blob
ToolThis action creates a new Git blob in a specified repository. Users must provide the necessary content and encoding type for the blob being created. Note: You must have write access to the repository's Contents. A 404 error typically indicates the repository doesn't exist or you lack write permissions.
create_a_commit
ToolThis action creates a new commit for the specified repository on GitHub. It takes the commit message, tree SHA, author and committer information, and optional parent commits and creates the commit in the repository.
create_an_issue
ToolThis action creates a new issue in a specified GitHub repository. It requires the repository to exist and have issues enabled, and certain fields may require appropriate permissions.
create_an_issue_comment
ToolThis action allows users to submit comments on existing GitHub issues or pull requests. It requires specifying the owner, repository, issue number, and the content of the comment.
create_an_organization_repository
ToolThis action allows you to create a new repository in a specified GitHub organization. You can configure various options such as visibility, features, and templates for the repository.
create_a_pull_request
ToolThis action creates a pull request in a specified repository. It requires the base and head branches to exist and necessitates either a title or an issue to be provided.
create_a_reference
ToolThis action creates a new Git reference such as a branch or tag within a specified repository. It requires the owner and repository name, along with a reference and the SHA of the commit it points to. IMPORTANT: This action can only create NEW references. If the reference already exists, the API will return a 422 error with 'Reference already exists'. To modify an existing branch or tag, use the 'Update a reference' action (GITHUB_UPDATE_A_REFERENCE) instead. To check if a reference exists before creating it, use 'Get a reference' (GITHUB_GET_A_REFERENCE) or 'List matching references' (GITHUB_LIST_MATCHING_REFERENCES).
create_a_release
ToolThis action creates a new release in a specified GitHub repository by using the provided tag name. The release can include additional metadata such as title and description, and can be specified as a draft or pre-release.
create_a_tree
ToolCreates a new Git tree object in a repository by defining the structure of files and directories. This action allows users to specify tree entries, optionally building on a provided base tree SHA for more complex tree structures.
create_or_update_file_contents
ToolThis action allows the user to create a new file or update an existing file in a GitHub repository. By providing the necessary parameters, the user can specify the file's content, commit message, and other metadata.
delete_a_repository
ToolThis action allows users to permanently delete a specified repository on the platform. It requires proper permissions and is irreversible once completed.
find_pull_requests
ToolThis action allows users to search and filter pull requests based on various criteria like repository, author, state, labels, and more. It returns a structured response that includes essential information about the pull requests found.
find_repositories
ToolThis action allows users to search for GitHub repositories based on various criteria such as keywords, programming language, and star ratings. It provides a filtered, optimized set of results to help users find relevant repositories quickly.
get_a_pull_request
ToolThis action retrieves a specific pull request from a GitHub repository. You need to provide the repository owner's username, the repository name, and the pull request number to get the details of that pull request.
get_a_reference
ToolThis action retrieves a specific Git reference from a GitHub repository. It allows users to access information about branches, tags, or other references in the specified repository. IMPORTANT: The reference must actually exist in the repository. If you receive a 404 error, the branch or tag does not exist. Consider using 'list_matching_references' action first to discover available references if you're unsure. Note that repositories may use 'main' instead of 'master' as the default branch.
get_repository_content
ToolThis action fetches the content of a specific file in a GitHub repository or lists the contents of a directory. For files, it returns the content in Base64 format. For directories, it returns an array of items within that directory.
list_branches
ToolThis action fetches the branches of a specified GitHub repository and allows filtering by whether the branches are protected or not.
list_deployments
ToolThis action retrieves a list of deployments associated with a specified repository. It allows users to filter deployments based on various criteria such as commit SHA, ref name, task name, and more.
list_organizations_for_a_user
ToolThis action retrieves a list of public organizations associated with a specified GitHub user. By using the unique GitHub username, it queries the GitHub API and returns the relevant organization details.
list_organizations_for_the_authenticated_user
ToolThis action retrieves a paginated list of organizations that the authenticated GitHub user belongs to. It allows users to easily access information about their associated organizations.
list_pull_requests
ToolLists pull requests for a GitHub repository. **REQUIRED PARAMETERS (MUST BE PROVIDED):** - owner: The GitHub username or organization (e.g., 'octocat', 'microsoft') - repo: The repository name (e.g., 'hello-world', 'vscode') Both 'owner' and 'repo' are MANDATORY. The action will fail if either is missing. OPTIONAL filters: state (open/closed/all), head branch, base branch, and sorting options. NOTE: This action does NOT support 'assignee' or 'since' parameters. To search for pull requests by assignee, author, or across multiple repositories, use GITHUB_FIND_PULL_REQUESTS instead.
list_pull_requests_files
ToolThis action retrieves all files related to a specified pull request in a GitHub repository. It provides detailed information on each file, including status and changes made.
list_repositories_for_the_authenticated_user
ToolRetrieves a list of repositories that the authenticated user has access to. This can include public, private, and repositories owned by the user or explicitly shared with them.
list_repositories_starred_by_the_authenticated_user
ToolThis action retrieves the repositories that the authenticated user has starred on GitHub. Users can specify the sort order and pagination options to manage the results returned.
list_repository_contributors
ToolThis action retrieves the list of contributors for a designated GitHub repository. The contributors are sorted in descending order based on their contributions to the repository.
list_repository_issues
ToolRetrieves issues from a GitHub repository. IMPORTANT: You must specify BOTH the 'owner' (account/organization) AND 'repo' (repository name). For example, for the repository 'https://github.com/microsoft/vscode', use owner='microsoft' and repo='vscode'. Supports filtering by state, assignee, labels, and more.
list_stargazers
ToolThis action retrieves a list of users who have starred a specific GitHub repository, allowing you to see who showed interest in the project. It supports pagination to manage large sets of results.
search_issues_and_pull_requests
ToolThis action enables users to search for issues and pull requests on GitHub using specific keywords and qualifiers. It allows filtering results based on various parameters like repository, state, and labels to narrow down search outcomes.
star_a_repository_for_the_authenticated_user
ToolThis action stars a specific repository for the authenticated user. You must provide both the repository owner (username or organization) and repository name to identify which repository to star. Starring indicates interest in the repository and may provide updates about it.
update_a_reference
ToolThis action updates an existing Git reference to point to a given commit SHA. By default, only fast-forward updates are allowed to prevent accidental history rewriting. Use `force=true` when you need to move a branch backward or rewrite history. The reference must already exist - use the 'Create a reference' action to create new refs.
create_a_check_run
ToolThis action creates a new check run for a specific commit in a repository. It allows external services to report their status, provide detailed feedback, and attach annotations and images directly within the GitHub interface. **IMPORTANT: Authentication Requirement** This endpoint requires GitHub App authentication with 'checks:write' permission. OAuth tokens and personal access tokens (PAT) cannot create check runs. If you need to report status using a PAT, consider using the 'Create a commit status' action instead.
create_a_check_suite
ToolCreates a check suite for a specific commit in a repository. IMPORTANT: This action requires a GitHub App installation access token with 'checks:write' permission. OAuth tokens and classic personal access tokens CANNOT use this endpoint (will return 404). By default, check suites are automatically created when check runs are created - only use this to manually create check suites when automatic creation has been disabled.
create_a_codespace_for_the_authenticated_user
ToolThis action allows users to create a GitHub Codespace seamlessly. Users can provide either a repository ID along with a reference to a branch or commit or specify a pull request to base the codespace on.
create_a_codespace_from_a_pull_request
ToolThis action creates a new GitHub Codespace associated with a specified pull request, allowing users to start coding in an environment configured from their repository. The action provides options for setting geographic location, machine type, and other parameters to customize the codespace experience.
create_a_codespace_in_a_repository
ToolThis action creates a new GitHub Codespace for the user in a designated repository. It sets up a development environment based on specified configurations and provides options for machine type, idle timeout, and display name.
create_a_commit_comment
ToolThis action allows the user to create a comment on a specific commit in a repository. The user can specify a comment for the entire commit or target a specific line in a file if desired.
create_a_deployment
ToolThis action creates a deployment in a GitHub repository. It targets a specific reference such as a branch or tag and handles various deployment options.
create_a_repository_for_the_authenticated_user
ToolThis action creates a new repository for the authenticated user. The repository can be public or private and can include various features like issues, projects, and a README file upon creation.
create_a_repository_webhook
ToolThis action creates a webhook for a specified repository. It allows the repository owner to receive event notifications at a designated URL whenever specified events occur.
create_a_review_comment_for_a_pull_request
ToolThis action creates a review comment on a specified pull request. It allows users to provide feedback on specific lines or files, enhancing collaboration during the review process.
create_a_review_for_a_pull_request
ToolThis action creates a review for a specified pull request. Users can approve the request, request changes, or add comments to the code.
create_a_team
ToolThis action creates a new team within a specified GitHub organization. It allows for the inclusion of maintainers, repositories, and privacy settings, aiding in the organization of team collaboration.
create_a_workflow_dispatch_event
ToolThis action allows you to manually trigger a specific GitHub Actions workflow. You can specify the workflow by its ID or filename and provide any necessary inputs defined for the workflow.
delete_a_commit_comment
ToolDeletes a specific commit comment from a repository using its unique identifier. This action ensures that the specified comment is removed if it exists, providing a cleaner commit history.
delete_a_deployment
ToolThis action deletes an inactive deployment from a specified repository. It requires the owner's username, repository name, and the deployment ID to identify the specific deployment to delete.
delete_a_gist
ToolThis action allows you to permanently delete a specified GitHub gist using its unique identifier. Once the gist is deleted, the action cannot be undone, and the gist will no longer be accessible.
delete_a_label
ToolThis action permanently deletes a specified label from a GitHub repository. REQUIRED: You must provide all three parameters - 'owner' (repository owner/org), 'repo' (repository name), and 'name' (label name). GitHub repositories are identified by the owner/repo combination (e.g., 'octocat/Hello-World').
delete_a_milestone
ToolThis action removes a specific milestone from a repository. It ensures that the milestone is deleted only if it exists, providing a safe and idempotent operation.
delete_a_project
ToolThis action permanently deletes a specified GitHub project using its GraphQL node ID. The project cannot be recovered after deletion. You must have admin permissions for the project to delete it.
delete_a_project_card
ToolThis action removes a specified project card from a GitHub project (classic). NOTE: GitHub Classic Projects was deprecated on April 1, 2025. This action only works with existing classic project cards. For new projects, use GitHub Projects V2.
delete_a_project_column
ToolThis action removes a specific project field (column) from a GitHub Projects V2 project. It is a permanent change to the project structure on GitHub. Note: Built-in fields like Status cannot be deleted.
delete_a_release
ToolThis action allows users to permanently delete a specified release from their repository, which removes not just the release itself, but also any associated assets and possibly the Git tag tied to it.
delete_a_repository_webhook
ToolThis action deletes a specified webhook associated with a repository. It ensures that the webhook is removed and no longer sends events to the defined endpoint.
delete_a_team
ToolThis action allows you to delete a specific team from your organization. Once executed, the team and any associated child teams will be permanently removed.
delete_a_workflow_run
ToolThis action deletes a specific workflow run from a given repository on GitHub. It requires the repository's owner, the repository name, and the unique workflow run ID to perform the deletion.
get_a_blob
ToolThis action retrieves the raw content of a specified file from a GitHub repository based on the file's SHA hash. If the repository and SHA exist, the content is typically returned in Base64 encoding.
get_a_branch
ToolThis action retrieves detailed information about a specific branch in a GitHub repository. It provides insights such as the branch name, latest commit SHA, and protection status of the branch.
get_a_check_run
ToolThis action retrieves detailed information about a specific check run within a given GitHub repository, including its status and conclusions. It is useful for understanding the result of automated checks applied to code changes.
get_a_check_suite
ToolThis action retrieves a specific check suite by its ID from the designated repository. It provides details about various check runs associated with that suite, which can be useful for monitoring the status of checks in the repository.
get_a_commit
ToolThis action retrieves a specific commit from a designated repository. It allows users to access details of the commit based on various reference types, including SHA, branch, or tag.
get_a_commit_comment
ToolThis action fetches a specific comment from a GitHub commit using its unique identifier. It provides detailed information about the comment, including attributes such as the author, content, and creation date.
get_a_deployment
ToolThis action retrieves a specific deployment based on the owner and repository provided. It requires the deployment ID to fetch the corresponding deployment details.
get_a_deployment_status
ToolThis action retrieves the status of a specific deployment within a GitHub repository. It requires the IDs for both the deployment and its status to provide the relevant details.
get_a_discussion
ToolThis action retrieves the details of a specific discussion within a designated team in an organization, identified by its unique number. It allows users to access full discussion information easily.
get_a_discussion_comment
ToolThis action retrieves a specific comment from a discussion within a specified team and organization. It allows users to see details about the comment based on provided identifiers.
get_a_gist
ToolThis action retrieves a specific GitHub gist using its unique identifier. If the gist exists, it will return detailed information about it, including its contents and metadata.
get_a_label
ToolThis action retrieves a specific label from a specified GitHub repository. It requires the repository owner's name, the repository name, and the label name to fetch the label details.
get_a_milestone
ToolThis action fetches detailed information about a specific milestone from a GitHub repository using its unique identifier. It provides comprehensive data, including the title, description, and current state of the milestone.
get_a_project
ToolRetrieves details of a GitHub project (V2) by its project number and owner. Returns the project's title, description, state (open/closed), visibility, timestamps, and owner information. If no username or org is provided, defaults to the authenticated user's projects.
get_a_project_card
ToolThis action retrieves detailed information about a specific project card using its unique identifier. It allows users to access essential attributes and metadata associated with the project card. NOTE: GitHub Classic Projects REST API was deprecated. This action only works with existing classic project cards. For new projects, use GitHub Projects V2.
get_a_project_column
ToolRetrieves details for a specific project column by its ID. Returns the column name, URLs, timestamps, and other metadata. Note: This uses the deprecated Classic Projects API which was sunset on April 1, 2025.
get_a_release
ToolThis action retrieves a specific release from a GitHub repository. It requires the repository owner, repository name, and release ID to successfully fetch the release details.
get_a_repository
ToolThis action fetches detailed data about a specific GitHub repository based on the provided owner and repository name. It allows users to retrieve essential information about the repository, such as its description, owner, and other relevant details.
get_a_repository_webhook
ToolThis action retrieves the configuration details of a specific webhook associated with a particular repository. It allows users to see the settings and attributes of an existing webhook to manage their repository integrations effectively.
get_a_tag
ToolThis action fetches detailed information about a specific Git tag from a given GitHub repository, based on the SHA of the requested tag. It is useful for retrieving metadata associated with the tag, such as its message, date, and commit reference.
get_a_user
ToolThis action allows you to retrieve the public profile information of a specific GitHub user by their username. It provides details such as the user's login, avatar, and repository count.
get_a_workflow
ToolThis action retrieves the detailed information of a specified GitHub Actions workflow within a repository. You can identify the workflow using either its numeric ID or the workflow file name.
get_a_workflow_run
ToolThis action retrieves a specific workflow run from a GitHub repository using its unique ID. It provides details such as the run's status and other attributes, allowing users to monitor the workflow execution.
get_github_pages_build
ToolThis action retrieves detailed information about a specified GitHub Pages build for a given repository. It provides insights into the build's status, associated commit, duration, and any errors encountered during the build process.
get_team_membership_for_a_user
ToolThis action checks if a user is a member of a specific team in a GitHub organization. If they are a member, it returns their role (member or maintainer) and membership state (active or pending). If not a member, it clearly indicates that with is_member=False.
list_commit_comments
ToolThis action retrieves all comments made on a specific commit in a given repository. It allows users to access information such as the comment text, author, and timestamps related to the comments.
list_commits
ToolLists commits from a GitHub repository. REQUIRED: You must provide 'owner' (the GitHub username or organization that owns the repository) and 'repo' (the repository name). Optional filters include author, date range (since/until), file path, or branch/SHA.
list_commits_on_a_pull_request
ToolThis action retrieves a list of commits associated with a specific pull request. Users can view the details of each commit, such as the author and commit message, while utilizing pagination to navigate through results if needed.
list_forks
ToolThis action retrieves a list of forks for a given repository on GitHub. It allows sorting of results based on criteria such as star count, and supports pagination to manage result sets.
list_global_security_advisories
ToolThis action retrieves a list of global security advisories from GitHub. Users can filter results based on various criteria including IDs, types, ecosystems, severities, and date ranges.
list_issue_comments
ToolThis action retrieves comments for a specific issue in a GitHub repository. It allows users to view all the comments made on the issue over time.
list_labels_for_a_repository
ToolThis action retrieves all labels associated with a specified GitHub repository. It supports pagination to manage large sets of label data effectively.
list_pull_requests_associated_with_a_commit
ToolThis action retrieves pull requests associated with a specific commit in a GitHub repository. It returns information about merged pull requests if the commit belongs to the default branch, or includes open pull requests that mention the commit in other branches.
list_repo_codespaces
ToolThis action retrieves a list of codespaces available in a specified repository for the authenticated user. It provides details such as the total count and information about each codespace.
list_repositories_for_a_user
ToolThis action retrieves a list of public repositories for a specified GitHub user. You can filter the repositories by type and sort them based on various criteria.
list_repository_collaborators
ToolThis action retrieves a list of collaborators who have access to a specific repository. Users can filter the results based on their affiliation and permission level.
list_repository_events
ToolThis action retrieves a list of events for a specified GitHub repository. It provides information on activities like code pushes, issues, and pull requests in chronological order.
list_repository_invitations
ToolRetrieves a list of invitations for users who have been invited to collaborate on a specified repository. This action allows you to specify the repository owner and pagination settings to manage the data returned.
list_repository_webhooks
ToolThis action retrieves a list of webhooks associated with a specified repository. It provides details about each webhook's configuration and status, enabling users to manage their repository integrations effectively.
Free. No card needed.
How to connect GitHub
- 1Create your free ContextGate account.
- 2GitHub isn't in ContextGate's app list yet. If you have an MCP server for GitHub, add it under Connections → Add Connection → Custom MCP.
- 3Add ContextGate to Claude, Cursor or ChatGPT (the Setup page shows you how), then ask it to use GitHub.
What you get with GitHub and ContextGate
- Your AI apps can use GitHub Claude, Cursor, ChatGPT and other AI apps reach GitHub through the one ContextGate connection you add to them.
- You choose which tools they can use Switch off any GitHub tool you don't want used. It's hidden from your AI apps and refused if called.
- Every call is checked and recorded Your policies check each call (for example, personal data is hidden and secrets are blocked), and Activity keeps a record of it.
ContextGate sees only the tool calls that go through it, not your AI app's built-in tools or your chats.
Select a tool on the left to see its parameters
What you get with GitHub and ContextGate
- Your AI apps can use GitHub: Claude, Cursor, ChatGPT and other AI apps reach GitHub through the one ContextGate connection you add to them.
- You choose which tools they can use: Switch off any GitHub tool you don't want used. It's hidden from your AI apps and refused if called.
- Every call is checked and recorded: Your policies check each call (for example, personal data is hidden and secrets are blocked), and Activity keeps a record of it.
ContextGate sees only the tool calls that go through it, not your AI app's built-in tools or your chats.
Free. No card needed.
How to connect GitHub
- Create your free ContextGate account.
- GitHub isn't in ContextGate's app list yet. If you have an MCP server for GitHub, add it under Connections → Add Connection → Custom MCP.
- Add ContextGate to Claude, Cursor or ChatGPT (the Setup page shows you how), then ask it to use GitHub.