GitHub MCP Server
GitHub's official MCP server for managing repositories, pull requests, issues, and code reviews directly from Claude Code. Essential for teams using GitHub-based workflows who want AI-assisted repository management and collaboration.
MCP Server Configuration
{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>" } } } }
Available Tools
| Tool | Description |
|---|---|
create_or_update_file | Create or update a single file in a repository |
push_files | Push multiple files in a single commit |
search_repositories | Search for GitHub repositories |
create_repository | Create a new GitHub repository |
get_file_contents | Get contents of a file or directory |
create_issue | Create a new issue in a repository |
create_pull_request | Create a new pull request |
list_issues | List and filter repository issues |
update_issue | Update an existing issue |
add_issue_comment | Add a comment to an issue or PR |
search_code | Search for code across GitHub |
list_commits | List commits in a repository |
get_issue | Get details of a specific issue |
get_pull_request | Get details of a specific pull request |
list_pull_requests | List pull requests with filters |
create_branch | Create a new branch |
fork_repository | Fork a repository |
Setup
- Generate a GitHub Personal Access Token at https://github.com/settings/tokens
- Required scopes:
repo,read:org,read:user - For fine-grained tokens: select specific repositories and permissions
- Replace
<your-token>with your actual token
Security Notes
- Never commit tokens to version control. Use environment variables or
.envfiles - Use fine-grained tokens with minimal permissions when possible
- Rotate tokens periodically (every 90 days recommended)
- The token grants read/write access to your repositories - review tool actions before approving
- Add
.claude/settings.local.jsonto.gitignorefor local token storage
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.