Skip to content

Guide · Open source

How to use github-mcp-server: setup for AI tools

Updated · written with AI from the project's own documentation and checked against our catalogue data

The GitHub MCP Server is GitHub's official Model Context Protocol server. It connects AI tools such as assistants, chatbots and agents to GitHub so they can read repositories and code, manage issues and pull requests, and work with workflows through natural-language requests. This guide explains what you need, how to set up the remote server in VS Code, and where to find the other install options.

GitHub MCP Servergithub/github-mcp-server · ★ 34.2k · MIT

Quick start

  1. 1Check your host. Confirm your AI tool supports remote MCP servers, for example VS Code 1.101 or later, Claude Desktop, Cursor or Windsurf.
  2. 2Choose remote or local. Use the remote server if your host supports it. Use the local server if it does not, or if you are on GitHub Enterprise Server.
  3. 3Add the server entry. Use the one-click install button, or paste the JSON block for the remote server into your host configuration.
  4. 4Pick an authentication method. Use OAuth where your host supports it, or enter a GitHub personal access token through the password prompt.
  5. 5Start the server in VS Code. Toggle Agent mode beside the Copilot Chat input so the server starts.
  6. 6Try a request. Ask the AI in natural language to look at a repository, an issue or a failing workflow run.

What you need before you start

You need an MCP-capable AI host, meaning the application where you chat with the AI. The README lists VS Code 1.101 or later, Claude Desktop, Cursor and Windsurf as examples of compatible hosts. The server has nothing to connect to without one of these.

You also need to check that any applicable policies are enabled. The project links to a policies and governance document for this.

  • A compatible MCP host with remote server support (VS Code 1.101+, Claude Desktop, Cursor, Windsurf, etc.)
  • Any applicable policies enabled (see the project's policies and governance document)

Set up the remote GitHub MCP Server in VS Code

The remote server is hosted by GitHub and is the easiest way to start. Use one of the one-click install buttons in the README, then toggle Agent mode next to the Copilot Chat text input. The server starts once that flow is complete.

To configure VS Code by hand, add a server entry to your host configuration. The README gives two variants: one uses OAuth, and the other uses a GitHub personal access token (PAT) passed as a Bearer header. The PAT version prompts for the token with a password-style input.

{ "servers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" } } }

Install in other MCP hosts

The README links a separate installation guide for each supported host, including Claude Applications, Cursor, Windsurf, Zed, Codex and Copilot CLI. Pick the guide that matches your tool and follow its steps.

Each host may need its own setup. The README notes that a host application may need a GitHub App or OAuth App to support remote access through OAuth. Any host that supports remote MCP servers should support the remote server with PAT authentication. Check your host's documentation for details.

Choose toolsets and insiders mode

If you do not specify toolsets, the server uses its default toolsets. The remote server documentation covers toolsets, headers and advanced usage in full.

The remote server also has an insiders version with early access to new features and experimental tools. You can enable it with a different URL path or with an X-MCP-Insiders header set to true.

  • Default: no toolsets specified, so default toolsets are used
  • Insiders by URL path: use the /mcp/insiders URL
  • Insiders by header: send X-MCP-Insiders set to true with the standard /mcp/ URL
{ "servers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "X-MCP-Insiders": "true" } } } }

Use the local server or GitHub Enterprise

If your host does not support remote MCP servers, use the local version instead. The README says it runs on your machine. The source excerpt shows a Docker-based local install button for VS Code, but the rest of the local setup is cut off in the material provided, so check the local section of the README for the full steps.

The remote server is not available for GitHub Enterprise Server. The README says that server does not support remote hosting and points to the local configuration instead. GitHub Enterprise Cloud with data residency (ghe.com) can use the remote server, and the README gives an example configuration for it.

  • Remote server: hosted by GitHub, easiest setup
  • Local server: runs on your machine, for hosts without remote support
  • GitHub Enterprise Server: local setup only

Get the source code

If you want to work with the code itself, the README gives a clone command. Use it to get a copy of the repository. The Go module path is github.com/github/github-mcp-server/v2, and library users must use that prefix in imports and in go get commands.

git clone https://github.com/github/github-mcp-server

What people use it for

  • Triage new bug reports and suggest labels or owners through an AI assistant
  • Review pull request changes with AI help from inside your editor
  • Ask an AI to look into why a GitHub Actions workflow run failed
  • Check Dependabot alerts and security findings across a repository
  • Give a multi-step agent workflow the GitHub context it needs

Frequently asked questions

Is the GitHub MCP Server free?

The source material does not state pricing or licence terms beyond the project licence, which is MIT. Check the repository and your host's documentation for any costs tied to your GitHub or Copilot plan.

What do I need to use the GitHub MCP Server?

You need an MCP-capable AI host with remote server support, such as VS Code 1.101 or later, Claude Desktop, Cursor or Windsurf. Without a host, the server has nothing to connect to.

Does GitHub MCP Server work with GitHub Enterprise Server?

The remote server does not support GitHub Enterprise Server. The README says to use the local server configuration for that case instead.

Can I use GitHub MCP Server with Claude Desktop?

Yes. The README lists Claude Desktop as a compatible host and links an installation guide for Claude Applications.

What is the difference between the remote and local server?

The remote server is hosted by GitHub and is the easiest to set up. The local version runs on your machine and is the fallback when your host does not support remote MCP servers.

Should I use OAuth or a personal access token?

The README gives both options. OAuth is shown for VS Code 1.101 or later, and a GitHub personal access token works with any host that supports remote MCP servers.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This server suits developers and teams who already use an MCP-compatible AI tool and want it to work with GitHub issues, pull requests, code and Actions runs. It is not useful without such a host, and it is not a standalone GitHub app with its own interface. If you run GitHub Enterprise Server, plan on the local setup described in the README.

Install options & downloads