- Home
- MCP servers
- GitHub
GitHub
- python
0
GitHub Stars
python
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.
GitHub MCP Server is an API-based tool that uses the Modular Command Processor (MCP) framework to interact with GitHub’s REST API. It enables you to fetch user details, repository information, and authenticated user data by running commands through a dedicated MCP server, integrated with the Claude desktop workflow for quick data access.
How to use
You run the MCP server through a local runtime that executes the main script and communicates with your MCP client (such as Claude Desktop). The server reads your GitHub token from the environment and uses it to perform authenticated requests. To use it, start the MCP server configuration and then issue commands via your MCP client to fetch user data or repository details.
How to install
# Prerequisites
- Python >= 3.10
- GitHub personal access token for authenticated requests
- A virtual environment tool (venv) or conda
# 1. Create and activate a Python virtual environment
python -m venv venv
source venv/bin/activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set up environment variable for GitHub token (later used by the MCP server)
# Create a file named .env in the project root and add:
GITHUB_TOKEN=your_personal_access_token
# 4. Create the Claude MCP config (see snippet below)
Additional content
The MCP setup is defined in a configuration file that specifies how to run the server locally. The example configuration uses a local Python script and a runtime command to launch the MCP server, enabling you to process commands from your MCP client.
Security notes: store your GitHub token securely and do not share your .env file. Use environment-specific token scopes appropriate for your needs. Monitor access to your MCP server to prevent unauthorized use of GitHub resources.
Configuration example shown below outlines how Claude Desktop will start the MCP server. It uses a local uv runtime to execute the main script.
Available tools
fetchUser
Fetch GitHub user details by username using the MCP server API.
fetchRepo
Retrieve details of a GitHub repository by repository name.
fetchAuthenticatedUser
Get details of the authenticated user using the GitHub personal access token.