Github

Author:@modelcontextprotocol
View on GitHub

Overview

GitHub MCP Server is a tool that connects to GitHub's API. It helps manage repositories, handle files, and perform searches to support collaborative software development.

To use this server, you need a GitHub Personal Access Token. Once configured in your application, it allows you to manage repositories through API calls.

Key features include: automatic branch creation for file updates; clear error handling; preserving Git history; support for batch file operations; and advanced search across repositories, issues, and users.

Common use cases are: automating file creation and management in repositories; integrating repository tasks into CI/CD pipelines; and enabling search for code and issues within GitHub.

Frequently asked questions: To create a Personal Access Token, go to GitHub Settings > Developer settings > Personal access tokens. The server supports operations like creating/updating files, searching, creating issues/pull requests, and branch management. The tool itself is free to use but requires a GitHub account.

Configuration

{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "mcp/github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}