home / mcp / github mcp server
MCP server exposing GitHub actions for files, repositories, issues, PRs, and search
Configuration
View docs{
"mcpServers": {
"alexkissijr-unreal-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"mcp/github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}This MCP Server provides programmatic access to the GitHub API for performing file operations, repository management, search, issues, pull requests, and more. It enables automated workflows by exposing repository actions through a standardized MCP interface, preserving Git history and supporting batch operations.
Use the MCP server with a client that supports MCP to perform GitHub-related actions such as creating or updating files, pushing multiple files in a single commit, managing issues and pull requests, and searching repositories, code, issues, and users. The MCP server can be run locally or connected remotely; auth is typically provided via a GitHub personal access token.
Prerequisites: Node.js and npm or a runtime that supports MCP servers. If you plan to run the provided microserver via Docker, ensure Docker is installed. If you prefer an NPX-based start, ensure npm is installed as well.
# Prerequisites
node -v
npm -v
# Optional: Docker if using the Docker-based runtime
docker -vThe README provides two concrete ways to run the GitHub MCP Server. Both methods require a GitHub Personal Access Token with appropriate permissions. Replace <YOUR_TOKEN> with your actual token in configuration examples.
Environment variables required by the examples are shown in the code blocks. The main variable is GITHUB_PERSONAL_ACCESS_TOKEN, which must be supplied with a token that has the necessary repository permissions.
Create or update a single file in a repository. Requires owner, repo, path, content, message, and branch. Optional sha for updates.
Push multiple files in a single commit. Requires owner, repo, branch, files (with path and content), and a commit message.
Search for GitHub repositories based on a query with optional pagination.
Create a new GitHub repository with name, optional description, privacy option, and auto-initialization.
Get contents of a file or directory at a given path and branch.
Create a new issue with optional body, assignees, labels, and milestone.
Create a pull request with title, body, head, base, and optional draft and maintainer-edit settings.
Fork a repository into the same user or an organization.
Create a new branch from a specified source branch.
List and filter repository issues by state, labels, sort, and pagination.
Update an existing issue with new title, body, state, labels, assignees, and milestone.
Add a comment to an issue.
Search code across repositories with optional sort and pagination.
Search for issues and pull requests with sorting and pagination.
Search for GitHub users with optional sort and pagination.
List commits on a branch with pagination support.
Retrieve details of a specific issue.
Get details of a specific pull request including diff and reviews.
List and filter pull requests by state, head, base, sort, and pagination.
Create a review on a pull request with a body, event, and optional comments.
Merge a pull request with optional title, message, and method.
Get the list of files changed in a pull request.
Get the combined status of all checks for a pull request.
Update a PR branch with the latest changes from the base branch.
Get review comments on a pull request.
Get reviews on a pull request.