GitHub MCP Server

GitHub's official MCP server for repos, issues, PRs, Actions and security alerts. Local or hosted.

By defaultCan delete
With our presetRead-only
Flagshosted

Labels are provisional (from the project README/docs, checked Nov 3, 2026). Not yet tested in our sandbox.

Read-only switch

Local: --read-only or GITHUB_READ_ONLY=1 (read-only wins over --tools). Hosted: header X-MCP-Readonly: true or add /readonly to the URL.

Preset

Read-onlyRead-only switch from the vendor's docs. Not sandbox-tested yet.
What the preset changes
  • Added header X-MCP-Readonly: true

Claude Code

.mcp.json
{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${GITHUB_PAT}",
        "X-MCP-Readonly": "true"
      }
    }
  }
}

Optional third layer: add "deny": ["mcp__github__<write tool>"] under permissions in .claude/settings.json.

Codex

~/.codex/config.toml
# Generated by redpresets.dev on 2026-11-03. Unverified preset. Also use a read-only credential. Not a security guarantee.

[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_PAT"
default_tools_approval_mode = "writes"

[mcp_servers.github.http_headers]
X-MCP-Readonly = "true"

default_tools_approval_mode = "writes" asks before any tool the server does not mark read-only.

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${env:GITHUB_PAT}",
        "X-MCP-Readonly": "true"
      }
    }
  }
}

Don't add write tools to mcpAllowlist in .cursor/permissions.json. Leave them on approval. Cursor's docs say the allowlist is not a security boundary.

Lines marked + are what we added to the vendor's install command. Struck-through lines marked − are what they replaced; Copy leaves those out.

Credential layer

Use a fine-grained PAT with read-only repository permissions, limited to the repos the agent needs.

Facts

Vendor
GitHub official
Source
github/github-mcp-server
Hosted endpoint
https://api.githubcopilot.com/mcp/
License
MIT
GitHub stars
34k
Latest release
v2.0.3 (Oct 21, 2026)
Last push
Oct 23, 2026
Status
Active
Last checked
Nov 3, 2026

Sources

Spotted something wrong? Labels change when vendors change. Suggest a correction