Skip to main content
MCP Server

Repository management, file operations, and GitHub API integration

Share
2,100 stars TypeScript MIT Updated: 2025-04-20

Send to Your Agent

Copy this prompt and paste it into Claude, Cursor, or any MCP client to install instantly.

Install the GitHub MCP server for me.

Server: GitHub
Description: Repository management, file operations, and GitHub API integration
Install command: npx -y @modelcontextprotocol/server-github

Environment variables needed:
- GITHUB_PERSONAL_ACCESS_TOKEN: GitHub personal access token with repo and read:user scopes (required)

GitHub: https://github.com/modelcontextprotocol/servers-archived/tree/main/src/github

Please install this MCP server and confirm when ready.

Paste into any AI agent with MCP support — works with Claude Desktop, Cursor, Cline, and more.

Quick Install

Config file: ~/Library/Application Support/Claude/claude_desktop_config.json

  1. Open Claude Desktop app
  2. Go to Settings → Developer → Edit Config
  3. Paste the config below into the file
  4. Restart Claude Desktop
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
      }
    }
  }
}

Add this to your ~/Library/Application Support/Claude/claude_desktop_config.json

Installation Methods

npx Run directly with npx
npx -y @modelcontextprotocol/server-github

Tools (12)

search_repositories

Search for repositories on GitHub

create_repository

Create a new GitHub repository

get_file_contents

Get contents of a file or directory in a repository

create_or_update_file

Create or update a file in a repository

push_files

Push multiple files in a single commit

create_issue

Create a new issue in a repository

create_pull_request

Create a new pull request

fork_repository

Fork a repository to your account or an organization

create_branch

Create a new branch in a repository

list_issues

List issues in a repository with filtering

update_issue

Update an existing issue

add_issue_comment

Add a comment to an issue

Environment Variables

GITHUB_PERSONAL_ACCESS_TOKEN Required

GitHub personal access token with repo and read:user scopes

Example: ghp_xxxxxxxxxxxx

Compatibility

Claude Desktop
Cursor
Cline
VS Code
Devin (formerly Windsurf)

About

A Model Context Protocol server that provides integration with GitHub's API, enabling repository management, file operations, issue tracking, and pull request workflows.

Key Features

  • Repository management — Search, create, and fork repositories
  • File operations — Read, create, and update files directly
  • Issue tracking — Create, list, update, and comment on issues
  • Pull requests — Create and manage PRs
  • Branch management — Create branches for feature work

Authentication

Requires a GitHub Personal Access Token with the following scopes:

  • repo — Full control of private repositories
  • read:user — Read user profile data

Create a token at: https://github.com/settings/tokens

Use Cases

  • Code review — "Show me open pull requests in this repo"
  • Issue management — "Create an issue for this bug with these details"
  • File editing — "Update the README with this new section"
  • Repository exploration — "List all files in the src directory"
  • Automation — "Fork this repo, create a branch, and make these changes"

Related Resources

Compare LLM Pricing

This server works with Claude, GPT-4o, and other models. Compare API costs side-by-side to find the cheapest option for your workflow.