Mitigate AI Platform

GitHub

How to configure the GitHub MCP connector

The GitHub connector allows the chatbot to manage repositories, issues, pull requests, and code through GitHub's API using the GitHub MCP server.

Connector Settings

FieldValue
Integration TypeMCP
NameGitHub
URLhttps://api.githubcopilot.com/mcp
Transport TypeStreamable HTTP
Authentication TypeOAuth 2.1
OAuth Client ID(from your GitHub App or OAuth App)
OAuth Client Secret(from your GitHub App or OAuth App)
OAuth Scopesrepo read:org

This MCP server does not support Dynamic Client Registration (RFC 7591). You must provide OAuth Client ID and Client Secret from a registered GitHub App or OAuth App. GitHub Apps are recommended as they support token expiration and fine-grained permissions.

OAuth Scopes

See all available scopes in the GitHub OAuth scopes documentation. Scopes are grouped by capability below.

Repositories & Code

ScopeDescription
repoFull control of private repositories, including code, issues, pull requests, and actions

Organizations

ScopeDescription
read:orgRead-only access to organization membership, teams, and team members

Gists

ScopeDescription
gistCreate and manage gists

Notifications

ScopeDescription
notificationsRead and manage notifications

Projects

ScopeDescription
read:projectRead-only access to user and organization projects
projectFull access to user and organization projects

Security

ScopeDescription
security_eventsRead and write security events (code scanning, Dependabot, secret scanning)

Usage Examples

Once connected, users can interact with GitHub through natural language:

  • "Show me open issues in the backend repo"
  • "What pull requests are waiting for review?"
  • "Search the codebase for usages of the UserService class"

Tools

Get My User Profile

get_me

Returns details of the authenticated GitHub user. Use this to verify the connected account or retrieve user information needed for other operations.

Get Teams

get_teams

Retrieves teams the user is a member of, limited to organizations accessible with the current credentials.

Parameters:

  • user - Username to get teams for. Defaults to the authenticated user

Get Team Members

get_team_members

Retrieves member usernames of a specific team in an organization.

Parameters:

  • org - Organization login that contains the team
  • team_slug - Team slug

Search Repositories

search_repositories

Finds GitHub repositories by name, description, topics, or other metadata.

Parameters:

  • query - Search query using GitHub search syntax (e.g., machine learning stars:>1000 language:python)
  • sort - Sort by field. Defaults to best match
  • order - Sort order
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Get File Contents

get_file_contents

Retrieves the contents of a file or directory from a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • path - Path to file or directory
  • ref - Git ref such as refs/tags/{tag}, refs/heads/{branch}, or refs/pull/{pr_number}/head
  • sha - Commit SHA. If specified, takes precedence over ref

Create Or Update File

create_or_update_file

Creates or updates a single file in a GitHub repository. When updating an existing file, the sha parameter is required.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • path - Path where to create or update the file
  • content - File content
  • message - Commit message
  • branch - Branch to create or update the file in
  • sha - Blob SHA of the file being replaced. Required for updates

Delete File

delete_file

Deletes a file from a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • path - Path to the file to delete
  • branch - Branch to delete the file from
  • message - Commit message

Push Files

push_files

Pushes multiple files to a GitHub repository in a single commit.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • branch - Branch to push to
  • message - Commit message
  • files - Array of file objects with path and content properties

Create Repository

create_repository

Creates a new GitHub repository in your account or a specified organization.

Parameters:

  • name - Repository name
  • description - Repository description
  • private - Whether the repository should be private
  • autoInit - Initialize with a README
  • organization - Organization to create the repository in. Omit for personal account

Fork Repository

fork_repository

Forks a GitHub repository to your account or a specified organization.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • organization - Organization to fork to

List Branches

list_branches

Lists branches in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Create Branch

create_branch

Creates a new branch in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • branch - Name for the new branch
  • from_branch - Source branch. Defaults to the repository's default branch

List Issues

list_issues

Lists issues in a GitHub repository with optional filtering.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • state - Filter by state (open, closed). Defaults to both
  • labels - Filter by labels
  • since - Filter by date (ISO 8601 timestamp)
  • orderBy - Order issues by field
  • direction - Sort direction
  • perPage - Results per page (max 100)
  • after - Cursor for pagination from previous response's pageInfo.endCursor

Search Issues

search_issues

Searches for issues across GitHub repositories using issue search syntax.

Parameters:

  • query - Search query using GitHub issues search syntax
  • owner - Repository owner (optional, filters to specific repo when combined with repo)
  • repo - Repository name
  • sort - Sort field. Defaults to best match
  • order - Sort order
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Get Issue Details

issue_read

Retrieves information about a specific issue, including comments, sub-issues, and labels.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • issue_number - Issue number
  • method - Operation to perform: get, get_comments, get_sub_issues, or get_labels
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Create Or Update Issue

issue_write

Creates a new issue or updates an existing issue in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • method - Operation: create or update
  • title - Issue title
  • body - Issue body content
  • state - New state (open or closed)
  • state_reason - Reason for state change
  • labels - Labels to apply
  • assignees - Usernames to assign
  • milestone - Milestone number
  • issue_number - Issue number (required for updates)
  • type - Issue type. Use list_issue_types to get valid values
  • duplicate_of - Issue number this is a duplicate of (used with duplicate state reason)

Add Issue Comment

add_issue_comment

Adds a comment to a specific issue or pull request.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • issue_number - Issue or pull request number
  • body - Comment content

List Issue Types

list_issue_types

Lists supported issue types for a repository's organization.

Parameters:

  • owner - Organization owner of the repository

Change Sub Issue

sub_issue_write

Adds, removes, or reorders sub-issues within a parent issue.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • issue_number - Parent issue number
  • method - Action: add, remove, or reprioritize
  • sub_issue_id - ID of the sub-issue (not the issue number)
  • after_id - Sub-issue ID to place after (for reprioritize)
  • before_id - Sub-issue ID to place before (for reprioritize)
  • replace_parent - Replace the sub-issue's current parent (for add)

Get Label

get_label

Retrieves a specific label from a repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • name - Label name

List Pull Requests

list_pull_requests

Lists pull requests in a GitHub repository. To filter by author, use search_pull_requests instead.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • state - Filter by state
  • head - Filter by head user/org and branch
  • base - Filter by base branch
  • sort - Sort by field
  • direction - Sort direction
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Search Pull Requests

search_pull_requests

Searches for pull requests across GitHub repositories using pull request search syntax.

Parameters:

  • query - Search query using GitHub pull request search syntax
  • owner - Repository owner
  • repo - Repository name
  • sort - Sort field. Defaults to best match
  • order - Sort order
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Get Pull Request Details

pull_request_read

Retrieves information about a specific pull request, including diff, status, files, review comments, reviews, comments, and check runs.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number
  • method - Operation: get, get_diff, get_status, get_files, get_review_comments, get_reviews, get_comments, or get_check_runs
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Create Pull Request

create_pull_request

Creates a new pull request in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • title - Pull request title
  • body - Pull request description
  • head - Branch containing changes
  • base - Branch to merge into
  • draft - Create as a draft pull request
  • maintainer_can_modify - Allow maintainer edits

Edit Pull Request

update_pull_request

Updates an existing pull request.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number
  • title - New title
  • body - New description
  • state - New state
  • base - New base branch
  • draft - Mark as draft (true) or ready for review (false)
  • reviewers - GitHub usernames to request reviews from
  • maintainer_can_modify - Allow maintainer edits

Merge Pull Request

merge_pull_request

Merges a pull request in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number
  • commit_title - Title for the merge commit
  • commit_message - Additional detail for the merge commit
  • merge_method - Merge method (merge, squash, or rebase)

Update Pull Request Branch

update_pull_request_branch

Updates a pull request branch with the latest changes from the base branch.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number
  • expectedHeadSha - Expected SHA of the pull request's HEAD ref

Create Or Submit Pull Request Review

pull_request_review_write

Creates, submits, or deletes a pull request review.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number
  • method - Operation: create, submit_pending, or delete_pending
  • event - Review action (APPROVE, REQUEST_CHANGES, or COMMENT)
  • body - Review comment text
  • commitID - SHA of commit to review

Add Review Comment

add_comment_to_pending_review

Adds a review comment to the user's latest pending pull request review. A pending review must already exist.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number
  • path - Relative path to the file
  • body - Comment text
  • line - Line number in the diff. For multi-line comments, the last line of the range
  • side - Side of the diff: LEFT (previous state) or RIGHT (new state)
  • startLine - First line of the range for multi-line comments
  • startSide - Starting side of the diff for multi-line comments
  • subjectType - Level at which the comment is targeted

Add Reply To Pull Request Comment

add_reply_to_pull_request_comment

Adds a reply to an existing pull request comment.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number
  • commentId - ID of the comment to reply to
  • body - Reply text

Request Copilot Review

request_copilot_review

Requests a GitHub Copilot code review for a pull request.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • pullNumber - Pull request number

Search Code

search_code

Searches code across GitHub repositories using GitHub's code search engine.

Parameters:

  • query - Search query using GitHub code search syntax (e.g., content:Skill language:Java org:github)
  • sort - Sort field (indexed only)
  • order - Sort order
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Search Users

search_users

Finds GitHub users by username, name, or profile information.

Parameters:

  • query - Search query (e.g., location:seattle followers:>100)
  • sort - Sort by followers, repositories, or joined
  • order - Sort order
  • page - Page number for pagination
  • perPage - Results per page (max 100)

List Commits

list_commits

Lists commits for a branch or up to a specific commit in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • sha - Branch name, tag name, or commit SHA. Defaults to the repository's default branch
  • author - Filter by author username or email
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Get Commit Details

get_commit

Retrieves details for a specific commit.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • sha - Commit SHA, branch name, or tag name
  • include_diff - Include file diffs and stats. Defaults to true
  • page - Page number for pagination
  • perPage - Results per page (max 100)

List Tags

list_tags

Lists git tags in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Get Tag Details

get_tag

Retrieves details about a specific git tag.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • tag - Tag name

List Releases

list_releases

Lists releases in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • page - Page number for pagination
  • perPage - Results per page (max 100)

Get Latest Release

get_latest_release

Retrieves the latest release in a GitHub repository.

Parameters:

  • owner - Repository owner
  • repo - Repository name

Get Release By Tag

get_release_by_tag

Retrieves a specific release by its tag name.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • tag - Tag name (e.g., v1.0.0)

Assign Copilot To Issue

assign_copilot_to_issue

Assigns GitHub Copilot coding agent to work on an issue. Copilot will create a pull request with source code changes to resolve the issue.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • issue_number - Issue number
  • base_ref - Branch for Copilot to start from. Defaults to the repository's default branch
  • custom_instructions - Additional instructions to guide the agent beyond the issue body

Create Pull Request With Copilot

create_pull_request_with_copilot

Delegates a task to GitHub Copilot coding agent, which will create a pull request with the implementation.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • title - Title for the pull request
  • problem_statement - Detailed description of the task to perform
  • base_ref - Branch for the agent to start from. Defaults to the repository's default branch

Get Copilot Job Status

get_copilot_job_status

Checks the status of a GitHub Copilot coding agent job and retrieves the pull request URL once created.

Parameters:

  • owner - Repository owner
  • repo - Repository name
  • id - Job ID or pull request number

On this page