GitHub MCP Server is an official open-source tool released by GitHub, based on the Model Context Protocol (MCP). It operates in a local environment, providing LLMs (Large Language Models) with access to the GitHub API via Docker or an executable file, supporting rich automation and interaction capabilities.
repos
, issues
, pull_requests
, code_security
(code scanning), notifications
, and more, totaling 7 default modules.ghcr.io/github/github-mcp-server
{
"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}"
}
}
GITHUB_TOOLSETS
, GITHUB_DYNAMIC_TOOLSETS
, GITHUB_READ_ONLY
, and GITHUB_HOST
environment variables.cd cmd/github-mcp-server
go build -o github-mcp-server
export GITHUB_PERSONAL_ACCESS_TOKEN=<token>
./github-mcp-server stdio
GITHUB_HOST
environment variable.Usage Method | Configuration Method | Description |
---|---|---|
Docker | Environment variables or command-line arguments | Set token, toolset, read/write permissions, host |
Direct Binary Execution | CLI or env | Similar to Docker, suitable for CI/CD pipeline integration |
VS Code config | .vscode/mcp.json or user settings |
Shareable project configuration |
i18n / Tool Description Customization | github-mcp-server-config.json |
Change prompt messages or multi-language support |
--read-only
mode to lock to a non-writable state.github-mcp-server
is a tool developed by GitHub based on the Anthropic MCP protocol, designed to standardize the presentation of GitHub API functionality to AI models. It features high configurability, a secure mode, and is integrated into mainstream AI clients (VS Code Copilot Chat, Claude Desktop, etc.), making it suitable for "AI-driven development" and CI/CD automation scenarios. However, it is still necessary to pay attention to the security risks of MCP itself and use it in conjunction with audit tools.