github-mcp-server

github-mcp-server

0

The GitHub MCP Server provides a set of tools and features to interact with the GitHub API, enabling users to perform file operations, manage repositories, and utilize advanced search functionalities. It supports automation of tasks like branch creation, comprehensive error handling, and preserves Git history during operations.

GitHub MCP Server

MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.

Features

  • 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

Tools

  • create_or_update_file: Create or update a single file in a repository
  • push_files: Push multiple files in a single commit
  • search_repositories: Search for GitHub repositories
  • create_repository: Create a new GitHub repository
  • get_file_contents: Get contents of a file or directory
  • create_issue: Create a new issue
  • create_pull_request: Create a new pull request
  • fork_repository: Fork a repository
  • create_branch: Create a new branch
  • list_issues: List and filter repository issues
  • update_issue: Update an existing issue
  • add_issue_comment: Add a comment to an issue
  • search_code: Search for code across GitHub repositories
  • search_issues: Search for issues and pull requests
  • search_users: Search for GitHub users
  • list_commits: Gets commits of a branch in a repository
  • get_issue: Gets the contents of an issue within a repository
  • get_pull_request: Get details of a specific pull request
  • list_pull_requests: List and filter repository pull requests
  • create_pull_request_review: Create a review on a pull request
  • merge_pull_request: Merge a pull request
  • get_pull_request_files: Get the list of files changed in a pull request
  • get_pull_request_status: Get the combined status of all status checks for a pull request
  • update_pull_request_branch: Update a pull request branch with the latest changes from the base branch
  • get_pull_request_comments: Get the review comments on a pull request
  • get_pull_request_reviews: Get the reviews on a pull request

Setup

Personal Access Token

Create a GitHub Personal Access Token with appropriate permissions:

  • Create a token with the repo scope ("Full control of private repositories")

Usage with Claude Desktop

To use this with Claude Desktop, add the following to your claude_desktop_config.json:

Docker
NPX

Build

Docker build instructions available.