- Home
- MCP servers
- GitHub
GitHub
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-phialsbasement_mcp-github-server-plus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"mcp/github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}GitHub MCP Server Plus provides a dedicated MCP server that exposes GitHub API capabilities for file operations, repository management, search, issues, pull requests, and more. It lets you automate common GitHub workflows through a structured MCP endpoint surface while preserving Git history and enabling batch operations.
How to use
You interact with the GitHub MCP Server Plus through an MCP client by selecting a server named github and invoking its available tools. You can create or update files, push multiple files, search repositories, manage issues and pull requests, and more, all through the MCP surface. When you push changes, branches are created automatically if they do not exist, and Git history is preserved without force pushes.
How to install
Prerequisites include Docker or Node tooling to run the MCP server. You will need a GitHub Personal Access Token with the repo scope (or public_repo scope if you only work with public repositories). Keep your token secure and do not expose it in client configuration.
Install via Docker (recommended for quick starts):
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN \
mcp/github
"""
## Additional setup steps
If you prefer to run the MCP server locally via NPX, you can start it with the NPX-based command shown below.
Install and run with NPX:
{ "mcpServers": { "github": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-github" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" } } } }
"""
Configuration and security
Configure the MCP client with either the Docker-based runtime or the NPX-based runtime as separate MCP servers. Ensure you supply the GITHUB_PERSONAL_ACCESS_TOKEN environment variable securely. For Docker, the env block maps GITHUB_PERSONAL_ACCESS_TOKEN to your token. For NPX, you place the token in the same environment mapping.
Notes on usage and capabilities
Available tools cover a wide range of GitHub actions, including creating or updating files, pushing multiple files, creating repositories, searching code, opening issues, creating pull requests, forking, branching, and reviewing pull requests. You can list and filter issues and PRs, fetch commit history, and obtain file contents. The server provides advanced search across repositories, issues, users, and code.
Build and start from source
If you build from source, the runtime command shown for Docker and NPX replaces the generic start commands. Use the same environment variable mappings and tokens to access GitHub APIs securely.
Troubleshooting and tips
If you encounter authentication issues, verify that GITHUB_PERSONAL_ACCESS_TOKEN has the correct scope and is being passed to the container or process correctly. Check that the branch creation happens automatically when you create or update files and that Git history is preserved.
Available tools
create_or_update_file
Create or update a single file in a repository. Inputs: owner, repo, path, content, message, branch, sha (optional). Returns: file content and commit details.
push_files_content
Push multiple files with direct content in a single commit. Inputs: owner, repo, branch, files (path, content), message. Returns: updated branch reference.
push_files_from_path
Push multiple files from filesystem paths in a single commit. Inputs: owner, repo, branch, files (path, filepath), message. Returns: updated branch reference.
search_repositories
Search for GitHub repositories with query, page, perPage. Returns: repository search results.
create_repository
Create a new GitHub repository with name, description, private, autoInit. Returns: created repository details.
get_file_contents
Get contents of a file or directory. Inputs: owner, repo, path, branch. Returns: file/directory contents.
create_issue
Create a new issue with owner, repo, title, body, assignees, labels, milestone. Returns: created issue details.
create_pull_request
Create a new pull request with owner, repo, title, body, head, base, draft, maintainer_can_modify. Returns: created PR details.
fork_repository
Fork a repository to owner/repo or an organization. Returns: forked repository details.
create_branch
Create a new branch in a repository. Inputs: owner, repo, branch, from_branch. Returns: created branch reference.
list_issues
List and filter repository issues with state, labels, sort, direction, since, page, per_page. Returns: array of issue details.
update_issue
Update an existing issue with title, body, state, labels, assignees, milestone. Returns: updated issue details.
add_issue_comment
Add a comment to an issue. Inputs: owner, repo, issue_number, body. Returns: created comment details.
search_code
Search for code across repositories with q, sort, order, per_page, page. Returns: code search results with repo context.
search_issues
Search for issues and PRs with q, sort, order, per_page, page. Returns: issue and PR search results.
search_users
Search for GitHub users with q, sort, order, per_page, page. Returns: user search results.
list_commits
Get commits of a branch in a repository with page, per_page, sha. Returns: list of commits.
get_issue
Get the contents of an issue by number. Returns: GitHub Issue object and details.
get_pull_request
Get details of a pull request by number. Returns: PR details including diff and review status.
list_pull_requests
List and filter repository pull requests by state, head, base, sort, direction, per_page, page. Returns: array of pull request details.
create_pull_request_review
Create a review on a pull request with body, event, optional commit_id, optional comments. Returns: created review details.
merge_pull_request
Merge a pull request with optional commit_title, commit_message, merge_method. Returns: merge result details.
get_pull_request_files
Get the list of files changed in a pull request. Returns: array of changed files.
get_pull_request_status
Get the combined status of all status checks for a pull request. Returns: combined status and individual checks.
update_pull_request_branch
Update a pull request branch with latest changes from base. Inputs: pull_number, optional expected_head_sha. Returns: success message.
get_pull_request_comments
Get review comments on a pull request. Returns: array of review comments.
get_pull_request_reviews
Get reviews on a pull request. Returns: array of pull request reviews.