Data as of

GitHub MCP Server for VS Code: Setup & Config

GitHub MCP Server connects VS Code to repository content, issues, pull requests, and platform workflows.

What you can do with GitHub in VS Code

Give agents GitHub-native repository context and issue, review, workflow, and security operations.

  • Triage issues and manage pull request workflows.
  • Investigate failed GitHub Actions runs and development pipeline activity.
  • Review security findings and Dependabot alerts.

Before you start: GitHub in VS Code

  • Docker installed and running for local container execution
  • An MCP-compatible host
  • GitHub authentication and appropriate account permissions

The command uses the README's local PAT-based Docker example. The remote URL uses HTTP and supports OAuth where the host implements it, or PAT authentication. Grant only the permissions required for your tasks.

GitHub VS Code configuration

  1. Choose VS Code configuration scope

    For GitHub MCP Server, open Workspace: .vscode/mcp.json. Merge into servers; preserve existing inputs.

  2. Add GitHub MCP Server to VS Code

    Use the github-mcp-server entry below in servers. Keep GitHub MCP Server's documented stdio connection fields and your other VS Code entries.

  3. Check GitHub MCP Server in VS Code

    GitHub MCP Server: Start in VS Code’s MCP controls; inspect output and trust prompts.

Config file · Workspace: .vscode/mcp.json

JSON
{
  "servers": {
    "github-mcp-server": {
      "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 personal access token with appropriate permissions>"
      }
    }
  }
}

Troubleshooting GitHub in VS Code

  • Make docker and a running Docker engine available in the workspace, container, or remote environment hosting GitHub MCP Server. Start through VS Code's MCP controls; inspect output and trust prompts.
  • For GitHub MCP Server, keep GITHUB_PERSONAL_ACCESS_TOKEN out of version control; VS Code documents input variables and secret handling.
  • GitHub MCP Server uses stdio here: VS Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: OAuth support and configuration vary by MCP host.
  • Known limitation: GitHub Enterprise Server cannot use the hosted remote service.
  • Known limitation: Individual tool names are not stated in the supplied README excerpt.
  • General VS Code troubleshooting lives in the /clients/vscode guide.

GitHub MCP Server — details. VS Code guide

Frequently asked questions

For GitHub MCP Server, edit workspace .vscode/mcp.json. VS Code requires servers rather than mcpServers; preserve the displayed type on each entry.