GitHub MCP Server
Official GitHub MCP server for repositories, issues, pull requests, Actions and more – local or as GitHub's hosted remote server.
- Skill Road
- GitHub MCP Server
Categories
Description
The GitHub MCP Server is GitHub's official MCP server, maintained in the github/github-mcp-server repository. It exposes repositories, issues, pull requests, GitHub Actions and other GitHub features as MCP tools. License MIT.
Per the documentation, it runs in two modes: as GitHub's own hosted remote server at https://api.githubcopilot.com/mcp/ (with OAuth or personal-access-token login), or locally via a Docker image.
Its tools are organised into toolsets, including: Repositories (code, files, commits, branches), Issues, Pull Requests (reviews, merges, diffs, checks), Actions (workflows, runs, artifacts, job logs), Code Security (scanning alerts, Dependabot, secret protection), Discussions, Projects, Notifications, Organizations, plus Gists and user information. Per the documentation, the default toolsets are context, repos, issues, pull_requests and users.
Authentication is via OAuth (browser-based login, token kept in memory only) or a personal access token through the GITHUB_PERSONAL_ACCESS_TOKEN environment variable. A GitHub App login is also available for non-interactive deployments. GitHub Enterprise Server and ghe.com are supported via the GITHUB_HOST variable.
Local start via Docker:
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
Registered in an MCP client:
{
"mcpServers": {
"github": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"]
}
}
}
Alternatively it can be built from source: go build -o github-mcp-server ./cmd/github-mcp-server, run via ./github-mcp-server stdio.
Hosted vs. local operation
The hosted remote server is the simpler entry point for most cases: just add the URL to the client and complete the OAuth login in a browser, without running Docker or your own runtime environment. GitHub handles operating and updating the server. Local operation via Docker or a self-built binary pays off when stricter control over network access, logging, or toolset selection is needed, or when GitHub Enterprise Server or ghe.com are in use, for which, per the documentation, only local mode is available.
Scoping toolsets deliberately
Because the GitHub MCP Server potentially carries broad permissions over repositories, Actions, and organization data, the documentation recommends enabling only the toolsets actually needed instead of unlocking every available feature group. Read-only mode disables all write tools and suits research or reporting tasks where no changes to code or issues are required. An additional lockdown mode further restricts processing of untrusted content, reducing the risk that instructions hidden in issues or pull request comments get executed unintentionally.
Who the GitHub MCP Server fits
Teams that want to connect an AI agent directly to their development workflow benefit the most: automated triage of new issues, drafting pull requests from a task description, summarizing Actions failures, or searching security alerts from code scanning and Dependabot. For individual developers who only occasionally search a repository or check an issue status, a minimally scoped token combined with read-only mode is often enough.
Frequently asked questions
Do I need Docker to use the server? No, the hosted remote server needs neither Docker nor a local installation. Does the server work with GitHub Enterprise Server? Yes, via the GITHUB_HOST environment variable, though per the documentation only in local operation. Can the agent accidentally delete code? Only if correspondingly broad write permissions were granted; read-only mode, lockdown mode, and minimally scoped tokens prevent that.
Requirements
The hosted remote server requires a GitHub account, a client that supports remote MCP, and any approvals required by the organization. Local operation requires Docker or a self-built Go binary. GitHub Enterprise Server supports local operation only.
Installation instructions
The official GitHub MCP Server can read source code and, depending on enabled tools, modify repositories, issues, and pull requests. Begin with the smallest required permission set.
Step 1: Setting up GitHub MCP as a remote server
Configure this URL in a client that supports remote MCP:
https://api.githubcopilot.com/mcp/
If the client supports GitHub's OAuth flow, no manually created token is required. Otherwise, use a fine-grained personal access token as a Bearer token. Limit its repository selection and permissions precisely to the task.
Step 2: Setting up GitHub MCP locally
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
Pass the token through the client's protected environment management and never as plain text in a committed configuration file. Browser-based OAuth is also available locally.
Limiting GitHub MCP capabilities
Start in read-only mode whenever possible and enable only required toolsets. Lockdown mode further limits access to repositories where the authenticated user is a contributor. Enable write access only after a test run and with human confirmation.
Step 3: Verifying the setup
First test get_me and a read-only operation on a selected repository. Then review token or OAuth permissions in GitHub and revoke access that is no longer needed.
Choosing toolsets deliberately
The GitHub MCP Server organizes its functionality into toolsets such as repositories, issues, pull requests, Actions, and code security. Instead of enabling every group, only turn on the ones actually needed for the task at hand — anyone who just wants to search issues doesn't need access to Actions workflows or code security alerts. A smaller toolset selection reduces not only the security risk but also the number of tool definitions in the language model's context.
Step 4: Differences between OAuth and a personal access token
OAuth is usually the more convenient choice for interactive use, since no token has to be manually generated and managed; per the documentation, the token stays in memory only. For non-interactive automation, such as a CI/CD pipeline, a fine-grained personal access token or a GitHub App login is more practical, since no browser window can be opened there. In both cases, the rule holds: the narrower the permissions, the less damage a compromised client can do.
What to do if you suspect misuse
If the audit log shows unusual activity, such as commits or pull-request comments at unusual times, revoke the affected token or OAuth authorization immediately and replace it with a new, more narrowly scoped one. It's also worth reviewing the agent's most recent actions to identify and undo any unauthorized changes.
Treat this review as a routine step whenever an agent is given write access for the first time, not only after something looks suspicious.
Source: official github/github-mcp-server repository, checked on 2026-09-03.
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
Authentication
Supports OAuth, fine-grained or classic personal access tokens, and GitHub App authentication for non-interactive local deployments. During local OAuth, the token is kept in memory only according to the documentation. A configured GITHUB_PERSONAL_ACCESS_TOKEN takes precedence over OAuth.
Required access permissions
Effective permissions match those of the authenticated GitHub user or the token scopes. Depending on enabled toolsets, read and write access may include repositories, issues, pull requests, Actions, organizations, and security features. Grant minimal token scopes; use --read-only, selected toolsets, and lockdown mode to limit capabilities.
Transmitted or stored data
Requests and tool parameters are sent to the GitHub API or hosted remote server. Responses may include source code, commits, issues, pull requests, Actions logs, organization data, and security alerts, and are passed to the MCP client and its language model. Write tools persist changes on GitHub. Local OAuth keeps the access token in memory; a PAT resides in the client or process environment.
Security risks
An overprivileged or exposed token enables broad GitHub actions. Write tools can modify files, branches, issues, and pull requests; some capabilities can even delete repositories or files. Repository content may contain prompt injection. Use separate least-privilege tokens, never commit secrets, begin with read-only and lockdown modes, and require human review for changes.
License and costs
- License
- MIT
- Cost
- free
The server and source code are free under the MIT license. A GitHub account is required; available features, quotas, and potential costs depend on the GitHub plan and API limits in use.
Alternatives
At a glance
- Provider
- GitHub
- Status
- Official server
- Deployment
- Local and remote
- Current version
- 1.12.0
- GitHub stars
- 34,330
- Last reviewed
- 07.09.2026
Repository and documentation
Categories
Supported clients
Related guides
Guides and background related to this entry.