GitHub MCP Server
Interact with GitHub repositories, issues, pull requests, and the GitHub API.
Installation
npx -y @modelcontextprotocol/server-github claude_desktop_config.json
{
"mcpServers": {
"server-github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
} Environment Variables
| Variable | Required | Description |
|---|---|---|
GITHUB_PERSONAL_ACCESS_TOKEN | ✓ Required | GitHub personal access token with the required repo scopes. |
Prerequisites
- Node.js 18 or later
- Required API keys — see the Environment Variables table above
Common Errors
- Server not found / spawn error — ensure Node.js is on your PATH and the package is accessible via npx.
- Permission denied — check that the path in args is readable by the process running your AI client.
- Authentication failed — verify your API key is set correctly in the env block.