github-mcp-server

Install GitHub MCP Server in Cursor

Prerequisites

  1. Cursor IDE installed (latest version)
  2. GitHub Personal Access Token with appropriate scopes
  3. For local installation: Docker installed and running

Install MCP Server

Uses GitHub’s hosted server at https://api.githubcopilot.com/mcp/. Requires Cursor v0.48.0+ for Streamable HTTP support. While Cursor supports OAuth for some MCP servers, the GitHub server currently requires a Personal Access Token.

Install steps

  1. Click the install button above and follow the flow, or go directly to your global MCP configuration file at ~/.cursor/mcp.json and enter the code block below
  2. In Tools & Integrations > MCP tools, click the pencil icon next to “github”
  3. Replace YOUR_GITHUB_PAT with your actual GitHub Personal Access Token
  4. Save the file
  5. Restart Cursor

Streamable HTTP Configuration

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

Local Server Setup

Install MCP Server

The local GitHub MCP server runs via Docker and requires Docker Desktop to be installed and running.

Install steps

  1. Click the install button above and follow the flow, or go directly to your global MCP configuration file at ~/.cursor/mcp.json and enter the code block below
  2. In Tools & Integrations > MCP tools, click the pencil icon next to “github”
  3. Replace YOUR_GITHUB_PAT with your actual GitHub Personal Access Token
  4. Save the file
  5. Restart Cursor

Docker Configuration

{
  "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"
      }
    }
  }
}

Important: The npm package @modelcontextprotocol/server-github is no longer supported as of April 2025. Use the official Docker image ghcr.io/github/github-mcp-server instead.

Configuration Files

Verify Installation

  1. Restart Cursor completely
  2. Check for green dot in Settings → Tools & Integrations → MCP Tools
  3. In chat/composer, check “Available Tools”
  4. Test with: “List my GitHub repositories”

Troubleshooting

Remote Server Issues

Local Server Issues

General Issues

Important Notes