# GitHub MCP server

> Allows an AI client to search repositories, code, issues, and pull requests, as well as manage notifications and create issues.

- Repository: https://github.com/Abhishekkumar2021/mcp-suite
- Page: https://hostedmcp.org/servers/abhishekkumar2021/github
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.2.0

## Install

### Claude Code

```sh
claude mcp add --env GITHUB_TOKEN=<YOUR_GITHUB_TOKEN> github -- npx -y @abhishekmcp/github
```

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

```json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/github"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "github": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/github"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/github"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

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

```toml
[mcp_servers.github]
command = "npx"
args = ["-y", "@abhishekmcp/github"]

[mcp_servers.github.env]
GITHUB_TOKEN = "<YOUR_GITHUB_TOKEN>"
```

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

```json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/github"
      ],
      "env": {
        "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `GITHUB_TOKEN` | no | yes | A GitHub Personal Access Token (skips the OAuth device flow). |
| `GITHUB_CLIENT_ID` | no | no | OAuth App client id (public) to enable the device-flow login. |
| `GITHUB_READONLY` | no | no | Set to 1 or true to disable issue-creating/commenting tools. |
| `NOTES_DIR` | no | no |  |

## FAQ

### How can I authenticate with the GitHub MCP server?

You can use either an OAuth device flow or a personal access token.

### What actions can I perform with the GitHub server?

The server enables searching for repositories, code, and issues, reading repositories, issues, pull requests, and files, managing notifications, and creating issues.
