github / github-mcp-server
GitHub's official MCP Server
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing github/github-mcp-server in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Summary (README)
PreviewGitHub MCP Server
The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and PRs, analyze code, and automate workflows. All through natural language interactions.
Use Cases
- Repository Management: Browse and query code, search files, analyze commits, and understand project structure across any repository you have access to.
- Issue & PR Automation: Create, update, and manage issues and pull requests. Let AI help triage bugs, review code changes, and maintain project boards.
- CI/CD & Workflow Intelligence: Monitor GitHub Actions workflow runs, analyze build failures, manage releases, and get insights into your development pipeline.
- Code Analysis: Examine security findings, review Dependabot alerts, understand code patterns, and get comprehensive insights into your codebase.
- Team Collaboration: Access discussions, manage notifications, analyze team activity, and streamline processes for your team.
Built for developers who want to connect their AI tools to GitHub context and capabilities, from simple natural language queries to complex multi-step agent workflows.
Remote GitHub MCP Server
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 the local version of the GitHub MCP Server instead.
Prerequisites
- A compatible MCP host with remote server support (VS Code 1.101+, Claude Desktop, Cursor, Windsurf, etc.)
- Any applicable policies enabled
Install in 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 using VS Code 1.101 or later 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:
<table> <tr><th>Using OAuth</th><th>Using a GitHub PAT</th></tr> <tr><th align=left colspan=2>VS Code (version 1.101 or greater)</th></tr> <tr valign=top> <td>{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
}
}
}
</td>
<td>
{
"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
}
]
}
</td>
</tr>
</table>
Install in other MCP hosts
- Copilot CLI - Installation guide for GitHub Copilot CLI
- GitHub Copilot in other IDEs - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
- Claude Applications - Installation guide for Claude Desktop and Claude Code CLI
- Codex - Installation guide for OpenAI Codex
- Cursor - Installation guide for Cursor IDE
- Windsurf - Installation guide for Windsurf IDE
- Rovo Dev CLI - Installation guide for Rovo Dev CLI
Note: Each MCP host application needs to configure a GitHub App or OAuth App to support remote access via OAuth. Any host application that supports remote MCP servers should support the remote GitHub server with PAT authentication. Configuration details and support levels vary by host. Make sure to refer to the host application's documentation for more info.
Configuration
Toolset configuration
See Remote Server Documentation for full details on remote server configuration, toolsets, headers, and advanced usage. This file provides comprehensive instructions and examples for connecting, customizing, and installing the remote GitHub MCP Server in VS Code and other MCP hosts.
When no toolsets are specified, default toolsets are used.
Insiders Mode
<table> <tr><th>Using URL Path</th><th>Using Header</th></tr> <tr valign=top> <td>Try new features early! The remote server offers an insiders version with early access to new features and experimental tools.
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/insiders"
}
}
}
</td>
<td>
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"X-MCP-Insiders": "true"
}
}
}
}
</td>
</tr>
</table>
See Remote Server Documentation for more details and examples.
GitHub Enterprise
GitHub Enterprise Cloud with data residency (ghe.com)
GitHub Enterprise Cloud can also make use of the remote server.
Example for https://octocorp.ghe.com with GitHub PAT token:
{
...
"proxima-github": {
"type": "http",
"url": "https://copilot-api.octocorp.ghe.com/mcp",
"headers": {
"Authorization": "Bearer ${input:github_mcp_pat}"
}
},
...
}
Note: When using OAuth with GitHub Enterprise with VS Code and GitHub Copilot, you also need to configure your VS Code settings to point to your GitHub Enterprise instance - see Authenticate from VS Code
GitHub Enterprise Server
GitHub Enterprise Server does not support remote server hosting. Please refer to GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com) from the local server configuration.
Local GitHub MCP Server
Prerequisites
- To run the server in a container, you will need to have Docker installed.
- Once Docker is installed, you will also need to ensure Docker is running. The Docker image is available at
ghcr.io/github/github-mcp-server. The image is public; if you get errors on pull, you may have an expired token and need todocker logout ghcr.io. - Lastly you will need to Create 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 the documentation).
Environment Variables (Recommended)
To keep your GitHub PAT secure and reusable across different MCP hosts:
-
Store your PAT in environment variables
export GITHUB_PAT=your_token_hereOr create a
.envfile:GITHUB_PAT=your_token_here -
Protect your
.envfile# Add to .gitignore to prevent accidental commits echo ".env" >> .gitignore -
Reference the token in configurations
# CLI usage claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT # In config files (where supported) "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT" }
Note: Environment variable support varies by host app and IDE. Some applications (like Windsurf) require hardcoded tokens in config files.
Token Security Best Practices
-
Minimum scopes: Only grant necessary permissions
repo- Repository operationsread:packages- Docker image accessread:org- Organization team access
-
Separate tokens: Use different PATs for different projects/environments
-
Regular rotation: Update tokens periodically
-
Never commit: Keep tokens out of version control
-
File permissions: Restrict access to config files containing tokens
chmod 600 ~/.your-app/config.json
GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
The flag --gh-host and the environment variable GITHUB_HOST can be used to set
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
- For GitHub Enterprise Server, prefix the hostname with the
https://URI scheme, as it otherwise defaults tohttp://, which GitHub Enterprise Server does not support. - For GitHub Enterprise Cloud with data residency, use
https://YOURSUBDOMAIN.ghe.comas 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>"
}
}
Installation
Install in GitHub Copilot on 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.
More about using MCP server tools in VS Code's agent mode documentation.
Install in GitHub Copilot on other IDEs (JetBrains, Visual Studio, Eclipse, etc.)
Add the following JSON block to your IDE's 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 other host applications that accept the same format.
{
"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}"
}
}
}
}
</details>
Install in Other MCP Hosts
For other MCP host applications, please refer to our installation guides:
- Copilot CLI - Installation guide for GitHub Copilot CLI
- GitHub Copilot in other IDEs - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
- Claude Code & Claude Desktop - Installation guide for Claude Code and Claude Desktop
- Cursor - Installation guide for Cursor IDE
- Google Gemini CLI - Installation guide for Google Gemini CLI
- Windsurf - Installation guide for Windsurf IDE
For a complete overview of all installation options, see our Installation Guides Index.
Note: Any host application that supports local MCP servers should be able to access the local GitHub MCP server. However, the specific configuration process, syntax and stability of the integration will vary by host application. While many may follow a similar format to the examples above, this is not guaranteed. Please refer to your host application's documentation for the correct MCP configuration syntax and setup process.
Build from source
If you don't have Docker, you can use go build to build the binary in the
cmd/github-mcp-server directory, and use the github-mcp-server stdio command with the GITHUB_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 its command. For example:
{
"mcp": {
"servers": {
"github": {
"command": "/path/to/github-mcp-server",
"args": ["stdio"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
}
CLI utilities
The github-mcp-server binary includes a few CLI subcommands that are helpful for debugging and exploring the server.
github-mcp-server tool-search "<query>"searches tools by name, description, and input parameter names. Use--max-resultsto return more matches. Example (color output requires a TTY; usedocker run -t(or-it) when running in Docker):
docker run -it --rm ghcr.io/github/github-mcp-server tool-search "issue" --max-results 5
github-mcp-server tool-search "issue" --max-results 5
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.
When no toolsets are specified, default toolsets are used.
Looking for examples? See the Server Configuration Guide for common recipes like minimal setups, read-only mode, and combining tools with toolsets.
Specifying Toolsets
To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:
-
Using Command Line Argument:
github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security -
Using Environment Variable:
GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server
The environment variable GITHUB_TOOLSETS takes precedence over the command line argument if both are provided.
Specifying Individual Tools
You can also configure specific tools using the --tools flag. Tools can be used independently or combined with toolsets and dynamic toolsets discovery for fine-grained control.
-
Using Command Line Argument:
github-mcp-server --tools get_file_contents,issue_read,create_pull_request -
Using Environment Variable:
GITHUB_TOOLS="get_file_contents,issue_read,create_pull_request" ./github-mcp-server -
Combining with Toolsets (additive):
github-mcp-server --toolsets repos,issues --tools get_gistThis registers all tools from
reposandissuestoolsets, plusget_gist. -
Combining with Dynamic Toolsets (additive):
github-mcp-server --tools get_file_contents --dynamic-toolsetsThis registers
get_file_contentsplus the dynamic toolset tools (enable_toolset,list_available_toolsets,get_toolset_tools).
Important Notes:
- Tools, toolsets, and dynamic toolsets can all be used together
- Read-only mode takes priority: write tools are skipped if
--read-onlyis set, even if explicitly requested via--tools - Tool names must match exactly (e.g.,
get_file_contents, notgetFileContents). Invalid tool names will cause the server to fail at startup with an error message - When tools are renamed, old names are preserved as aliases for backward compatibility. See Deprecated Tool Aliases for details.
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" \
ghcr.io/github/github-mcp-server
Using Tools With Docker
When using Docker, you can pass specific tools as environment variables. You can also combine tools with toolsets:
# Tools only
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_TOOLS="get_file_contents,issue_read,create_pull_request" \
ghcr.io/github/github-mcp-server
# Tools combined with toolsets (additive)
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_TOOLSETS="repos,issues" \
-e GITHUB_TOOLS="get_gist" \
ghcr.io/github/github-mcp-server
Special toolsets
"all" toolset
The special toolset all 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
"default" toolset
The default toolset default is the configuration that gets passed to the server if no toolsets are specified.
The default configuration is:
- context
- repos
- issues
- pull_requests
- users
To keep the default configuration and add additional toolsets:
GITHUB_TOOLSETS="default,stargazers" ./github-mcp-server
Insiders Mode
The local GitHub MCP Server offers an insiders version with early access to new features and experimental tools.
-
Using Command Line Argument:
./github-mcp-server --insiders -
Using Environment Variable:
GITHUB_INSIDERS=true ./github-mcp-server
When using Docker:
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_INSIDERS=true \
ghcr.io/github/github-mcp-server
Available Toolsets
The following sets of tools are available:
<!-- START AUTOMATED TOOLSETS -->| Toolset | Description | |
|---|---|---|
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/person-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/person-light.png"><img src="pkg/octicons/icons/person-light.png" width="20" height="20" alt="person"></picture> | context | Strongly recommended: Tools that provide context about the current user and GitHub context you are operating in |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/workflow-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/workflow-light.png"><img src="pkg/octicons/icons/workflow-light.png" width="20" height="20" alt="workflow"></picture> | actions | GitHub Actions workflows and CI/CD operations |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/codescan-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/codescan-light.png"><img src="pkg/octicons/icons/codescan-light.png" width="20" height="20" alt="codescan"></picture> | code_security | Code security related tools, such as GitHub Code Scanning |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/dependabot-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/dependabot-light.png"><img src="pkg/octicons/icons/dependabot-light.png" width="20" height="20" alt="dependabot"></picture> | dependabot | Dependabot tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/comment-discussion-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/comment-discussion-light.png"><img src="pkg/octicons/icons/comment-discussion-light.png" width="20" height="20" alt="comment-discussion"></picture> | discussions | GitHub Discussions related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/logo-gist-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/logo-gist-light.png"><img src="pkg/octicons/icons/logo-gist-light.png" width="20" height="20" alt="logo-gist"></picture> | gists | GitHub Gist related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/git-branch-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/git-branch-light.png"><img src="pkg/octicons/icons/git-branch-light.png" width="20" height="20" alt="git-branch"></picture> | git | GitHub Git API related tools for low-level Git operations |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/issue-opened-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/issue-opened-light.png"><img src="pkg/octicons/icons/issue-opened-light.png" width="20" height="20" alt="issue-opened"></picture> | issues | GitHub Issues related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/tag-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/tag-light.png"><img src="pkg/octicons/icons/tag-light.png" width="20" height="20" alt="tag"></picture> | labels | GitHub Labels related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/bell-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/bell-light.png"><img src="pkg/octicons/icons/bell-light.png" width="20" height="20" alt="bell"></picture> | notifications | GitHub Notifications related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/organization-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/organization-light.png"><img src="pkg/octicons/icons/organization-light.png" width="20" height="20" alt="organization"></picture> | orgs | GitHub Organization related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/project-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/project-light.png"><img src="pkg/octicons/icons/project-light.png" width="20" height="20" alt="project"></picture> | projects | GitHub Projects related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/git-pull-request-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/git-pull-request-light.png"><img src="pkg/octicons/icons/git-pull-request-light.png" width="20" height="20" alt="git-pull-request"></picture> | pull_requests | GitHub Pull Request related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/repo-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/repo-light.png"><img src="pkg/octicons/icons/repo-light.png" width="20" height="20" alt="repo"></picture> | repos | GitHub Repository related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/shield-lock-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/shield-lock-light.png"><img src="pkg/octicons/icons/shield-lock-light.png" width="20" height="20" alt="shield-lock"></picture> | secret_protection | Secret protection related tools, such as GitHub Secret Scanning |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/shield-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/shield-light.png"><img src="pkg/octicons/icons/shield-light.png" width="20" height="20" alt="shield"></picture> | security_advisories | Security advisories related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/star-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/star-light.png"><img src="pkg/octicons/icons/star-light.png" width="20" height="20" alt="star"></picture> | stargazers | GitHub Stargazers related tools |
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/people-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/people-light.png"><img src="pkg/octicons/icons/people-light.png" width="20" height="20" alt="people"></picture> | users | GitHub User related tools |
Additional Toolsets in Remote GitHub MCP Server
| Toolset | Description |
|---|---|
copilot | Copilot related tools (e.g. Copilot Coding Agent) |
copilot_spaces | Copilot Spaces related tools |
github_support_docs_search | Search docs to answer GitHub product and support questions |
Tools
<!-- START AUTOMATED TOOLS --> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/workflow-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/workflow-light.png"><img src="pkg/octicons/icons/workflow-light.png" width="20" height="20" alt="workflow"></picture> Actions</summary>-
actions_get - Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)
- Required OAuth Scopes:
repo method: The method to execute (string, required)owner: Repository owner (string, required)repo: Repository name (string, required)resource_id: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'get_workflow' method.
- Provide a workflow run ID for 'get_workflow_run', 'get_workflow_run_usage', and 'get_workflow_run_logs_url' methods.
- Provide an artifact ID for 'download_workflow_run_artifact' method.
- Provide a job ID for 'get_workflow_job' method. (string, required)
- Required OAuth Scopes:
-
actions_list - List GitHub Actions workflows in a repository
- Required OAuth Scopes:
repo method: The action to perform (string, required)owner: Repository owner (string, required)page: Page number for pagination (default: 1) (number, optional)per_page: Results per page for pagination (default: 30, max: 100) (number, optional)repo: Repository name (string, required)resource_id: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:- Do not provide any resource ID for 'list_workflows' method.
- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'list_workflow_runs' method, or omit to list all workflow runs in the repository.
- Provide a workflow run ID for 'list_workflow_jobs' and 'list_workflow_run_artifacts' methods. (string, optional)
workflow_jobs_filter: Filters for workflow jobs. ONLY used when method is 'list_workflow_jobs' (object, optional)workflow_runs_filter: Filters for workflow runs. ONLY used when method is 'list_workflow_runs' (object, optional)
- Required OAuth Scopes:
-
actions_run_trigger - Trigger GitHub Actions workflow actions
- Required OAuth Scopes:
repo inputs: Inputs the workflow accepts. Only used for 'run_workflow' method. (object, optional)method: The method to execute (string, required)owner: Repository owner (string, required)ref: The git reference for the workflow. The reference can be a branch or tag name. Required for 'run_workflow' method. (string, optional)repo: Repository name (string, required)run_id: The ID of the workflow run. Required for all methods except 'run_workflow'. (number, optional)workflow_id: The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml). Required for 'run_workflow' method. (string, optional)
- Required OAuth Scopes:
-
get_job_logs - Get GitHub Actions workflow job logs
- Required OAuth Scopes:
repo failed_only: When true, gets logs for all failed jobs in the workflow run specified by run_id. Requires run_id to be provided. (boolean, optional)job_id: The unique identifier of the workflow job. Required when getting logs for a single job. (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: The unique identifier of the workflow run. Required when failed_only is true to get logs for all failed jobs in the run. (number, optional)tail_lines: Number of lines to return from the end of the log (number, optional)
- Required OAuth Scopes:
-
get_code_scanning_alert - Get code scanning alert
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events alertNumber: The number of the alert. (number, required)owner: The owner of the repository. (string, required)repo: The name of the repository. (string, required)
- Required OAuth Scopes:
-
list_code_scanning_alerts - List code scanning alerts
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events 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)
- Required OAuth Scopes:
-
get_me - Get my user profile
- No parameters required
-
get_team_members - Get team members
- Required OAuth Scopes:
read:org - Accepted OAuth Scopes:
admin:org,read:org,write:org org: Organization login (owner) that contains the team. (string, required)team_slug: Team slug (string, required)
- Required OAuth Scopes:
-
get_teams - Get teams
- Required OAuth Scopes:
read:org - Accepted OAuth Scopes:
admin:org,read:org,write:org user: Username to get teams for. If not provided, uses the authenticated user. (string, optional)
- Required OAuth Scopes:
-
get_dependabot_alert - Get dependabot alert
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events alertNumber: The number of the alert. (number, required)owner: The owner of the repository. (string, required)repo: The name of the repository. (string, required)
- Required OAuth Scopes:
-
list_dependabot_alerts - List dependabot alerts
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events owner: The owner of the repository. (string, required)repo: The name of the repository. (string, required)severity: Filter dependabot alerts by severity (string, optional)state: Filter dependabot alerts by state. Defaults to open (string, optional)
- Required OAuth Scopes:
-
get_discussion - Get discussion
- Required OAuth Scopes:
repo discussionNumber: Discussion Number (number, required)owner: Repository owner (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
get_discussion_comments - Get discussion comments
- Required OAuth Scopes:
repo after: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)discussionNumber: Discussion Number (number, required)owner: Repository owner (string, required)perPage: Results per page for pagination (min 1, max 100) (number, optional)repo: Repository name (string, required)
- Required OAuth Scopes:
-
list_discussion_categories - List discussion categories
- Required OAuth Scopes:
repo owner: Repository owner (string, required)repo: Repository name. If not provided, discussion categories will be queried at the organisation level. (string, optional)
- Required OAuth Scopes:
-
list_discussions - List discussions
- Required OAuth Scopes:
repo after: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)category: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)direction: Order direction. (string, optional)orderBy: Order discussions by field. If provided, the 'direction' also needs to be provided. (string, optional)owner: Repository owner (string, required)perPage: Results per page for pagination (min 1, max 100) (number, optional)repo: Repository name. If not provided, discussions will be queried at the organisation level. (string, optional)
- Required OAuth Scopes:
-
create_gist - Create Gist
- Required OAuth Scopes:
gist content: Content for simple single-file gist creation (string, required)description: Description of the gist (string, optional)filename: Filename for simple single-file gist creation (string, required)public: Whether the gist is public (boolean, optional)
- Required OAuth Scopes:
-
get_gist - Get Gist Content
gist_id: The ID of the gist (string, required)
-
list_gists - List Gists
page: Page number for pagination (min 1) (number, optional)perPage: Results per page for pagination (min 1, max 100) (number, optional)since: Only gists updated after this time (ISO 8601 timestamp) (string, optional)username: GitHub username (omit for authenticated user's gists) (string, optional)
-
update_gist - Update Gist
- Required OAuth Scopes:
gist content: Content for the file (string, required)description: Updated description of the gist (string, optional)filename: Filename to update or create (string, required)gist_id: ID of the gist to update (string, required)
- Required OAuth Scopes:
- get_repository_tree - Get repository tree
- Required OAuth Scopes:
repo owner: Repository owner (username or organization) (string, required)path_filter: Optional path prefix to filter the tree results (e.g., 'src/' to only show files in the src directory) (string, optional)recursive: Setting this parameter to true returns the objects or subtrees referenced by the tree. Default is false (boolean, optional)repo: Repository name (string, required)tree_sha: The SHA1 value or ref (branch or tag) name of the tree. Defaults to the repository's default branch (string, optional)
- Required OAuth Scopes:
-
add_issue_comment - Add comment to issue
- Required OAuth Scopes:
repo body: Comment content (string, required)issue_number: Issue number to comment on (number, required)owner: Repository owner (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
assign_copilot_to_issue - Assign Copilot to issue
- Required OAuth Scopes:
repo base_ref: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch (string, optional)custom_instructions: Optional custom instructions to guide the agent beyond the issue body. Use this to provide additional context, constraints, or guidance that is not captured in the issue description (string, optional)issue_number: Issue number (number, required)owner: Repository owner (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
get_label - Get a specific label from a repository.
- Required OAuth Scopes:
repo name: Label name. (string, required)owner: Repository owner (username or organization name) (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
issue_read - Get issue details
- Required OAuth Scopes:
repo issue_number: The number of the issue (number, required)method: The read operation to perform on a single issue. Options are:- get - Get details of a specific issue.
- get_comments - Get issue comments.
- get_sub_issues - Get sub-issues of the issue.
- get_labels - Get labels assigned to the issue. (string, required)
owner: The owner of the repository (string, required)page: Page number for pagination (min 1) (number, optional)perPage: Results per page for pagination (min 1, max 100) (number, optional)repo: The name of the repository (string, required)
- Required OAuth Scopes:
-
issue_write - Create or update issue.
- Required OAuth Scopes:
repo assignees: Usernames to assign to this issue (string[], optional)body: Issue body content (string, optional)duplicate_of: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)issue_number: Issue number to update (number, optional)labels: Labels to apply to this issue (string[], optional)method: Write operation to perform on a single issue. Options are:- 'create' - creates a new issue.
- 'update' - updates an existing issue. (string, required)
milestone: Milestone number (number, optional)owner: Repository owner (string, required)repo: Repository name (string, required)state: New state (string, optional)state_reason: Reason for the state change. Ignored unless state is changed. (string, optional)title: Issue title (string, optional)type: Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter. (string, optional)
- Required OAuth Scopes:
-
list_issue_types - List available issue types
- Required OAuth Scopes:
read:org - Accepted OAuth Scopes:
admin:org,read:org,write:org owner: The organization owner of the repository (string, required)
- Required OAuth Scopes:
-
list_issues - List issues
- Required OAuth Scopes:
repo after: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)direction: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)labels: Filter by labels (string[], optional)orderBy: Order issues by field. If provided, the 'direction' also needs to be provided. (string, optional)owner: Repository owner (string, required)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)state: Filter by state, by default both open and closed issues are returned when not provided (string, optional)
- Required OAuth Scopes:
-
search_issues - Search issues
- Required OAuth Scopes:
repo order: Sort order (string, optional)owner: Optional repository owner. If provided with repo, only issues 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 issues for this repository are listed. (string, optional)sort: Sort field by number of matches of categories, defaults to best match (string, optional)
- Required OAuth Scopes:
-
sub_issue_write - Change sub-issue
- Required OAuth Scopes:
repo after_id: The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) (number, optional)before_id: The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) (number, optional)issue_number: The number of the parent issue (number, required)method: The action to perform on a single sub-issue Options are:- 'add' - add a sub-issue to a parent issue in a GitHub repository.
- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.
- 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position. (string, required)
owner: Repository owner (string, required)replace_parent: When true, replaces the sub-issue's current parent issue. Use with 'add' method only. (boolean, optional)repo: Repository name (string, required)sub_issue_id: The ID of the sub-issue to add. ID is not the same as issue number (number, required)
- Required OAuth Scopes:
-
get_label - Get a specific label from a repository.
- Required OAuth Scopes:
repo name: Label name. (string, required)owner: Repository owner (username or organization name) (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
label_write - Write operations on repository labels.
- Required OAuth Scopes:
repo color: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)description: Label description text. Optional for 'create' and 'update'. (string, optional)method: Operation to perform: 'create', 'update', or 'delete' (string, required)name: Label name - required for all operations (string, required)new_name: New name for the label (used only with 'update' method to rename) (string, optional)owner: Repository owner (username or organization name) (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
list_label - List labels from a repository
- Required OAuth Scopes:
repo owner: Repository owner (username or organization name) - required for all operations (string, required)repo: Repository name - required for all operations (string, required)
- Required OAuth Scopes:
-
dismiss_notification - Dismiss notification
- Required OAuth Scopes:
notifications state: The new state of the notification (read/done) (string, required)threadID: The ID of the notification thread (string, required)
- Required OAuth Scopes:
-
get_notification_details - Get notification details
- Required OAuth Scopes:
notifications notificationID: The ID of the notification (string, required)
- Required OAuth Scopes:
-
list_notifications - List notifications
- Required OAuth Scopes:
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)
- Required OAuth Scopes:
-
manage_notification_subscription - Manage notification subscription
- Required OAuth Scopes:
notifications action: Action to perform: ignore, watch, or delete the notification subscription. (string, required)notificationID: The ID of the notification thread. (string, required)
- Required OAuth Scopes:
-
manage_repository_notification_subscription - Manage repository notification subscription
- Required OAuth Scopes:
notifications 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)
- Required OAuth Scopes:
-
mark_all_notifications_read - Mark all notifications as read
- Required OAuth Scopes:
notifications 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)
- Required OAuth Scopes:
- search_orgs - Search organizations
- Required OAuth Scopes:
read:org - Accepted OAuth Scopes:
admin:org,read:org,write:org 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: Organization search query. Examples: 'microsoft', 'location:california', 'created:>=2025-01-01'. Search is automatically scoped to type:org. (string, required)sort: Sort field by category (string, optional)
- Required OAuth Scopes:
-
projects_get - Get details of GitHub Projects resources
- Required OAuth Scopes:
read:project - Accepted OAuth Scopes:
project,read:project field_id: The field's ID. Required for 'get_project_field' method. (number, optional)fields: Specific list of field IDs to include in the response when getting a project item (e.g. ["102589", "985201", "169875"]). If not provided, only the title field is included. Only used for 'get_project_item' method. (string[], optional)item_id: The item's ID. Required for 'get_project_item' method. (number, optional)method: The method to execute (string, required)owner: The owner (user or organization login). The name is not case sensitive. (string, optional)owner_type: Owner type (user or org). If not provided, will be automatically detected. (string, optional)project_number: The project's number. (number, optional)status_update_id: The node ID of the project status update. Required for 'get_project_status_update' method. (string, optional)
- Required OAuth Scopes:
-
projects_list - List GitHub Projects resources
- Required OAuth Scopes:
read:project - Accepted OAuth Scopes:
project,read:project after: Forward pagination cursor from previous pageInfo.nextCursor. (string, optional)before: Backward pagination cursor from previous pageInfo.prevCursor (rare). (string, optional)fields: Field IDs to include when listing project items (e.g. ["102589", "985201"]). CRITICAL: Always provide to get field values. Without this, only titles returned. Only used for 'list_project_items' method. (string[], optional)method: The action to perform (string, required)owner: The owner (user or organization login). The name is not case sensitive. (string, required)owner_type: Owner type (user or org). If not provided, will automatically try both. (string, optional)per_page: Results per page (max 50) (number, optional)project_number: The project's number. Required for 'list_project_fields', 'list_project_items', and 'list_project_status_updates' methods. (number, optional)query: Filter/query string. For list_projects: filter by title text and state (e.g. "roadmap is:open"). For list_project_items: advanced filtering using GitHub's project filtering syntax. (string, optional)
- Required OAuth Scopes:
-
projects_write - Modify GitHub Project items
- Required OAuth Scopes:
project body: The body of the status update (markdown). Used for 'create_project_status_update' method. (string, optional)issue_number: The issue number (use when item_type is 'issue' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)item_id: The project item ID. Required for 'update_project_item' and 'delete_project_item' methods. (number, optional)item_owner: The owner (user or organization) of the repository containing the issue or pull request. Required for 'add_project_item' method. (string, optional)item_repo: The name of the repository containing the issue or pull request. Required for 'add_project_item' method. (string, optional)item_type: The item's type, either issue or pull_request. Required for 'add_project_item' method. (string, optional)method: The method to execute (string, required)owner: The project owner (user or organization login). The name is not case sensitive. (string, required)owner_type: Owner type (user or org). If not provided, will be automatically detected. (string, optional)project_number: The project's number. (number, required)pull_request_number: The pull request number (use when item_type is 'pull_request' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)start_date: The start date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)status: The status of the project. Used for 'create_project_status_update' method. (string, optional)target_date: The target date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)updated_field: Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set value to null. Example: {"id": 123456, "value": "New Value"}. Required for 'update_project_item' method. (object, optional)
- Required OAuth Scopes:
-
add_comment_to_pending_review - Add review comment to the requester's latest pending pull request review
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
add_reply_to_pull_request_comment - Add reply to pull request comment
- Required OAuth Scopes:
repo body: The text of the reply (string, required)commentId: The ID of the comment to reply to (number, required)owner: Repository owner (string, required)pullNumber: Pull request number (number, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
create_pull_request - Open new pull request
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
list_pull_requests - List pull requests
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
merge_pull_request - Merge pull request
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
pull_request_read - Get details for a single pull request
- Required OAuth Scopes:
repo method: Action to specify what pull request data needs to be retrieved from GitHub. Possible options:- get - Get details of a specific pull request.
- get_diff - Get the diff of a pull request.
- get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
- get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
- get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns threads with metadata (isResolved, isOutdated, isCollapsed) and their associated comments. Use cursor-based pagination (perPage, after) to control results.
- get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
- get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned. (string, required)
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)
- Required OAuth Scopes:
-
pull_request_review_write - Write operations (create, submit, delete) on pull request reviews.
- Required OAuth Scopes:
repo body: Review comment text (string, optional)commitID: SHA of commit to review (string, optional)event: Review action to perform. (string, optional)method: The write operation to perform on pull request review. (string, required)owner: Repository owner (string, required)pullNumber: Pull request number (number, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
request_copilot_review - Request Copilot review
- Required OAuth Scopes:
repo owner: Repository owner (string, required)pullNumber: Pull request number (number, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
search_pull_requests - Search pull requests
- Required OAuth Scopes:
repo order: Sort order (string, optional)owner: Optional repository owner. If provided with repo, only pull requests 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 pull requests for this repository are listed. (string, optional)sort: Sort field by number of matches of categories, defaults to best match (string, optional)
- Required OAuth Scopes:
-
update_pull_request - Edit pull request
- Required OAuth Scopes:
repo base: New base branch name (string, optional)body: New description (string, optional)draft: Mark pull request as draft (true) or ready for review (false) (boolean, 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)reviewers: GitHub usernames to request reviews from (string[], optional)state: New state (string, optional)title: New title (string, optional)
- Required OAuth Scopes:
-
update_pull_request_branch - Update pull request branch
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
create_branch - Create branch
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
create_or_update_file - Create or update file
- Required OAuth Scopes:
repo 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: The blob SHA of the file being replaced. (string, optional)
- Required OAuth Scopes:
-
create_repository - Create repository
- Required OAuth Scopes:
repo autoInit: Initialize with README (boolean, optional)description: Repository description (string, optional)name: Repository name (string, required)organization: Organization to create the repository in (omit to create in your personal account) (string, optional)private: Whether repo should be private (boolean, optional)
- Required OAuth Scopes:
-
delete_file - Delete file
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
fork_repository - Fork repository
- Required OAuth Scopes:
repo organization: Organization to fork to (string, optional)owner: Repository owner (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
get_commit - Get commit details
- Required OAuth Scopes:
repo include_diff: Whether to include file diffs and stats in the response. Default is true. (boolean, 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: Commit SHA, branch name, or tag name (string, required)
- Required OAuth Scopes:
-
get_file_contents - Get file or directory contents
- Required OAuth Scopes:
repo owner: Repository owner (username or organization) (string, required)path: Path to file/directory (string, optional)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 commit SHA. If specified, it will be used instead of ref (string, optional)
- Required OAuth Scopes:
-
get_latest_release - Get latest release
- Required OAuth Scopes:
repo owner: Repository owner (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
get_release_by_tag - Get a release by tag name
- Required OAuth Scopes:
repo owner: Repository owner (string, required)repo: Repository name (string, required)tag: Tag name (e.g., 'v1.0.0') (string, required)
- Required OAuth Scopes:
-
get_tag - Get tag details
- Required OAuth Scopes:
repo owner: Repository owner (string, required)repo: Repository name (string, required)tag: Tag name (string, required)
- Required OAuth Scopes:
-
list_branches - List branches
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
list_commits - List commits
- Required OAuth Scopes:
repo author: Author username or email address to filter commits by (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: Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)
- Required OAuth Scopes:
-
list_releases - List releases
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
list_tags - List tags
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
push_files - Push files to repository
- Required OAuth Scopes:
repo 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)
- Required OAuth Scopes:
-
search_code - Search code
- Required OAuth Scopes:
repo order: Sort order for results (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's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more. (string, required)sort: Sort field ('indexed' only) (string, optional)
- Required OAuth Scopes:
-
search_repositories - Search repositories
- Required OAuth Scopes:
repo minimal_output: Return minimal repository information (default: true). When false, returns full GitHub API repository objects. (boolean, optional)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: Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. (string, required)sort: Sort repositories by field, defaults to best match (string, optional)
- Required OAuth Scopes:
-
get_secret_scanning_alert - Get secret scanning alert
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events alertNumber: The number of the alert. (number, required)owner: The owner of the repository. (string, required)repo: The name of the repository. (string, required)
- Required OAuth Scopes:
-
list_secret_scanning_alerts - List secret scanning alerts
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events 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)
- Required OAuth Scopes:
-
get_global_security_advisory - Get a global security advisory
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events ghsaId: GitHub Security Advisory ID (format: GHSA-xxxx-xxxx-xxxx). (string, required)
- Required OAuth Scopes:
-
list_global_security_advisories - List global security advisories
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events affects: Filter advisories by affected package or version (e.g. "package1,package2@1.0.0"). (string, optional)cveId: Filter by CVE ID. (string, optional)cwes: Filter by Common Weakness Enumeration IDs (e.g. ["79", "284", "22"]). (string[], optional)ecosystem: Filter by package ecosystem. (string, optional)ghsaId: Filter by GitHub Security Advisory ID (format: GHSA-xxxx-xxxx-xxxx). (string, optional)isWithdrawn: Whether to only return withdrawn advisories. (boolean, optional)modified: Filter by publish or update date or date range (ISO 8601 date or range). (string, optional)published: Filter by publish date or date range (ISO 8601 date or range). (string, optional)severity: Filter by severity. (string, optional)type: Advisory type. (string, optional)updated: Filter by update date or date range (ISO 8601 date or range). (string, optional)
- Required OAuth Scopes:
-
list_org_repository_security_advisories - List org repository security advisories
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events direction: Sort direction. (string, optional)org: The organization login. (string, required)sort: Sort field. (string, optional)state: Filter by advisory state. (string, optional)
- Required OAuth Scopes:
-
list_repository_security_advisories - List repository security advisories
- Required OAuth Scopes:
security_events - Accepted OAuth Scopes:
repo,security_events direction: Sort direction. (string, optional)owner: The owner of the repository. (string, required)repo: The name of the repository. (string, required)sort: Sort field. (string, optional)state: Filter by advisory state. (string, optional)
- Required OAuth Scopes:
-
list_starred_repositories - List starred repositories
- Required OAuth Scopes:
repo direction: The direction to sort the results by. (string, optional)page: Page number for pagination (min 1) (number, optional)perPage: Results per page for pagination (min 1, max 100) (number, optional)sort: How to sort the results. Can be either 'created' (when the repository was starred) or 'updated' (when the repository was last pushed to). (string, optional)username: Username to list starred repositories for. Defaults to the authenticated user. (string, optional)
- Required OAuth Scopes:
-
star_repository - Star repository
- Required OAuth Scopes:
repo owner: Repository owner (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
-
unstar_repository - Unstar repository
- Required OAuth Scopes:
repo owner: Repository owner (string, required)repo: Repository name (string, required)
- Required OAuth Scopes:
- search_users - Search users
- Required OAuth Scopes:
repo 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: User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user. (string, required)sort: Sort users by number of followers or repositories, or when the person joined GitHub. (string, optional)
- Required OAuth Scopes:
Additional Tools in Remote GitHub MCP Server
<details> <summary>Copilot</summary>- create_pull_request_with_copilot - Perform task with GitHub Copilot coding agent
owner: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)repo: Repository name. You can guess the repository name, but confirm it with the user before proceeding. (string, required)problem_statement: Detailed description of the task to be performed (e.g., 'Implement a feature that does X', 'Fix bug Y', etc.) (string, required)title: Title for the pull request that will be created (string, required)base_ref: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch (string, optional)
-
get_copilot_space - Get Copilot Space
owner: The owner of the space. (string, required)name: The name of the space. (string, required)
-
list_copilot_spaces - List Copilot Spaces
- github_support_docs_search - Retrieve documentation relevant to answer GitHub product and support questions. Support topics include: GitHub Actions Workflows, Authentication, GitHub Support Inquiries, Pull Request Practices, Repository Maintenance, GitHub Pages, GitHub Packages, GitHub Discussions, Copilot Spaces
query: Input from the user about the question they need answered. This is the latest raw unedited user message. You should ALWAYS leave the user message as it is, you should never modify it. (string, required)
Dynamic Tool Discovery
Note: This feature is currently in beta and is not available in the Remote GitHub MCP Server. 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
Lockdown Mode
Lockdown mode limits the content that the server will surface from public repositories. When enabled, the server checks whether the author of each item has push access to the repository. Private repositories are unaffected, and collaborators keep full access to their own content.
./github-mcp-server --lockdown-mode
When running with Docker, set the corresponding environment variable:
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_LOCKDOWN_MODE=1 \
ghcr.io/github/github-mcp-server
The behavior of lockdown mode depends on the tool invoked.
Following tools will return an error when the author lacks the push access:
issue_read:getpull_request_read:get
Following tools will filter out content from users lacking the push access:
issue_read:get_commentsissue_read:get_sub_issuespull_request_read:get_commentspull_request_read:get_review_commentspull_request_read:get_reviews
i18n / Overriding Descriptions
The descriptions of the tools can be overridden by creating a
github-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 new descriptions 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 with
the --export-translations flag.
This flag will preserve any translations/overrides you have made, while adding any new translations that have been added to the binary since the last time you exported.
./github-mcp-server --export-translations
cat github-mcp-server-config.json
You can also use ENV vars to override the descriptions. The environment
variable names are the same as the keys in the JSON file, prefixed with
GITHUB_MCP_ and all uppercase.
For example, to override the TOOL_ADD_ISSUE_COMMENT_DESCRIPTION tool, you can
set the following environment variable:
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
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 to MIT for the full terms.