Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
unavailable — the image reference already carries a tag
Docker
docker run -i --rm ghcr.io/github/github-mcp-server:2.1.0Streamable HTTP
https://api.githubcopilot.com/mcp/
Pick your client — the config below is generated for this server (both local and hosted-endpoint forms). Copy respects the “Pin version” switch above.
claude_desktop_config.json
{
"mcpServers": {
"github-mcp-server-github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/github/github-mcp-server:2.1.0"
]
}
}
}Remote (hosted) endpoint
https://api.githubcopilot.com/mcp/
Claude Desktop: Settings → Connectors → Add custom connector, paste this URL, and provide: Authorization.
Format verified against the official Claude Desktop docs ↗.
terminal
claude mcp add github-mcp-server-github -- docker run -i --rm ghcr.io/github/github-mcp-server:2.1.0
terminal
claude mcp add --transport http github-mcp-server-github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer <YOUR_AUTHORIZATION>"
Format verified against the official Claude Code docs ↗.
.cursor/mcp.json
{
"mcpServers": {
"github-mcp-server-github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/github/github-mcp-server:2.1.0"
]
}
}
}.cursor/mcp.json (hosted endpoint)
{
"mcpServers": {
"github-mcp-server-github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "<YOUR_AUTHORIZATION>"
}
}
}
}Format verified against the official Cursor docs ↗.
.vscode/mcp.json
{
"servers": {
"github-mcp-server-github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/github/github-mcp-server:2.1.0"
]
}
}
}.vscode/mcp.json (hosted endpoint)
{
"servers": {
"github-mcp-server-github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "<YOUR_AUTHORIZATION>"
}
}
}
}Format verified against the official VS Code docs ↗.
mcp_config.json
{
"mcpServers": {
"github-mcp-server-github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/github/github-mcp-server:2.1.0"
]
}
}
}mcp_config.json (hosted endpoint)
{
"mcpServers": {
"github-mcp-server-github": {
"serverUrl": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "<YOUR_AUTHORIZATION>"
}
}
}
}Format verified against the official Windsurf docs ↗.
Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.
Authorization secret header — Authorization header with authentication token (PAT or App token)⭐ 33,637 stars · 最近更新于 27 天前 · MIT license
These star and push figures are for the shared repository — 2 listings on this site point at the same repository.
GitHub 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. Using the Go module The Go module path is github.com/github/github-mcp-server/v2 . Library consumers must use this prefix in imports, for example github.com/github/github-mcp-server/v2/pkg/github , and in go get commands. No /v2 subdirectory is needed when building from a repository checkout. The existing v2.0.0 tag predates this module-path correction and cannot be used as a Go module. After this change is merged, a new release such as v2.0.1 must be tagged from a commit containing the corrected module path. Until then, consumers can use a pseudo-version from a commit containing this change. --- 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: > > >Using OAuth > >Using a GitHub PAT > > > >VS Code (version 1.101 or greater) > > > > > > > > > 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 OpenCode - Installation guide for the OpenCode terminal agent Windsurf - Installation guide for Windsurf IDE Zed - Installation guide for Zed editor 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 > Try new features early! The remote server offers an insiders version with early access to new features and experimental tools. > > >Using URL Path > >Using Header > > > > > > > > > See Remote Server Documentation for more details and examples, and Insiders Features for a full list of what's available. GitHub Enterprise GitHub Enterprise Cloud with data residency (ghe.com) GitHub Enterprise Cloud can also make use of the remote server. Example for with GitHub PAT token: > 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 to docker logout ghcr.io . Authentication. On github.com you don't need to create anything up front — the one-click buttons above log you in with OAuth on first use (a browser-based flow; the token is kept in memory only). The Docker buttons publish a fixed callback port ( 127.0.0.1:8085 ) so the container's login callback is reachable. See Local Server OAuth Login for how it works, headless/device-code fallback, and bringing your own OAuth or GitHub App (required for GitHub Enterprise Server and ghe.com ). Prefer a token? You can still authenticate with a GitHub Personal Access Token by setting GITHUB PERSONAL ACCESS TOKEN instead (it takes precedence over OAuth). 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). > > >Handling PATs Securely > > Environment Variables (Recommended) To keep your GitHub PAT secure and reusable across different MCP hosts: Store your PAT in environment variables Or create a .env file: Protect your .env file Reference the token in configurations > 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 operations read:packages - Docker image access read: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 > 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 URI scheme. HTTPS is required and enforced: non-HTTPS hosts are refused so that credentials are never sent over cleartext (the only exception is a loopback host such as for local development). For GitHub Enterprise Cloud with data residency, use as the hostname. 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 one of the following JSON blocks to your IDE's MCP settings. Log in with OAuth (no token to create or store). On github.com the official image already includes the app credentials, so you provide none yourself: it runs a browser-based login on first use and keeps the resulting token in memory only . In Docker this needs a fixed callback port published to loopback so the container's login callback is reachable: See Local Server OAuth Login for the native-binary flow (no fixed port needed), the headless/device-code fallback, GitHub Enterprise Server / ghe.com , and bringing your own OAuth or GitHub App. For non-interactive stdio deployments, see GitHub App Authentication . Or authenticate with a Personal Access Token. Set GITHUB PERSONAL ACCESS TOKEN instead (it takes precedence over OAuth): 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. > > >Example JSON block without the MCP key included > > > > 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 OpenCode - Installation guide for the OpenCode terminal agent Windsurf - Installation guide for Windsurf IDE Zed - Installation guide for Zed editor 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 . STDIO API requests identify the server as github-mcp-server/ > and retain the upstream MCP client's name/version in parentheses when available. Control characters, quotes, backslashes and parentheses in client metadata are escaped so the HTTP header remains valid; ordinary names, versions, spaces and printable Unicode are preserved. Release builds keep their release version. Source and default Docker builds with revision metadata use vcs- > . The Docker publishing workflow preserves tag versions, including prereleases, and lets branch, pull-request and nightly builds use the linked source revision. The -dirty marker applies only when both the revision and modified state come from embedded VCS metadata, never to a valid, e…
Summary from the project README — github.com/github/github-mcp-server
Distributed as Docker, Streamable HTTP, listed under Developer Tools. Review our MCP security guide before granting access to real data.
GitHub 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. Using the Go module The Go module path is github.com/github/github-mcp-server/v2 . Library consumers must use this prefix in imports, for example github.com/github/github-mcp-server/v2/pkg/github , and in go get commands. No /v2 subdirectory is needed when building from a repository checkout. The existing v2.0.0 tag predates this module-path correction and cannot be used as a Go module. After this change is merged, a new release such as v2.0.1 must be tagged from a commit containing the corrected module path. Until then, consumers can use a pseudo-version from a commit containing this change. --- 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: > > >Using OAuth > >Using a GitHub PAT > > > >VS Code (version 1.101 or greater) > > > > > > > > > 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 OpenCode - Installation guide for the OpenCode terminal agent Windsurf - Installation guide for Windsurf IDE Zed - Installation guide for Zed editor 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 > Try new features early! The remote server offers an insiders version with early access to new features and experimental tools. > > >Using URL Path > >Using Header > > > > > > > > > See Remote Server Documentation for more details and examples, and Insiders Features for a full list of what's available. GitHub Enterprise GitHub Enterprise Cloud with data residency (ghe.com) GitHub Enterprise Cloud can also make use of the remote server. Example for with GitHub PAT token: > 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 to docker logout ghcr.io . Authentication. On github.com you don't need to create anything up front — the one-click buttons above log you in with OAuth on first use (a browser-based flow; the token is kept in memory only). The Docker buttons publish a fixed callback port ( 127.0.0.1:8085 ) so the container's login callback is reachable. See Local Server OAuth Login for how it works, headless/device-code fallback, and bringing your own OAuth or GitHub App (required for GitHub Enterprise Server and ghe.com ). Prefer a token? You can still authenticate with a GitHub Personal Access Token by setting GITHUB PERSONAL ACCESS TOKEN instead (it takes precedence over OAuth). 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). > > >Handling PATs Securely > > Environment Variables (Recommended) To keep your GitHub PAT secure and reusable across different MCP hosts: Store your PAT in environment variables Or create a .env file: Protect your .env file Reference the token in configurations > 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 operations read:packages - Docker image access read: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 > 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 URI scheme. HTTPS is required and enforced: non-HTTPS hosts are refused so that credentials are never sent over cleartext (the only exception is a loopback host such as for local development). For GitHub Enterprise Cloud with data residency, use as the hostname. 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 one of the following JSON blocks to your IDE's MCP settings. Log in with OAuth (no token to create or store). On github.com the official image already includes the app credentials, so you provide none yourself: it runs a browser-based login on first use and keeps the resulting token in memory only . In Docker this needs a fixed callback port published to loopback so the container's login callback is reachable: See Local Server OAuth Login for the native-binary flow (no fixed port needed), the headless/device-code fallback, GitHub Enterprise Server / ghe.com , and bringing your own OAuth or GitHub App. For non-interactive stdio deployments, see GitHub App Authentication . Or authenticate with a Personal Access Token. Set GITHUB PERSONAL ACCESS TOKEN instead (it takes precedence over OAuth): 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. > > >Example JSON block without the MCP key included > > > > 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 OpenCode - Installation guide for the OpenCode terminal agent Windsurf - Installation guide for Windsurf IDE Zed - Installation guide for Zed editor 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 . STDIO API requests identify the server as github-mcp-server/ > and retain the upstream MCP client's name/version in parentheses when available. Control characters, quotes, backslashes and parentheses in client metadata are escaped so the HTTP header remains valid; ordinary names, versions, spaces and printable Unicode are preserved. Release builds keep their release version. Source and default Docker builds with revision metadata use vcs- > . The Docker publishing workflow preserves tag versions, including prereleases, and lets branch, pull-request and nightly builds use the linked source revision. The -dirty marker applies only when both the revision and modified state come from embedded VCS metadata, never to a valid, e
Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.
The MCP server itself is free to install. The source is public on https://github.com/github/github-mcp-server. Any third-party service it calls may require its own API key and account.
Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.
Publish this server? Link back with a badge on your README or site — copy either snippet.
Markdown
[](https://mcpnav.net/server/github-mcp-server-github/)
HTML
<a href="https://mcpnav.net/server/github-mcp-server-github/"><img src="https://mcpnav.net/badge/github-mcp-server-github.svg" alt="Listed on MCPNav" height="20"></a>