Supports environment variable management through .env files to securely store GitHub credentials and configuration settings.
Allows interaction with GitHub's API to search repositories and issues, create and manage issues and pull requests, handle repository settings and workflows, and manage collaborators and teams.
Enables management of GitHub Actions workflows, including enabling, disabling, and triggering workflow actions within repositories.
Integrates with Pytest for testing functionality, allowing users to validate the MCP's GitHub integration capabilities.
GitHub MCP Tools
A Multi-Claude Program (MCP) for interacting with GitHub APIs through Claude Desktop.
Features
Search GitHub repositories and issues
Create, update, and manage GitHub issues and pull requests
Manage repository settings and configurations
Handle repository workflows and actions
Search for users and organizations
Manage repository collaborators and teams
Installation
Clone this repository:
git clone https://github.com/yourusername/github-mcp.git cd github-mcpCreate and activate a virtual environment:
# On macOS/Linux python -m venv venv source venv/bin/activate # On Windows python -m venv venv .\venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtCreate a
.env
file in the project root:touch .envAdd your GitHub credentials to the
.env
file:GITHUB_TOKEN=your_personal_access_token_here GITHUB_USERNAME=your_github_usernameTest the installation:
# Run all tests python -m pytest # Run a specific test file python -m pytest tests/test_search_repos.pyStart the MCP server:
python run.py
Environment Setup
GitHub Personal Access Token
You'll need a fine-grained personal access token to authenticate with GitHub:
Log in to your GitHub account
Go to Settings > Developer settings > Personal access tokens > Fine-grained tokens
Click "Generate new token"
Configure the token:
Token name: "Claude Desktop Integration"
Description: "Token for Claude Desktop GitHub integration"
Expiration: Choose an appropriate expiration date
Repository access: Select "All repositories" or specific repositories
Permissions:
Repository permissions:
Actions: Read and write
Contents: Read and write
Issues: Read and write
Pull requests: Read and write
Repository hooks: Read and write
Repository settings: Read and write
Organization permissions (if working with organization repositories):
Members: Read-only
Teams: Read-only
Click "Generate token" and save the generated token securely
Tools
Search Repositories
Search for GitHub repositories using various criteria.
Parameters:
query: Search query string
sort: Sort field (stars, forks, updated, etc.)
order: Sort order (asc or desc)
max_results: Maximum number of results to return (default: 10)
Create Issue
Create a new GitHub issue in a specified repository.
Parameters:
owner: Repository owner
repo: Repository name
title: Issue title
body: Issue description
labels: List of labels to apply
assignees: List of assignee usernames
Create Pull Request
Create a new pull request.
Parameters:
owner: Repository owner
repo: Repository name
title: PR title
body: PR description
head: Source branch
base: Target branch
draft: Whether to create as draft PR
Manage Repository Settings
Update repository settings and configurations.
Parameters:
owner: Repository owner
repo: Repository name
settings: Dictionary of settings to update
Search Issues
Search for issues across repositories.
Parameters:
query: Search query string
state: Issue state (open, closed, all)
sort: Sort field
order: Sort order
max_results: Maximum number of results
Manage Workflows
Manage GitHub Actions workflows.
Parameters:
owner: Repository owner
repo: Repository name
workflow_file: Workflow file path
action: Action to perform (enable, disable, trigger)
Manage Collaborators
Manage repository collaborators.
Parameters:
owner: Repository owner
repo: Repository name
username: Collaborator username
permission: Permission level (pull, push, admin, maintain, triage)
Example Usage
Development
Running Tests
Adding New Tools
Create a new file in
src/tools/
Implement your tool function
Register the tool in
src/main.py
Add tests in
tests/
Update documentation in README.md
Contributing
Fork the repository
Create a feature branch
Make your changes
Run tests
Submit a pull request
License
MIT License
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Multi-Claude Program for interacting with GitHub APIs through Claude Desktop, allowing users to search repositories, manage issues, pull requests, repository settings, workflows, and collaborators.
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.Last updated -4
- -securityFlicense-qualityA modular command processor server that enables interaction with GitHub's REST API to fetch user details, repository information, and authenticated user data through natural language commands in Claude.Last updated -
- AsecurityFlicenseAqualityAn MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.Last updated -4
- -securityAlicense-qualityConnects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.Last updated -3,264MIT License