Skip to content

GitHub MCP Server

Search repos, read code, create issues, manage PRs, and trigger workflows. Understand codebases and contribute to development cycles.

Capabilities
Repos Issues Pull Requests Actions Code Search
Maintained by
GitHub
Hosting
Hosted endpoint, or run it locally
Authentication
OAuth sign-in
Last checked

Replaces the archived modelcontextprotocol reference server; remote also accepts a PAT as a Bearer header.

How to connect the GitHub MCP server

Pick your AI client and paste the snippet. Swap the YOUR_… placeholders for your own values. New to this? Our guide to how MCP clients and servers fit together explains what each piece does.

Hosted server

Claude Code

Terminal
claude mcp add --transport http github https://api.githubcopilot.com/mcp/

Then run /mcp inside Claude Code and choose Authenticate to sign in.

Full Claude Code setup guide →

Claude Desktop and claude.ai

Settings → Connectors → Add custom connector
Name: GitHub
Remote MCP server URL: https://api.githubcopilot.com/mcp/

Custom connectors need a Pro, Max, Team or Enterprise plan. On Team and Enterprise an owner adds them in admin settings.

Full Claude Desktop setup guide →

Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project)
{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}
Full Cursor setup guide →

VS Code

.vscode/mcp.json
{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}
Full VS Code setup guide →

ChatGPT

Business, Enterprise and Edu plans (and Pro, read-only) can add this endpoint as an app in developer mode. ChatGPT setup guide →

+ Run it locally instead

Claude Code

Terminal
claude mcp add --env GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PAT --transport stdio github \
  -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
Full Claude Code setup guide →

Claude Desktop

claude_desktop_config.json (Settings → Developer → Edit Config)
{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
      }
    }
  }
}

Fully quit and reopen Claude Desktop after saving.

Full Claude Desktop setup guide →

Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project)
{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
      }
    }
  }
}
Full Cursor setup guide →

VS Code

.vscode/mcp.json
{
  "servers": {
    "github": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
      }
    }
  }
}
Full VS Code setup guide →

Frequently asked questions

What is the GitHub MCP server?

It is a Model Context Protocol (MCP) server — a small piece of software that gives AI assistants like Claude a secure, governed connection to GitHub. Search repos, read code, create issues, manage PRs, and trigger workflows. Understand codebases and contribute to development cycles.

Is there an official GitHub MCP server?

Yes. The GitHub MCP server is an official integration, maintained by the vendor or the Model Context Protocol project, which makes it the safest default for business use. It is maintained by GitHub.

Is the GitHub MCP server hosted, or do I run it myself?

Both. GitHub runs a hosted endpoint at https://api.githubcopilot.com/mcp/, so most people just paste that URL into their AI client. You can also run the server locally with docker, supplying your own credentials.

Do I need an API key for the GitHub MCP server?

No API key is needed for the hosted server. You sign in through GitHub's own OAuth screen, and the assistant only gets the access your account has.

What can an AI assistant actually do with GitHub?

Through this server an assistant can work with repos, issues, pull requests, actions, code search — reading from and acting on GitHub directly instead of you copy-pasting between windows. What you allow it to do is controlled by the permissions you grant.

How do I set this up for my business?

The setup section above has copy-paste config for Claude Code, Claude Desktop, Cursor and VS Code. If you want it rolled out across a team with permissions, governance and support handled, that is what Crox's Build engagement covers.

New to MCP? Start with our plain-English guide to the Model Context Protocol or see how to connect AI to your business tools without writing code .

Done-for-you integration

Want this connected to your business — with governance handled?

Crox maps your processes, connects AI to the tools you already use, and keeps it working as models change. Start with a readiness assessment or talk to us about a build.