# GitHub MCP server

> Connects AI clients to GitHub so they can read repositories, manage issues and pull requests, and inspect workflows.

- Repository: https://github.com/github/github-mcp-server
- Page: https://hostedmcp.org/servers/github/github-mcp-server
- Transport: stdio, remote
- Stars: 34425
- License: MIT
- Latest version: 2.1.0

## Install

### Claude Code

```sh
claude mcp add github-mcp-server -- docker run -i --rm ghcr.io/github/github-mcp-server:2.1.0
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "github-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/github/github-mcp-server:2.1.0"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "github-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/github/github-mcp-server:2.1.0"
      ]
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "github-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/github/github-mcp-server:2.1.0"
      ]
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.github-mcp-server]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/github/github-mcp-server:2.1.0"]
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "github-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/github/github-mcp-server:2.1.0"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `GITHUB_HOST` | no | no |  |
| `GITHUB_INSIDERS` | no | no |  |
| `GITHUB_MCP_SERVER_NAME` | no | no |  |
| `GITHUB_MCP_SERVER_TITLE` | no | no |  |
| `GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` | no | no |  |
| `GITHUB_OAUTH_CALLBACK_PORT` | no | no |  |
| `GITHUB_PAT` | no | no |  |
| `GITHUB_PERSONAL_ACCESS_TOKEN` | no | no |  |
| `GITHUB_TOOLS` | no | no |  |
| `GITHUB_TOOLSETS` | no | no |  |
| `SERVER_NAME` | no | no |  |
| `SERVER_TITLE` | no | no |  |
| `TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` | no | no |  |
| `TOOL_CREATE_BRANCH_DESCRIPTION` | no | no |  |

## Tools (103)

- `context`
- `repos`
- `issues`
- `pull_requests`
- `users`
- `copilot`
- `copilot_spaces`
- `github_support_docs_search`
- `actions_get`
- `actions_list`
- `actions_run_trigger`
- `get_job_logs`
- `get_code_quality_finding`
- `get_code_scanning_alert`
- `list_code_scanning_alerts`
- `get_me`
- `get_team_members`
- `get_teams`
- `ui_get`
- `assign_copilot_to_issue`
- `request_copilot_review`
- `assign_copilot_to_issue_with_intent`
- `get_dependabot_alert`
- `list_dependabot_alerts`
- `discussion_comment_write`
- `get_discussion`
- `get_discussion_comments`
- `list_discussion_categories`
- `list_discussions`
- `create_gist`
- `get_gist`
- `list_gists`
- `update_gist`
- `get_repository_tree`
- `create_repository_ruleset`
- `custom_properties_read`
- `custom_properties_write`
- `repository_ruleset_read`
- `add_issue_comment`
- `get_label`
- `issue_read`
- `issue_write`
- `list_issue_fields`
- `list_issue_types`
- `list_issues`
- `search_issues`
- `sub_issue_write`
- `update_issue_comment`
- `label_write`
- `list_label`
- `dismiss_notification`
- `get_notification_details`
- `list_notifications`
- `manage_notification_subscription`
- `manage_repository_notification_subscription`
- `mark_all_notifications_read`
- `search_orgs`
- `projects_get`
- `projects_list`
- `projects_write`
- `add_comment_to_pending_review`
- `add_reply_to_pull_request_comment`
- `create_pull_request`
- `list_pull_requests`
- `merge_pull_request`
- `pull_request_read`
- `pull_request_review_write`
- `search_pull_requests`
- `update_pull_request`
- `update_pull_request_branch`
- `create_branch`
- `create_or_update_file`
- `create_repository`
- `delete_file`
- `delete_repository`
- `fork_repository`
- `get_commit`
- `get_file_contents`
- `get_latest_release`
- `get_release_by_tag`
- `get_tag`
- `list_branches`
- `list_commits`
- `list_releases`
- `list_repository_collaborators`
- `list_tags`
- `push_files`
- `search_code`
- `search_commits`
- `search_repositories`
- `get_secret_scanning_alert`
- `list_secret_scanning_alerts`
- `get_global_security_advisory`
- `list_global_security_advisories`
- `list_org_repository_security_advisories`
- `list_repository_security_advisories`
- `list_starred_repositories`
- `star_repository`
- `unstar_repository`
- `search_users`
- `create_pull_request_with_copilot`
- `get_copilot_space`
- `list_copilot_spaces`

## FAQ

### Can I run GitHub MCP Server locally with Docker?

Yes. The server can run in a container using the public Docker image ghcr.io/github/github-mcp-server.

### Can AI clients manage issues and pull requests through this server?

Yes. It lets AI create, update, and manage issues and pull requests for triage and code review.

### Does GitHub MCP Server support GitHub Enterprise?

GitHub Enterprise Cloud with data residency (ghe.com) can use the remote server, but GitHub Enterprise Server does not support remote server hosting and requires the local server.

### Which MCP hosts can install the remote GitHub MCP Server?

It works with any compatible host supporting remote MCP servers, such as VS Code 1.101+, Claude Desktop, Cursor, and Windsurf.
