Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GitHub's official MCP Server

License

NotificationsYou must be signed in to change notification settings

codingwatching/github-mcp-server

 
 

Repository files navigation

The GitHub MCP Server is aModel Context Protocol (MCP)server that provides seamless integration with GitHub APIs, enabling advancedautomation and interaction capabilities for developers and tools.

Use Cases

  • Automating GitHub workflows and processes.
  • Extracting and analyzing data from GitHub repositories.
  • Building AI powered tools and applications that interact with GitHub's ecosystem.

Remote GitHub MCP Server

Install in VS CodeInstall in VS Code Insiders

The remote GitHub MCP Server is hosted by GitHub and provides the easiest method for getting up and running. If your MCP host does not support remote MCP servers, don't worry! You can use thelocal version of the GitHub MCP Server instead.

Prerequisites

  1. An MCP host that supports the latest MCP specification and remote servers, such asVS Code.

Installation

Usage with VS Code

For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start. Make sure you're usingVS Code 1.101 orlater for remote MCP and OAuth support.

Alternatively, to manually configure VS Code, choose the appropriate JSON block from the examples below and add it to your host configuration:

Using OAuthUsing a GitHub PAT
VS Code (version 1.101 or greater)
{"servers": {"github": {"type":"http","url":"https://api.githubcopilot.com/mcp/"    }  }}
{"servers": {"github": {"type":"http","url":"https://api.githubcopilot.com/mcp/","headers": {"Authorization":"Bearer ${input:github_mcp_pat}"      }    }  },"inputs": [    {"type":"promptString","id":"github_mcp_pat","description":"GitHub Personal Access Token","password":true    }  ]}

Usage in other MCP Hosts

For MCP Hosts that areRemote MCP-compatible, choose the appropriate JSON block from the examples below and add it to your host configuration:

Using OAuthUsing a GitHub PAT
{"mcpServers": {"github": {"url":"https://api.githubcopilot.com/mcp/"    }  }}
{"mcpServers": {"github": {"url":"https://api.githubcopilot.com/mcp/","authorization_token":"Bearer <your GitHub PAT>"    }  }}

Note: The exact configuration format may vary by host. Refer to your host's documentation for the correct syntax and location for remote MCP server setup.

Configuration

SeeRemote Server Documentation on how to pass additional configuration settings to the remote GitHub MCP Server.


Local GitHub MCP Server

Install with Docker in VS CodeInstall with Docker in VS Code Insiders

Prerequisites

  1. To run the server in a container, you will need to haveDocker installed.
  2. Once Docker is installed, you will also need to ensure Docker is running. The image is public; if you get errors on pull, you may have an expired token and need todocker logout ghcr.io.
  3. Lastly you will need toCreate a GitHub Personal Access Token.The MCP server can use many of the GitHub APIs, so enable the permissions that you feel comfortable granting your AI tools (to learn more about access tokens, please check out thedocumentation).

Installation

Usage with VS Code

For quick installation, use one of the one-click install buttons. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.

Usage in other MCP Hosts

Add the following JSON block to your IDE MCP settings.

{"mcp": {"inputs": [      {"type":"promptString","id":"github_token","description":"GitHub Personal Access Token","password":true      }    ],"servers": {"github": {"command":"docker","args": ["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"        ],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"        }      }    }  }}

Optionally, you can add a similar example (i.e. without the mcp key) to a file called.vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

{"inputs": [    {"type":"promptString","id":"github_token","description":"GitHub Personal Access Token","password":true    }  ],"servers": {"github": {"command":"docker","args": ["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"      ],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"      }    }  }}

More about using MCP server tools in VS Code'sagent mode documentation.

Usage with Claude Desktop

{"mcpServers": {"github": {"command":"docker","args": ["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"      ],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN":"<YOUR_TOKEN>"      }    }  }}

Build from source

If you don't have Docker, you can usego build to build the binary in thecmd/github-mcp-server directory, and use thegithub-mcp-server stdio command with theGITHUB_PERSONAL_ACCESS_TOKEN environment variable set to your token. To specify the output location of the build, use the-o flag. You should configure your server to use the built executable as itscommand. For example:

{"mcp": {"servers": {"github": {"command":"/path/to/github-mcp-server","args": ["stdio"],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN":"<YOUR_TOKEN>"        }      }    }  }}

Tool Configuration

The GitHub MCP Server supports enabling or disabling specific groups of functionalities via the--toolsets flag. This allows you to control which GitHub API capabilities are available to your AI tools. Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size.

Toolsets are not limited to Tools. Relevant MCP Resources and Prompts are also included where applicable.

Available Toolsets

The following sets of tools are available (all are on by default):

ToolsetDescription
contextStrongly recommended: Tools that provide context about the current user and GitHub context you are operating in
actionsGitHub Actions workflows and CI/CD operations
code_securityCode security related tools, such as GitHub Code Scanning
experimentsExperimental features that are not considered stable yet
issuesGitHub Issues related tools
notificationsGitHub Notifications related tools
orgsGitHub Organization related tools
pull_requestsGitHub Pull Request related tools
reposGitHub Repository related tools
secret_protectionSecret protection related tools, such as GitHub Secret Scanning
usersGitHub User related tools

Specifying Toolsets

To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:

  1. Using Command Line Argument:

    github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security
  2. Using Environment Variable:

    GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server

The environment variableGITHUB_TOOLSETS takes precedence over the command line argument if both are provided.

Using Toolsets With Docker

When using Docker, you can pass the toolsets as environment variables:

docker run -i --rm \  -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \  -e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security,experiments" \  ghcr.io/github/github-mcp-server

The "all" Toolset

The special toolsetall can be provided to enable all available toolsets regardless of any other configuration:

./github-mcp-server --toolsets all

Or using the environment variable:

GITHUB_TOOLSETS="all" ./github-mcp-server

Dynamic Tool Discovery

Note: This feature is currently in beta and may not be available in all environments. Please test it out and let us know if you encounter any issues.

Instead of starting with all tools enabled, you can turn on dynamic toolset discovery. Dynamic toolsets allow the MCP host to list and enable toolsets in response to a user prompt. This should help to avoid situations where the model gets confused by the sheer number of tools available.

Using Dynamic Tool Discovery

When using the binary, you can pass the--dynamic-toolsets flag.

./github-mcp-server --dynamic-toolsets

When using Docker, you can pass the toolsets as environment variables:

docker run -i --rm \  -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \  -e GITHUB_DYNAMIC_TOOLSETS=1 \  ghcr.io/github/github-mcp-server

Read-Only Mode

To run the server in read-only mode, you can use the--read-only flag. This will only offer read-only tools, preventing any modifications to repositories, issues, pull requests, etc.

./github-mcp-server --read-only

When using Docker, you can pass the read-only mode as an environment variable:

docker run -i --rm \  -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \  -e GITHUB_READ_ONLY=1 \  ghcr.io/github/github-mcp-server

GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)

The flag--gh-host and the environment variableGITHUB_HOST can be used to setthe hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.

  • For GitHub Enterprise Server, prefix the hostname with thehttps:// URI scheme, as it otherwise defaults tohttp://, which GitHub Enterprise Server does not support.
  • For GitHub Enterprise Cloud with data residency, usehttps://YOURSUBDOMAIN.ghe.com as the hostname.
"github": {"command":"docker","args": ["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","-e","GITHUB_HOST","ghcr.io/github/github-mcp-server"    ],"env": {"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}","GITHUB_HOST":"https://<your GHES or ghe.com domain name>"    }}

i18n / Overriding Descriptions

The descriptions of the tools can be overridden by creating agithub-mcp-server-config.json file in the same directory as the binary.

The file should contain a JSON object with the tool names as keys and the newdescriptions as values. For example:

{"TOOL_ADD_ISSUE_COMMENT_DESCRIPTION":"an alternative description","TOOL_CREATE_BRANCH_DESCRIPTION":"Create a new branch in a GitHub repository"}

You can create an export of the current translations by running the binary withthe--export-translations flag.

This flag will preserve any translations/overrides you have made, while addingany new translations that have been added to the binary since the last time youexported.

./github-mcp-server --export-translationscat github-mcp-server-config.json

You can also use ENV vars to override the descriptions. The environmentvariable names are the same as the keys in the JSON file, prefixed withGITHUB_MCP_ and all uppercase.

For example, to override theTOOL_ADD_ISSUE_COMMENT_DESCRIPTION tool, you canset the following environment variable:

export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"

Tools

Actions
  • cancel_workflow_run - Cancel workflow run

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • delete_workflow_run_logs - Delete workflow logs

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • download_workflow_run_artifact - Download workflow artifact

    • artifact_id: The unique identifier of the artifact (number, required)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
  • get_job_logs - Get job logs

    • failed_only: When true, gets logs for all failed jobs in run_id (boolean, optional)
    • job_id: The unique identifier of the workflow job (required for single job logs) (number, optional)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • return_content: Returns actual log content instead of URLs (boolean, optional)
    • run_id: Workflow run ID (required when using failed_only) (number, optional)
  • get_workflow_run - Get workflow run

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • get_workflow_run_logs - Get workflow run logs

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • get_workflow_run_usage - Get workflow usage

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • list_workflow_jobs - List workflow jobs

    • filter: Filters jobs by their completed_at timestamp (string, optional)
    • owner: Repository owner (string, required)
    • page: The page number of the results to fetch (number, optional)
    • per_page: The number of results per page (max 100) (number, optional)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • list_workflow_run_artifacts - List workflow artifacts

    • owner: Repository owner (string, required)
    • page: The page number of the results to fetch (number, optional)
    • per_page: The number of results per page (max 100) (number, optional)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • list_workflow_runs - List workflow runs

    • actor: Returns someone's workflow runs. Use the login for the user who created the workflow run. (string, optional)
    • branch: Returns workflow runs associated with a branch. Use the name of the branch. (string, optional)
    • event: Returns workflow runs for a specific event type (string, optional)
    • owner: Repository owner (string, required)
    • page: The page number of the results to fetch (number, optional)
    • per_page: The number of results per page (max 100) (number, optional)
    • repo: Repository name (string, required)
    • status: Returns workflow runs with the check run status (string, optional)
    • workflow_id: The workflow ID or workflow file name (string, required)
  • list_workflows - List workflows

    • owner: Repository owner (string, required)
    • page: The page number of the results to fetch (number, optional)
    • per_page: The number of results per page (max 100) (number, optional)
    • repo: Repository name (string, required)
  • rerun_failed_jobs - Rerun failed jobs

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • rerun_workflow_run - Rerun workflow run

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • run_id: The unique identifier of the workflow run (number, required)
  • run_workflow - Run workflow

    • inputs: Inputs the workflow accepts (object, optional)
    • owner: Repository owner (string, required)
    • ref: The git reference for the workflow. The reference can be a branch or tag name. (string, required)
    • repo: Repository name (string, required)
    • workflow_id: The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml) (string, required)
Code Security
  • get_code_scanning_alert - Get code scanning alert

    • alertNumber: The number of the alert. (number, required)
    • owner: The owner of the repository. (string, required)
    • repo: The name of the repository. (string, required)
  • list_code_scanning_alerts - List code scanning alerts

    • owner: The owner of the repository. (string, required)
    • ref: The Git reference for the results you want to list. (string, optional)
    • repo: The name of the repository. (string, required)
    • severity: Filter code scanning alerts by severity (string, optional)
    • state: Filter code scanning alerts by state. Defaults to open (string, optional)
    • tool_name: The name of the tool used for code scanning. (string, optional)
Context
  • get_me - Get my user profile
    • reason: Optional: the reason for requesting the user information (string, optional)
Issues
  • add_issue_comment - Add comment to issue

    • body: Comment content (string, required)
    • issue_number: Issue number to comment on (number, required)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
  • assign_copilot_to_issue - Assign Copilot to issue

    • issueNumber: Issue number (number, required)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
  • create_issue - Open new issue

    • assignees: Usernames to assign to this issue (string[], optional)
    • body: Issue body content (string, optional)
    • labels: Labels to apply to this issue (string[], optional)
    • milestone: Milestone number (number, optional)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • title: Issue title (string, required)
  • get_issue - Get issue details

    • issue_number: The number of the issue (number, required)
    • owner: The owner of the repository (string, required)
    • repo: The name of the repository (string, required)
  • get_issue_comments - Get issue comments

    • issue_number: Issue number (number, required)
    • owner: Repository owner (string, required)
    • page: Page number (number, optional)
    • per_page: Number of records per page (number, optional)
    • repo: Repository name (string, required)
  • list_issues - List issues

    • direction: Sort direction (string, optional)
    • labels: Filter by labels (string[], optional)
    • owner: Repository owner (string, required)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • repo: Repository name (string, required)
    • since: Filter by date (ISO 8601 timestamp) (string, optional)
    • sort: Sort order (string, optional)
    • state: Filter by state (string, optional)
  • search_issues - Search issues

    • order: Sort order (string, optional)
    • owner: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • query: Search query using GitHub issues search syntax (string, required)
    • repo: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
    • sort: Sort field by number of matches of categories, defaults to best match (string, optional)
  • update_issue - Edit issue

    • assignees: New assignees (string[], optional)
    • body: New description (string, optional)
    • issue_number: Issue number to update (number, required)
    • labels: New labels (string[], optional)
    • milestone: New milestone number (number, optional)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • state: New state (string, optional)
    • title: New title (string, optional)
Notifications
  • dismiss_notification - Dismiss notification

    • state: The new state of the notification (read/done) (string, optional)
    • threadID: The ID of the notification thread (string, required)
  • get_notification_details - Get notification details

    • notificationID: The ID of the notification (string, required)
  • list_notifications - List notifications

    • before: Only show notifications updated before the given time (ISO 8601 format) (string, optional)
    • filter: Filter notifications to, use default unless specified. Read notifications are ones that have already been acknowledged by the user. Participating notifications are those that the user is directly involved in, such as issues or pull requests they have commented on or created. (string, optional)
    • owner: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • repo: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
    • since: Only show notifications updated after the given time (ISO 8601 format) (string, optional)
  • manage_notification_subscription - Manage notification subscription

    • action: Action to perform: ignore, watch, or delete the notification subscription. (string, required)
    • notificationID: The ID of the notification thread. (string, required)
  • manage_repository_notification_subscription - Manage repository notification subscription

    • action: Action to perform: ignore, watch, or delete the repository notification subscription. (string, required)
    • owner: The account owner of the repository. (string, required)
    • repo: The name of the repository. (string, required)
  • mark_all_notifications_read - Mark all notifications as read

    • lastReadAt: Describes the last point that notifications were checked (optional). Default: Now (string, optional)
    • owner: Optional repository owner. If provided with repo, only notifications for this repository are marked as read. (string, optional)
    • repo: Optional repository name. If provided with owner, only notifications for this repository are marked as read. (string, optional)
Organizations
  • search_orgs - Search organizations
    • order: Sort order (string, optional)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • query: Search query using GitHub organizations search syntax scoped to type:org (string, required)
    • sort: Sort field by category (string, optional)
Pull Requests
  • add_pull_request_review_comment_to_pending_review - Add comment to the requester's latest pending pull request review

    • body: The text of the review comment (string, required)
    • line: The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range (number, optional)
    • owner: Repository owner (string, required)
    • path: The relative path to the file that necessitates a comment (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
    • side: The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state (string, optional)
    • startLine: For multi-line comments, the first line of the range that the comment applies to (number, optional)
    • startSide: For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state (string, optional)
    • subjectType: The level at which the comment is targeted (string, required)
  • create_and_submit_pull_request_review - Create and submit a pull request review without comments

    • body: Review comment text (string, required)
    • commitID: SHA of commit to review (string, optional)
    • event: Review action to perform (string, required)
    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • create_pending_pull_request_review - Create pending pull request review

    • commitID: SHA of commit to review (string, optional)
    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • create_pull_request - Open new pull request

    • base: Branch to merge into (string, required)
    • body: PR description (string, optional)
    • draft: Create as draft PR (boolean, optional)
    • head: Branch containing changes (string, required)
    • maintainer_can_modify: Allow maintainer edits (boolean, optional)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • title: PR title (string, required)
  • delete_pending_pull_request_review - Delete the requester's latest pending pull request review

    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • get_pull_request - Get pull request details

    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • get_pull_request_comments - Get pull request comments

    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • get_pull_request_diff - Get pull request diff

    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • get_pull_request_files - Get pull request files

    • owner: Repository owner (string, required)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • get_pull_request_reviews - Get pull request reviews

    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • get_pull_request_status - Get pull request status checks

    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • list_pull_requests - List pull requests

    • base: Filter by base branch (string, optional)
    • direction: Sort direction (string, optional)
    • head: Filter by head user/org and branch (string, optional)
    • owner: Repository owner (string, required)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • repo: Repository name (string, required)
    • sort: Sort by (string, optional)
    • state: Filter by state (string, optional)
  • merge_pull_request - Merge pull request

    • commit_message: Extra detail for merge commit (string, optional)
    • commit_title: Title for merge commit (string, optional)
    • merge_method: Merge method (string, optional)
    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • request_copilot_review - Request Copilot review

    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • search_pull_requests - Search pull requests

    • order: Sort order (string, optional)
    • owner: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • query: Search query using GitHub pull request search syntax (string, required)
    • repo: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
    • sort: Sort field by number of matches of categories, defaults to best match (string, optional)
  • submit_pending_pull_request_review - Submit the requester's latest pending pull request review

    • body: The text of the review comment (string, optional)
    • event: The event to perform (string, required)
    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
  • update_pull_request - Edit pull request

    • base: New base branch name (string, optional)
    • body: New description (string, optional)
    • maintainer_can_modify: Allow maintainer edits (boolean, optional)
    • owner: Repository owner (string, required)
    • pullNumber: Pull request number to update (number, required)
    • repo: Repository name (string, required)
    • state: New state (string, optional)
    • title: New title (string, optional)
  • update_pull_request_branch - Update pull request branch

    • expectedHeadSha: The expected SHA of the pull request's HEAD ref (string, optional)
    • owner: Repository owner (string, required)
    • pullNumber: Pull request number (number, required)
    • repo: Repository name (string, required)
Repositories
  • create_branch - Create branch

    • branch: Name for new branch (string, required)
    • from_branch: Source branch (defaults to repo default) (string, optional)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
  • create_or_update_file - Create or update file

    • branch: Branch to create/update the file in (string, required)
    • content: Content of the file (string, required)
    • message: Commit message (string, required)
    • owner: Repository owner (username or organization) (string, required)
    • path: Path where to create/update the file (string, required)
    • repo: Repository name (string, required)
    • sha: SHA of file being replaced (for updates) (string, optional)
  • create_repository - Create repository

    • autoInit: Initialize with README (boolean, optional)
    • description: Repository description (string, optional)
    • name: Repository name (string, required)
    • private: Whether repo should be private (boolean, optional)
  • delete_file - Delete file

    • branch: Branch to delete the file from (string, required)
    • message: Commit message (string, required)
    • owner: Repository owner (username or organization) (string, required)
    • path: Path to the file to delete (string, required)
    • repo: Repository name (string, required)
  • fork_repository - Fork repository

    • organization: Organization to fork to (string, optional)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
  • get_commit - Get commit details

    • owner: Repository owner (string, required)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • repo: Repository name (string, required)
    • sha: Commit SHA, branch name, or tag name (string, required)
  • get_file_contents - Get file or directory contents

    • owner: Repository owner (username or organization) (string, required)
    • path: Path to file/directory (directories must end with a slash '/') (string, required)
    • ref: Accepts optional git refs such asrefs/tags/{tag},refs/heads/{branch} orrefs/pull/{pr_number}/head (string, optional)
    • repo: Repository name (string, required)
    • sha: Accepts optional git sha, if sha is specified it will be used instead of ref (string, optional)
  • get_tag - Get tag details

    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
    • tag: Tag name (string, required)
  • list_branches - List branches

    • owner: Repository owner (string, required)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • repo: Repository name (string, required)
  • list_commits - List commits

    • author: Author username or email address (string, optional)
    • owner: Repository owner (string, required)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • repo: Repository name (string, required)
    • sha: SHA or Branch name (string, optional)
  • list_tags - List tags

    • owner: Repository owner (string, required)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • repo: Repository name (string, required)
  • push_files - Push files to repository

    • branch: Branch to push to (string, required)
    • files: Array of file objects to push, each object with path (string) and content (string) (object[], required)
    • message: Commit message (string, required)
    • owner: Repository owner (string, required)
    • repo: Repository name (string, required)
  • search_code - Search code

    • order: Sort order (string, optional)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • q: Search query using GitHub code search syntax (string, required)
    • sort: Sort field ('indexed' only) (string, optional)
  • search_repositories - Search repositories

    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • query: Search query (string, required)
Secret Protection
  • get_secret_scanning_alert - Get secret scanning alert

    • alertNumber: The number of the alert. (number, required)
    • owner: The owner of the repository. (string, required)
    • repo: The name of the repository. (string, required)
  • list_secret_scanning_alerts - List secret scanning alerts

    • owner: The owner of the repository. (string, required)
    • repo: The name of the repository. (string, required)
    • resolution: Filter by resolution (string, optional)
    • secret_type: A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. (string, optional)
    • state: Filter by state (string, optional)
Users
  • search_users - Search users
    • order: Sort order (string, optional)
    • page: Page number for pagination (min 1) (number, optional)
    • perPage: Results per page for pagination (min 1, max 100) (number, optional)
    • query: Search query using GitHub users search syntax scoped to type:user (string, required)
    • sort: Sort field by category (string, optional)

Library Usage

The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.

License

This project is licensed under the terms of the MIT open source license. Please refer toMIT for the full terms.

About

GitHub's official MCP Server

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go98.8%
  • Shell1.1%
  • Dockerfile0.1%

[8]ページ先頭

©2009-2025 Movatter.jp