GitHub MCP reference server (archived)

Archived reference implementation; no longer maintained. Inspect pull requests, create issues, review diffs, search repositories, and commit code directly.

Local (stdio)CredentialArchived upstream

Archived upstream. This server is no longer maintained by its authors and receives no fixes or security updates. The configuration below is kept for existing users; review the upstream notice before installing it. For new setups, see the maintained GitHub MCP Server listing.

Set up GitHub

Configuration examples, not tested connections. Replace placeholders and review the upstream documentation before use.

Claude Code

Run in your terminal.

claude mcp add github --env GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_PERSONAL_ACCESS_TOKEN" -- npx -y @modelcontextprotocol/server-github

Cursor

Merge into ~/.cursor/mcp.json

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "REPLACE_WITH_GITHUB_TOKEN"
      }
    }
  }
}

Codex

Run in your terminal.

codex mcp add github --env GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_PERSONAL_ACCESS_TOKEN" -- npx -y @modelcontextprotocol/server-github

Gemini CLI

Merge into ~/.gemini/settings.json

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "REPLACE_WITH_GITHUB_TOKEN"
      }
    }
  }
}

OpenCode

Merge into ~/.config/opencode/opencode.jsonc

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "github": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "enabled": true,
      "environment": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "REPLACE_WITH_GITHUB_TOKEN"
      }
    }
  }
}

VS Code

Merge into .vscode/mcp.json

{
  "servers": {
    "github": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:GITHUB_PERSONAL_ACCESS_TOKEN}"
      }
    }
  },
  "inputs": [
    {
      "id": "GITHUB_PERSONAL_ACCESS_TOKEN",
      "type": "promptString",
      "description": "GITHUB_PERSONAL_ACCESS_TOKEN",
      "password": true
    }
  ]
}

Step-by-step setup guides: Claude Code and Codex CLI, Cursor and VS Code. In Claude Desktop, the Cursor JSON goes in claude_desktop_config.json. This is a local server that runs on your machine; see remote vs local servers and authentication and security basics.

Overview

This is the original GitHub reference server from the Model Context Protocol project, published as @modelcontextprotocol/server-github. It now lives in the servers-archived repository, which states that the servers are no longer maintained and come with no security guarantees. The server's README carries a deprecation notice: development has moved to GitHub's own repository, github/github-mcp-server.

When it was current, the server wrapped the GitHub REST API in about two dozen tools. They covered repository files (get_file_contents, create_or_update_file, push_files), issues (create_issue, list_issues, update_issue, add_issue_comment), pull requests (create_pull_request, get_pull_request, create_pull_request_review, merge_pull_request) and search (search_code, search_issues, search_users). It created branches automatically when pushing changes and could commit several files at once.

Setup caveats: the server authenticates with a GitHub personal access token in GITHUB_PERSONAL_ACCESS_TOKEN. Upstream's instructions ask for the broad repo scope, or public_repo for public repositories only, which gives the process wide write access. With no further fixes or security updates coming, a long-lived token like that is the main risk. We keep this page so existing users can find their configuration and understand the status. For new setups, follow the documentation for GitHub's maintained server instead.

Example tools

  • create_issue
  • get_pull_request
  • search_code
  • push_files

Tool names are upstream examples. The server's live tool list can differ.

Browse Developer Tools servers

Sources

This page was written from the upstream documentation below and last reviewed on 11 October 2026. Listing is not a security or compatibility endorsement. Report a correction through the contact page.