---
title: "GitHub MCP Server: Official Remote Setup and Token Scopes"
url: "https://mcpshelf.co/servers/github"
description: "GitHub's own MCP server lets an assistant work with repos, issues, pull requests and Actions. The remote URL, the token it needs, how to scope it."
updated: "2026-10-27"
site: "MCP Shelf"
---

# GitHub

> GitHub's own server for repos, issues, pull requests and Actions.

Source: https://mcpshelf.co/servers/github  
Markdown: https://mcpshelf.co/servers/github.md  
Generated: 2026-11-22T22:03:04.191Z

## Facts

- **Name:** GitHub
- **Tagline:** GitHub's own server for repos, issues, pull requests and Actions.
- **Description:** The GitHub MCP server is GitHub's official MCP server: it lets AI assistants read and manage repositories, issues, pull requests and Actions, through a hosted endpoint or a local Docker image.
- **Repository:** https://github.com/github/github-mcp-server
- **Install:** `claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'`
- **Server URL:** https://api.githubcopilot.com/mcp/
- **Transport:** Streamable HTTP (remote)
- **Auth:** Needs `GITHUB_PERSONAL_ACCESS_TOKEN`
- **Tools exposed:** 46: `add_comment_to_pending_review`, `add_issue_comment`, `add_reply_to_pull_request_comment`, `assign_copilot_to_issue`, `create_branch`, `create_or_update_file`, `create_pull_request`, `create_repository`, `delete_file`, `fork_repository`, `get_commit`, `get_file_contents`, `get_label`, `get_latest_release`, `get_me`, `get_release_by_tag`, `get_tag`, `get_team_members`, `get_teams`, `issue_read`, `issue_write`, `list_branches`, `list_commits`, `list_issue_fields`, `list_issue_types`, `list_issues`, `list_pull_requests`, `list_releases`, `list_repository_collaborators`, `list_tags`, `merge_pull_request`, `pull_request_read`, `pull_request_review_write`, `push_files`, `request_copilot_review`, `search_code`, `search_commits`, `search_issues`, `search_pull_requests`, `search_repositories`, `search_users`, `sub_issue_write`, `ui_get`, `update_issue_comment`, `update_pull_request`, `update_pull_request_branch`
- **Category:** Developer tools (https://mcpshelf.co/categories/developer-tools)
- **Stats:** 34K GitHub stars, last commit 28 Oct 2026, 0 upvotes on MCP Shelf
- **Install check:** Needs your setup first
- **Listed:** 2026-10-26
- **Page updated:** 2026-10-27

## Full description

### What is GitHub?

**The GitHub MCP server is GitHub's official MCP server: it lets AI assistants read and manage repositories, issues, pull requests and Actions, through a hosted endpoint or a local Docker image.**

This is the server GitHub maintains. Through it an assistant can browse code, open and comment on issues and pull requests, check Actions runs and search across repositories you can see.

GitHub hosts it, so most people never install anything: point the client at the URL and authenticate. A Docker image exists for anyone who needs to run it themselves.

|  |  |
| --- | --- |
| Made by | GitHub |
| GitHub | https://github.com/github/github-mcp-server |
| Licence | MIT |
| GitHub stars | 34K |
| Last commit | 28 Oct 2026 |
| Tools | 46 |
| Runs on | Hosted or your computer |
| Install check | Needs your setup first |
| Category | [Developer tools](https://mcpshelf.co/categories/developer-tools) |
| Works with | Claude Code, Cursor, Claude Desktop, VS Code, Codex, Windsurf |
| Setup checked | 27 Oct 2026 |
| Page updated | 27 Oct 2026 |

**Our check:** It needs something our Linux test machine does not have (an account, a desktop app, a Mac or a running service), so on 26 Oct 2026 we listed its tools from its package instead of running this config.

#### Try asking GitHub

- "Summarise the open pull requests on my repo and which ones are waiting on me."
- "Why did the last GitHub Actions run on main fail? Show me the failing step."
- "Open an issue for the login bug we just found, with steps to reproduce."

#### MCP Shelf take

> GitHub needs something our Linux test machine does not have (an account, an app or a service), so on 26 Oct 2026 we ran its package and counted 46 tools. 27 of the 46 only read; the other 19 can change things. Every tool comes with a useful description, all of them say whether they change things, and the tool list costs about 3,300 tokens of context before you ask a thing. It sits 2nd of 24 in its category on our shelf by GitHub stars (34K).

— MCP Shelf tests (numbers from our own runs), tested on 26 Oct 2026

### What tools does GitHub have?

We listed 46 tools on 26 Oct 2026. 27 only read; the rest can change things or run commands.

| Tool | Kind | What it is for |
| --- | --- | --- |
| `add_comment_to_pending_review` | changes | Adds a line comment to a review you have started but not sent. |
| `add_issue_comment` | changes | Posts a comment on an issue or pull request. |
| `add_reply_to_pull_request_comment` | changes | Replies inside an existing review comment thread. |
| `assign_copilot_to_issue` | changes | Hands an issue to GitHub's Copilot coding agent to work on. |
| `create_branch` | changes | Makes a new branch from an existing one. |
| `create_or_update_file` | changes | Writes one file to a branch as a new commit. |
| `create_pull_request` | changes | Opens a pull request between two branches. |
| `create_repository` | changes | Creates a new repository under your account or an organisation. |
| `delete_file` | changes | Removes a file from a branch with a commit. |
| `fork_repository` | changes | Forks a repository to your account or an organisation. |
| `get_commit` | reads | Shows one commit with its message and changed files. |
| `get_file_contents` | reads | Reads a file, or lists a folder, at any branch or commit. |
| `get_label` | reads | Looks up one label in a repository. |
| `get_latest_release` | reads | Finds the newest published release. |
| `get_me` | reads | Shows which GitHub account the token belongs to. |
| `get_release_by_tag` | reads | Finds a release by its tag. |
| `get_tag` | reads | Shows the details of one git tag. |
| `get_team_members` | reads | Lists the people in an organisation team. |
| `get_teams` | reads | Lists the teams you belong to. |
| `issue_read` | reads | Reads an issue, its comments, labels or sub-issues. |
| `issue_write` | changes | Opens a new issue or edits, labels, assigns or closes an existing one. |
| `list_branches` | reads | Lists a repository's branches. |
| `list_commits` | reads | Lists recent commits on a branch, optionally by author. |
| `list_issue_fields` | reads | Lists the custom issue fields an organisation has set up. |
| `list_issue_types` | reads | Lists the issue types an organisation uses, such as bug or task. |
| `list_issues` | reads | Lists issues with filters for state, labels and dates. |
| `list_pull_requests` | reads | Lists pull requests with filters for state and branch. |
| `list_releases` | reads | Lists a repository's releases. |
| `list_repository_collaborators` | reads | Lists people with access to a repository. |
| `list_tags` | reads | Lists a repository's git tags. |
| `merge_pull_request` | changes | Merges a pull request by merge, squash or rebase. |
| `pull_request_read` | reads | Reads a pull request: its diff, files, reviews, comments or check status. |
| `pull_request_review_write` | changes | Starts, submits or deletes a review on a pull request. |
| `push_files` | changes | Commits several files to a branch in one go. |
| `request_copilot_review` | changes | Asks Copilot to review a pull request. |
| `search_code` | reads | Searches code across GitHub with GitHub's search syntax. |
| `search_commits` | reads | Searches commit messages and authors. |
| `search_issues` | reads | Searches issues across repositories. |
| `search_pull_requests` | reads | Searches pull requests across repositories. |
| `search_repositories` | reads | Finds repositories by name, topic, language and more. |
| `search_users` | reads | Finds GitHub users and organisations. |
| `sub_issue_write` | changes | Adds, removes or reorders sub-issues under a parent issue. |
| `ui_get` | reads | Fetches data the server's interactive views need, in clients that show them. |
| `update_issue_comment` | changes | Edits a comment you posted. |
| `update_pull_request` | changes | Changes a pull request's title, body, base branch, state or reviewers. |
| `update_pull_request_branch` | changes | Brings a pull request branch up to date with its base. |

#### How clearly it describes its tools

46 of 46 tools have a description and 46 of 46 say whether they change things. The tool list takes at least ~3,300 tokens of context. Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

#### Tool groups

| Group | Covers |
| --- | --- |
| `repos` | Browse files, branches, commits and tags; create or update files and branches. |
| `issues` | Search, read, open, comment on and close issues. |
| `pull_requests` | Read diffs and reviews, open pull requests, comment, request reviews and merge. |
| `actions` | List workflow runs, read job logs, re-run or cancel runs. |
| `code_security` | Read code scanning alerts. |
| `secret_protection` | Read secret scanning alerts. |
| `dependabot` | Read Dependabot alerts. |
| `discussions` | Read and search repository discussions. |
| `notifications` | Read and dismiss your GitHub notifications. |
| `projects` | Read and update GitHub Projects boards. |
| `gists` | Read and create gists. |
| `users / orgs` | Look up people and organisations. |
| `all` | Turns on every toolset at once. |

### How do I install GitHub?

#### Install steps from the GitHub README

Copied from the project's [README on GitHub](https://github.com/github/github-mcp-server#readme) on 16 Nov 2026 under its MIT licence.

##### Installation

###### Install in GitHub Copilot on VS Code

For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.

More about using MCP server tools in VS Code's [agent mode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).

Install in GitHub Copilot on other IDEs (JetBrains, Visual Studio, Eclipse, etc.)

Add one of the following JSON blocks to your IDE's MCP settings.

**Log in with OAuth (no token to create or store).** On github.com the official image already includes the app credentials, so you provide none yourself: it runs a browser-based login on first use and keeps the resulting token **in memory only**. In Docker this needs a fixed callback port published to loopback so the container's login callback is reachable:

```
{
  "mcp": {
    "servers": {
      "github": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-p",
          "127.0.0.1:8085:8085",
          "-e",
          "GITHUB_OAUTH_CALLBACK_PORT",
          "ghcr.io/github/github-mcp-server"
        ],
        "env": {
          "GITHUB_OAUTH_CALLBACK_PORT": "8085"
        }
      }
    }
  }
}
```

See **[Local Server OAuth Login](https://github.com/github/github-mcp-server/blob/HEAD/docs/oauth-login.md)** for the native-binary flow (no fixed port needed), the headless/device-code fallback, GitHub Enterprise Server / `ghe.com`, and bringing your own OAuth or GitHub App.

For non-interactive stdio deployments, see **[GitHub App Authentication](https://github.com/github/github-mcp-server/blob/HEAD/docs/github-app-auth.md)**.

**Or authenticate with a Personal Access Token.** Set `GITHUB_PERSONAL_ACCESS_TOKEN` instead (it takes precedence over OAuth):

```
{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "github_token",
        "description": "GitHub Personal Access Token",
        "password": true
      }
    ],
    "servers": {
      "github": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "GITHUB_PERSONAL_ACCESS_TOKEN",
          "ghcr.io/github/github-mcp-server"
        ],
        "env": {
          "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
        }
      }
    }
  }
}
```

Optionally, you can add a similar example (i.e. without the mcp key) to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with other host applications that accept the same format.

**Example JSON block without the MCP key included**

```
{
  "inputs": [
    {
      "type": "promptString",
      "id": "github_token",
      "description": "GitHub Personal Access Token",
      "password": true
    }
  ],
  "servers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
      }
    }
  }
}
```

###### Install in Other MCP Hosts

For other MCP host applications, please refer to our installation guides:

- **[Copilot CLI](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-copilot-cli.md)** - Installation guide for GitHub Copilot CLI
- **[GitHub Copilot in other IDEs](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
- **[Claude Code & Claude Desktop](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-claude.md)** - Installation guide for Claude Code and Claude Desktop
- **[Cursor](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
- **[Google Gemini CLI](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-gemini-cli.md)** - Installation guide for Google Gemini CLI
- **[OpenCode](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-opencode.md)** - Installation guide for the OpenCode terminal agent
- **[Windsurf](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE
- **[Zed](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides/install-zed.md)** - Installation guide for Zed editor

For a complete overview of all installation options, see our **[Installation Guides Index](https://github.com/github/github-mcp-server/blob/HEAD/docs/installation-guides)**.

> **Note:** Any host application that supports local MCP servers should be able to access the local GitHub MCP server. However, the specific configuration process, syntax and stability of the integration will vary by host application. While many may follow a similar format to the examples above, this is not guaranteed. Please refer to your host application's documentation for the correct MCP configuration syntax and setup process.

###### Build from source

If you don't have Docker, you can use `go build` to build the binary in the
`cmd/github-mcp-server` directory, and use the `github-mcp-server stdio` command with the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to your token. To specify the output location of the build, use the `-o` flag. You should configure your server to use the built executable as its `command`.

STDIO API requests identify the server as `github-mcp-server/` and retain the upstream MCP client's name/version in parentheses when available. Control characters, quotes, backslashes and parentheses in client metadata are escaped so the HTTP header remains valid; ordinary names, versions, spaces and printable Unicode are preserved. Release builds keep their release version. Source and default Docker builds with revision metadata use `vcs-`. The Docker publishing workflow preserves tag versions, including prereleases, and lets branch, pull-request and nightly builds use the linked source revision. The `-dirty` marker applies only when both the revision and modified state come from embedded VCS metadata, never to a valid, explicitly supplied `main.commit`. This is a VCS build identifier, not a release number.

Build the complete package with `go build -o github-mcp-server ./cmd/github-mcp-server` from a Git checkout to embed its VCS revision. For builds without VCS metadata, supply the actual release with `-ldflags '-X main.version='` or the full source revision with `-ldflags '-X main.commit='`. Valid metadata is selected in this order: explicit release, explicit source revision, embedded VCS revision, then installed main-module version. Valid explicit revisions remain authoritative even if build-context filtering changes embedded VCS metadata. Missing or malformed candidates fall through to the next usable source. If none is available, STDIO still starts with the development label `dev` and emits a warning on stderr, leaving stdout available for the MCP protocol. Supply real release or revision metadata when version-specific attribution is needed.

For example:

```
{
  "mcp": {
    "servers": {
      "github": {
        "command": "/path/to/github-mcp-server",
        "args": ["stdio"],
        "env": {
          "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
        }
      }
    }
  }
}
```

#### What you need first

- A GitHub account
- A fine-grained personal access token, or OAuth in clients that support it

#### Claude Code

Where: Your terminal (Claude Code 2.1.1 or newer)

```bash
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'
```

Add --scope user to use it in every project. If Windows answers Invalid input, use claude mcp add --transport http github https://api.githubcopilot.com/mcp --header "Authorization: Bearer YOUR_GITHUB_PAT" instead. Check it with claude mcp list.

#### Cursor

Where: ~/.cursor/mcp.json, or .cursor/mcp.json in a project

```json
{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Cursor needs a personal access token for this server: replace YOUR_API_KEY, save and restart Cursor. Needs Cursor 0.48 or newer.

#### Claude Desktop

Where: claude_desktop_config.json (Settings → Developer → Edit Config), with Docker running

```json
{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-p", "127.0.0.1:8085:8085", "-e", "GITHUB_OAUTH_CALLBACK_PORT", "ghcr.io/github/github-mcp-server"],
      "env": { "GITHUB_OAUTH_CALLBACK_PORT": "8085" }
    }
  }
}
```

GitHub says its hosted server cannot be added as a Claude connector yet, so Claude Desktop runs the Docker image. It opens a GitHub sign-in in your browser the first time. To use a token instead, drop the port lines and pass GITHUB_PERSONAL_ACCESS_TOKEN in env.

#### VS Code

Where: .vscode/mcp.json in your project

```json
{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}
```

VS Code 1.101 and later signs you in with GitHub, so no token is needed. Switch Copilot Chat to Agent mode and the server starts.

#### Codex

Where: ~/.codex/config.toml, shared by the Codex CLI, IDE extension and ChatGPT desktop app

```
[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
http_headers = { "Authorization" = "Bearer YOUR_API_KEY" }
```

Codex can also read the token from an environment variable: replace `http_headers` with `bearer_token_env_var = "YOUR_VAR_NAME"`.

#### Windsurf

Where: ~/.codeium/windsurf/mcp_config.json

```json
{
  "mcpServers": {
    "github": {
      "serverUrl": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Windsurf only supports token sign-in for this server, so put a personal access token in place of YOUR_API_KEY.

#### ChatGPT

Where: Not supported as is

GitHub does not document ChatGPT for this server, and ChatGPT cannot send the token header it needs. ChatGPT's own GitHub app is a separate product.

Swap YOUR_API_KEY for a fine-grained token limited to the repositories and permissions you actually want the assistant to use.

Checked against the project's own install docs on 27 Oct 2026: https://github.com/github/github-mcp-server#readme, https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-claude.md, https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-cursor.md, https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-windsurf.md

### How do I configure GitHub?

| Setting | Kind | Required | What it does |
| --- | --- | --- | --- |
| `https://api.githubcopilot.com/mcp/` | config | no | The hosted server. Sign in with GitHub in apps that support OAuth, or send a token as a header. Example: `"url": "https://api.githubcopilot.com/mcp/"` |
| `GITHUB_PERSONAL_ACCESS_TOKEN` | env | yes | Your token for the local (Docker) version. Give it only the repository permissions you are happy for an assistant to use. Example: `github_pat_xxxxxxxx` |
| `GITHUB_TOOLSETS / --toolsets` | env | no | Turns on only the groups of tools you list. Fewer tools means better tool choice and a smaller prompt. Example: `repos,issues,pull_requests` |
| `GITHUB_TOOLS / --tools` | env | no | Turns on individual tools by name, on top of any toolsets. Example: `get_file_contents,create_pull_request` |
| `GITHUB_READ_ONLY / --read-only` | env | no | Offers only tools that read. Write tools are skipped even if you ask for them. Example: `1` |
| `--lockdown-mode` | flag | no | Hides content on public repositories written by people without push access, to cut the risk of prompt injection from strangers' issues and comments. Example: `--lockdown-mode` |
| `GITHUB_HOST / --gh-host` | env | no | Points the server at GitHub Enterprise Server or a ghe.com domain. Example: `https://github.example.com` |

### What can GitHub read and change?

**It can read**

- Every repository, issue, pull request and Actions log your token or sign-in can see, private ones included

**It can change**

- Can push files, open and merge pull requests, comment, close issues and re-run workflows, as you

**Safer setup:** Start with read-only mode, use a fine-grained token limited to the repositories you name, and turn on lockdown mode if the assistant reads public issues from strangers.

### Good for

- Triage: summarise new issues and failing runs
- Reviewing or drafting pull requests from the chat
- Searching code across an organisation

### GitHub not working? Common fixes

**401 Bad credentials**
The token is wrong or expired, or the variable is not reaching the container. With Docker, pass it with -e GITHUB_PERSONAL_ACCESS_TOKEN as well as in env.

**The assistant picks odd tools or the prompt is very long**
Limit the toolsets to what you use, for example repos,issues,pull_requests.

**Your app cannot sign in to the hosted server**
Not every app supports GitHub's OAuth flow yet. Send a token as an Authorization: Bearer header instead, or run the Docker version.

**403 on an organisation's repositories**
The organisation may require approval for fine-grained tokens or SSO authorisation. Approve the token in the organisation's settings.

### What are the alternatives to GitHub?

| Server | What it does | Tools | Runs on | Licence | Stars |
| --- | --- | --- | --- | --- | --- |
| [GitHub](https://mcpshelf.co/servers/github) | GitHub's own server for repos, issues, pull requests and Actions. | 46 | Hosted or your computer | MIT | 34K |
| [MCP Inspector](https://mcpshelf.co/servers/mcp-inspector) | The official debugging UI for MCP servers. Not a server you add to a client. | Test client | Your computer | MIT / Apache-2.0 | 11.2K |
| [XcodeBuildMCP](https://mcpshelf.co/servers/xcodebuildmcp) | Build, run and test iOS and macOS apps, and drive simulators, from an agent. | 24 | Your computer | MIT | 6.5K |
| [Peekaboo](https://mcpshelf.co/servers/peekaboo) | Screenshots of any Mac app or screen, with optional questions about what is on it. | 4 groups | Your computer | MIT | 5.4K |
| [Kubernetes MCP Server](https://mcpshelf.co/servers/kubernetes) | Pods, logs, events and resources from your current kubeconfig context. | 14 | Your computer | Apache-2.0 | 2.2K |
| [IDA Pro MCP](https://mcpshelf.co/servers/ida-pro) | Lets an assistant read and annotate the binary you have open in IDA Pro. | 48 | Your computer | MIT | 13.2K |

### GitHub FAQ

#### How do I add the GitHub MCP server to Claude Code?

Create a fine-grained personal access token, then run claude mcp add-json github with the hosted URL https://api.githubcopilot.com/mcp and an Authorization: Bearer header carrying the token. Older Claude Code versions use claude mcp add --transport http with --header instead. Run claude mcp list to check it.

#### How do I add the GitHub MCP server to Claude Desktop?

Use the Docker image ghcr.io/github/github-mcp-server in claude_desktop_config.json. GitHub notes that its hosted server cannot yet be added as a Claude custom connector, because that needs an OAuth app registered for Claude. The Docker version can sign you in through the browser or take a token.

#### Does the GitHub MCP server work with Cursor and VS Code?

Yes, both connect to the hosted server. VS Code 1.101 and later signs in with your GitHub account, so no token is needed. Cursor needs a personal access token in an Authorization header for this server.

#### Is the GitHub MCP server free?

Yes. It is MIT licensed, the hosted version costs nothing, and any GitHub account can use it; you do not need a Copilot subscription. A few optional toolsets on the hosted server relate to Copilot features.

#### Is it safe to let an AI use my GitHub account?

It can open issues, comment, merge pull requests and push files, so start narrow: a fine-grained token limited to the repositories you name, the --read-only flag or read-only header, and lockdown mode if the assistant reads issues written by strangers, which can carry prompt injection.

#### Hosted or local GitHub MCP server?

The hosted server is the easy option: nothing to install, always current, and OAuth in VS Code. Run the Docker image or release binary when your app cannot use a remote server, when you use GitHub Enterprise Server, or when you want the token to stay on your machine.

#### Why do I get 401 Bad credentials from the GitHub MCP server?

The token is missing, expired or pasted with extra spaces, or the header does not read exactly Bearer followed by the token. For 403 errors on an organisation's repositories, the organisation may need to approve fine-grained tokens first.

#### Can I limit which GitHub tools the assistant sees?

Yes. Pick toolsets with --toolsets or GITHUB_TOOLSETS (for example repos, issues, pull_requests), or name single tools with --tools. Fewer tools means a shorter prompt and fewer odd tool choices, which helps smaller models most.

#### Does GitHub work with Codex?

Yes. Add an [mcp_servers.github] table with url = "https://api.githubcopilot.com/mcp/" and your key in http_headers to ~/.codex/config.toml, which the Codex CLI and IDE extension share. Codex can also read the token from an environment variable: replace http_headers with bearer_token_env_var = "YOUR_VAR_NAME".

Full docs on GitHub: https://github.com/github/github-mcp-server

## Notes for agents

Fetch these instead of parsing the HTML page:

- llms.txt: https://mcpshelf.co/llms.txt
- llms-full.txt: https://mcpshelf.co/llms-full.txt
- ai.txt: https://mcpshelf.co/ai.txt
- Full catalog (.md): https://mcpshelf.co/catalog.md
- API spec: https://mcpshelf.co/openapi.json
- MCP server: https://mcpshelf.co/mcp
- MCP manifest: https://mcpshelf.co/.well-known/mcp.json
- Developer docs: https://mcpshelf.co/developers

MCP endpoint (Streamable HTTP, no key): https://mcpshelf.co/mcp. REST API: https://mcpshelf.co/api/v1.

