-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
The GitHub MCP Server is a Model Context Protocol (MCP) implementation that enables AI assistants to interact with GitHub repositories. It provides a standardized interface for performing common GitHub operations like managing repositories, issues, pull requests, and content.
Model Context Protocol (MCP) is a protocol that defines how AI assistants can interact with external tools and services. It provides a standardized way for AI models to make tool calls and receive responses, enabling them to perform actions in the real world.
The GitHub MCP Server offers several benefits:
- Standardized interface for GitHub operations
- Secure authentication using system keychain
- Real-time updates via Server-Sent Events
- Comprehensive tool set for GitHub interactions
- Easy integration with AI assistants
You can install the server using pip:
pip install github-mcpOr from source:
git clone https://github.com/yourusername/github-mcp.git
cd github-mcp
pip install -e .- Python 3.8 or higher
- System keychain access
- GitHub account
- Network access to GitHub API
The server uses githubauthlib for authentication, which automatically handles token management through your system's keychain. No manual token configuration is required.
No, a GitHub account is required as the server interacts with GitHub's API to perform operations.
Run the following command:
python -m github_mcp.serverThe server will start on http://localhost:8000 by default.
- Open Cursor IDE settings
- Navigate to the MCP configuration
- Add the server URL:
http://localhost:8000/sse - Save the configuration
The server provides tools for:
- Repository management
- Issue management
- Pull request management
- Content management
See the Features page for detailed information.
The server automatically respects GitHub's API rate limits and provides rate limit information in response headers. Implement exponential backoff for retries when needed.
Common issues and solutions:
-
Port already in use
- Check if another process is using port 8000
- Use a different port with
--portoption
-
Authentication failed
- Ensure GitHub credentials are in system keychain
- Check GitHub account status
- Verify network connectivity
-
Python version mismatch
- Ensure Python 3.8+ is installed
- Check virtual environment if used
Common causes:
-
Invalid parameters
- Check parameter requirements
- Verify parameter types
- Review error messages
-
Permission issues
- Verify repository access
- Check token permissions
- Review GitHub account settings
-
Rate limiting
- Check rate limit headers
- Implement retry logic
- Reduce request frequency
If you're having authentication problems:
-
Token not found
- Ensure GitHub credentials are in keychain
- Try re-authenticating with GitHub
- Check keychain access permissions
-
Token expired
- Tokens are automatically refreshed
- Check GitHub account status
- Verify network connectivity
-
Permission denied
- Review token permissions
- Check repository access
- Verify GitHub account settings
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
See Contributing for detailed guidelines.
- Create a new tool handler in
github_mcp/tools/ - Register the tool in
github_mcp/server.py - Add tests in
tests/ - Update documentation
pytestFor specific test files:
pytest tests/test_file.py- Enable debug logging:
python -m github_mcp.server --log-level debug- Use the debug endpoint:
GET /debug
- Check logs for detailed information
Yes, the server implements several security measures:
- Secure token storage in system keychain
- Input validation
- Rate limiting
- HTTPS support
- Regular security updates
See Security for detailed information.
Tokens are:
- Stored in system keychain
- Encrypted at rest
- Never exposed in logs
- Automatically refreshed
- Scoped to minimum required permissions
The server:
- Respects GitHub's rate limits
- Implements exponential backoff
- Provides rate limit information
- Caches responses when appropriate
The server's capacity depends on:
- GitHub API rate limits
- Server hardware
- Network conditions
- Request complexity
Monitor rate limit headers and implement appropriate caching.
-
Caching
- Implement response caching
- Use appropriate cache headers
- Cache frequently accessed data
-
Request Optimization
- Batch requests when possible
- Use appropriate parameters
- Implement pagination
-
Server Configuration
- Adjust worker count
- Configure timeouts
- Optimize logging
- GitHub Issues
- GitHub Discussions
- Documentation
- Community forums
- Check existing issues
- Create a new issue
- Include:
- Detailed description
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment information
- Check existing issues
- Create a new issue
- Label as "enhancement"
- Describe the feature
- Explain the use case
- Getting Started - Installation and setup
- Features - Available tools
- API Reference - API documentation
- Security - Security considerations
- Architecture - System architecture
- Contributing - Contribution guidelines
This project is licensed under the MIT License - see the LICENSE file for details.
Last updated: {{date}}