GitHub MCP Server Configuration & Usage Guide
Installationnpx
Risk LevelMedium Risk
API KeyRequired
Clients3 supported
GitHub API integration, supporting repository management, file operations, Issues, PRs, branches, and search
Supported Clients
- Claude Desktop
- Cursor
- VS Code / Cline
Installation Command
npx -y @modelcontextprotocol/server-githubConfiguration Example
{
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>"
}
}
}
}Environment variable required:GITHUB_PERSONAL_ACCESS_TOKEN。Do not commit these values to public repositories.
Permission Scope & Security Notes
Requires a GitHub Token. Can operate on repositories you have access to. Use a minimal-permission Token.
- network-access
- credential-required
Risk Score:3/10
Common Errors
- 401 Unauthorized
- Check if the Token has expired or has insufficient permissions
- Repository not found
- Confirm the Token has access to the repository
- rate limit exceeded
- GitHub API has rate limits, wait and retry
Sources
Recently Verified:2026-05-18。Client versions and configuration formats may change. Please refer to official documentation before use.