GitHub MCP Server
by rahul-roy-glean
The GitHub MCP Server enables file operations, repository management, search functionality, and more through the GitHub API. It supports automatic branch creation, comprehensive error handling, and batch operations.
Last updated: N/A
What is GitHub MCP Server?
The GitHub MCP Server is a tool that provides a simplified interface for interacting with the GitHub API. It allows users to perform various actions such as creating/updating files, managing repositories, searching code/issues/users, and handling pull requests, all while maintaining Git history and providing comprehensive error handling.
How to use GitHub MCP Server?
To use the GitHub MCP Server, you need a GitHub Personal Access Token with appropriate permissions. Configure the server using Docker or NPX, providing the token as an environment variable. Then, you can use the provided tools (e.g., create_or_update_file
, push_files
, search_repositories
) by sending requests with the required inputs.
Key features of GitHub MCP Server
Automatic Branch Creation
Comprehensive Error Handling
Git History Preservation
Batch Operations
Advanced Search
Use cases of GitHub MCP Server
Automated file updates in repositories
Batch pushing of multiple files to a repository
Searching for specific code snippets across multiple repositories
Creating and managing issues and pull requests programmatically
Forking repositories to an organization
FAQ from GitHub MCP Server
How do I create a Personal Access Token?
How do I create a Personal Access Token?
Go to GitHub Settings > Developer settings > Personal access tokens and create a new token with the necessary scopes (e.g., repo
, public_repo
).
What scopes are required for the Personal Access Token?
What scopes are required for the Personal Access Token?
The repo
scope is needed for full control of private repositories. For public repositories only, the public_repo
scope is sufficient.
How do I configure the server with Docker?
How do I configure the server with Docker?
Use the provided Docker configuration in mcp_config.json
, replacing <YOUR_TOKEN>
with your actual Personal Access Token.
How do I configure the server with NPX?
How do I configure the server with NPX?
Use the provided NPX configuration in mcp_config.json
, replacing <YOUR_TOKEN>
with your actual Personal Access Token.
What environment variables can I use to configure the server?
What environment variables can I use to configure the server?
You can use GITHUB_PERSONAL_ACCESS_TOKEN
(required), GITHUB_OWNER
(optional), GITHUB_REPO
(optional), and GITHUB_WORKFLOW_ID
(optional).