Connect Claude Code to GitHub for PR and issue management.
## GitHub MCP Server for Claude Code
Connect Claude Code to GitHub via Model Context Protocol.
### .claude/mcp-servers.json
```json
{
"mcpServers": {
"github-mcp": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
}
}
}
}
```
### Available Tools
Once connected, Claude Code can:
- Query GitHub data directly
- Create and update resources
- Monitor status and events
- Automate common workflows
### Setup
1. Install the MCP server package
2. Set your GITHUB_TOKEN environment variable
3. Add the config to `.claude/mcp-servers.json`
4. Restart Claude Code to activate
### Security Notes
- Never commit tokens to version control
- Use environment variables for all secrets
- Review MCP server permissions carefully
- Limit scope to what's neededFree to copy and use. Compatible with Claude Code, Claude 4 Opus.
Copy this prompt into your Claude Code project. Customize bracketed variables for your specific setup.
Initial release
Sign in and download this prompt to leave a review.