GitHub MCP Server
Official MCP server for GitHub integration, enabling Claude to interact with repositories, issues, and pull requests.
Installation
npm install -g @modelcontextprotocol/server-github
Configuration
Add to your Claude configuration:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
}
Required Token Scopes
repo - Full repository access
read:org - Read organization data
gist - Gist access (optional)
Repository Operations
get_repository
Get repository information.
{
"owner": "anthropics",
"repo": "claude-code"
}
list_repositories
List user or org repositories.
{
"owner": "anthropics",
"type": "public"
}
Issue Operations
create_issue
Create a new issue.
{
"owner": "anthropics",
"repo": "claude-code",
"title": "Bug report",
"body": "Description of the issue"
}
list_issues
List repository issues.
{
"owner": "anthropics",
"repo": "claude-code",
"state": "open"
}
Pull Request Operations
create_pull_request
Create a new PR.
{
"owner": "anthropics",
"repo": "claude-code",
"title": "Feature: Add X",
"head": "feature-branch",
"base": "main",
"body": "Description"
}
list_pull_requests
List repository PRs.
{
"owner": "anthropics",
"repo": "claude-code",
"state": "open"
}
File Operations
get_file_contents
Get file content from repository.
{
"owner": "anthropics",
"repo": "claude-code",
"path": "README.md"
}
Use Cases
- Automated issue triage
- PR review assistance
- Repository analysis
- Code search across repos
- Release management
Source
GitHub Repository
Raw Content
# GitHub MCP Server
Official MCP server for GitHub integration, enabling Claude to interact with repositories, issues, and pull requests.
## Installation
```bash
npm install -g @modelcontextprotocol/server-github
```
## Configuration
Add to your Claude configuration:
```json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
}
```
## Required Token Scopes
- `repo` - Full repository access
- `read:org` - Read organization data
- `gist` - Gist access (optional)
## Available Tools
### Repository Operations
#### get_repository
Get repository information.
```json
{
"owner": "anthropics",
"repo": "claude-code"
}
```
#### list_repositories
List user or org repositories.
```json
{
"owner": "anthropics",
"type": "public"
}
```
### Issue Operations
#### create_issue
Create a new issue.
```json
{
"owner": "anthropics",
"repo": "claude-code",
"title": "Bug report",
"body": "Description of the issue"
}
```
#### list_issues
List repository issues.
```json
{
"owner": "anthropics",
"repo": "claude-code",
"state": "open"
}
```
### Pull Request Operations
#### create_pull_request
Create a new PR.
```json
{
"owner": "anthropics",
"repo": "claude-code",
"title": "Feature: Add X",
"head": "feature-branch",
"base": "main",
"body": "Description"
}
```
#### list_pull_requests
List repository PRs.
```json
{
"owner": "anthropics",
"repo": "claude-code",
"state": "open"
}
```
### File Operations
#### get_file_contents
Get file content from repository.
```json
{
"owner": "anthropics",
"repo": "claude-code",
"path": "README.md"
}
```
## Use Cases
- Automated issue triage
- PR review assistance
- Repository analysis
- Code search across repos
- Release management
## Source
[GitHub Repository](https://github.com/modelcontextprotocol/servers)