- Explore MCP Servers
- github-mcp
Github Mcp
What is Github Mcp
The github-mcp is a Model Context Protocol (MCP) server designed for GitHub integration, enabling AI assistants to interact with GitHub repositories, issues, pull requests, and content.
Use cases
Use cases include automating issue tracking, managing pull requests through AI assistants, retrieving repository content for analysis, and enhancing collaboration in development teams.
How to use
To use github-mcp, clone the repository, install the package using pip, set up GitHub authentication, and start the server. Configure your IDE to connect to the MCP server at http://localhost:8000.
Key features
Key features include repository management (listing and getting details), issue management (listing and creating issues), pull request management (listing and creating pull requests), and content management (retrieving file content and listing directory contents).
Where to use
github-mcp can be used in software development environments, particularly for projects that require AI integration with GitHub for managing repositories and automating workflows.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Github Mcp
The github-mcp is a Model Context Protocol (MCP) server designed for GitHub integration, enabling AI assistants to interact with GitHub repositories, issues, pull requests, and content.
Use cases
Use cases include automating issue tracking, managing pull requests through AI assistants, retrieving repository content for analysis, and enhancing collaboration in development teams.
How to use
To use github-mcp, clone the repository, install the package using pip, set up GitHub authentication, and start the server. Configure your IDE to connect to the MCP server at http://localhost:8000.
Key features
Key features include repository management (listing and getting details), issue management (listing and creating issues), pull request management (listing and creating pull requests), and content management (retrieving file content and listing directory contents).
Where to use
github-mcp can be used in software development environments, particularly for projects that require AI integration with GitHub for managing repositories and automating workflows.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
GitHub MCP Server
A Model Context Protocol (MCP) server that provides GitHub integration tools for AI assistants. This server implements a set of tools that allow AI models to interact with GitHub repositories, issues, pull requests, and content.
Features
- Repository Management
- List repositories
- Get repository details
- Issue Management
- List issues
- Create issues
- Pull Request Management
- List pull requests
- Create pull requests
- Content Management
- Get file content
- List directory contents
Installation
- Clone the repository:
git clone https://github.com/yourusername/github-mcp.git
cd github-mcp
- Install the package:
pip install -e .
Authentication
This server uses githubauthlib
for secure GitHub authentication. The library retrieves GitHub tokens from your system’s keychain:
- macOS: Uses Keychain Access
- Windows: Uses Credential Manager
- Linux: Uses libsecret
To set up authentication:
-
Install the required system dependencies:
-
macOS: No additional setup required
-
Windows: No additional setup required
-
Linux: Install libsecret
# Ubuntu/Debian sudo apt-get install libsecret-tools # Fedora sudo dnf install libsecret
-
-
Configure your GitHub credentials:
-
The server will automatically use your Git credentials from the system keychain
-
If no credentials are found, you’ll need to configure Git with your GitHub credentials:
git config --global credential.helper store # Then perform a Git operation that requires authentication
-
Usage
- Start the server:
python -m github_mcp.server
The server will start on http://localhost:8000
by default.
- Configure Cursor IDE:
-
Open Cursor IDE settings
-
Add the following MCP server configuration:
{ "mcp": { "servers": [ { "name": "github-mcp", "url": "http://localhost:8000/sse" } ] } }
-
API Endpoints
GET /
: Server information and available toolsPOST /tool
: Synchronous tool callsGET /sse
: Server-Sent Events endpoint for streaming responses
Available Tools
Repository Tools
list_repositories
: List GitHub repositories- Parameters:
visibility
(optional): “all”, “public”, or “private”sort
(optional): “created”, “updated”, “pushed”, or “full_name”
- Parameters:
get_repository
: Get repository details- Parameters:
owner
: Repository ownerrepo
: Repository name
- Parameters:
Issue Tools
list_issues
: List repository issues- Parameters:
owner
: Repository ownerrepo
: Repository namestate
(optional): “open”, “closed”, or “all”labels
(optional): List of label names
- Parameters:
create_issue
: Create a new issue- Parameters:
owner
: Repository ownerrepo
: Repository nametitle
: Issue titlebody
(optional): Issue descriptionlabels
(optional): List of label namesassignees
(optional): List of assignee usernames
- Parameters:
Pull Request Tools
list_pull_requests
: List repository pull requests- Parameters:
owner
: Repository ownerrepo
: Repository namestate
(optional): “open”, “closed”, or “all”sort
(optional): “created”, “updated”, “popularity”, or “long-running”
- Parameters:
create_pull_request
: Create a new pull request- Parameters:
owner
: Repository ownerrepo
: Repository nametitle
: Pull request titlebody
(optional): Pull request descriptionhead
: Source branchbase
(optional): Target branch (default: “main”)draft
(optional): Create as draft (default: false)
- Parameters:
Content Tools
get_file_content
: Get file content- Parameters:
owner
: Repository ownerrepo
: Repository namepath
: File pathref
(optional): Branch/tag/commit reference
- Parameters:
list_directory
: List directory contents- Parameters:
owner
: Repository ownerrepo
: Repository namepath
(optional): Directory path (default: “”)ref
(optional): Branch/tag/commit reference
- Parameters:
Development
- Install development dependencies:
pip install -e ".[dev]"
- Run tests:
pytest
- Run linting:
ruff check .
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Acknowledgments
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.