GitHub MCP Server

Enables file operations, repository management, and search functionality for the GitHub API.

Local serverstdioTypeScript 1

What is the GitHub MCP server?

Most developer tooling work still happens through a UI a human drives. GitHub MCP server moves it into the conversation instead. Enables file operations, repository management, and search functionality for the GitHub API.

The short version

  • Automatic Branch Creation — When creating/updating files or pushing changes, branches are automatically created if they don't exist
  • Comprehensive Error Handling — Clear error messages for common issues
  • Git History Preservation — Operations maintain proper Git history without force pushing
  • Batch Operations — Support for both single-file and multi-file operations
  • Advanced Search — Support for searching code, issues/PRs, and users

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

The tools it exposes

The server publishes 3 tools. What each one is for:

  • Inputs — - owner (string): Repository owner (username or organization)
  • Returns — File content and commit details
  • Features — The Features tool exposed by this server

What it needs from you

Configuration is passed through the environment: GITHUB_PERSONAL_ACCESS_TOKEN, YOUR_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. GitHub's toolset — Inputs, Returns, Features — is a fair guide to whether it matches your workflow. It is maintained by asbloom-py; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
Inputs- owner (string): Repository owner (username or organization)
ReturnsFile content and commit details
FeaturesThe Features tool exposed by this server.

How to install the GitHub MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GITHUB_PERSONAL_ACCESS_TOKENCredential the server authenticates with.Yes
YOUR_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use GitHub to Inputs.
  • Use GitHub to Returns.
  • Use GitHub to Features.

Frequently asked questions

This tool lets you automate common GitHub tasks like creating/updating files, managing repositories, creating pull requests, searching code/issues/users, and more, all through the GitHub API.