
A Model Context Protocol server that provides tools for interacting with the GitHub API through
A Model Context Protocol server that provides tools for interacting with the GitHub API through PyGithub. This server enables AI assistants to perform GitHub operations like managing issues, repositories, and pull requests.
·
A Model Context Protocol server that provides tools for interacting with the GitHub API through PyGithub. This server enables AI assistants to perform GitHub operations like managing issues, repositories, and pull requests.
Modular Tool Architecture:
Complete GitHub Issue Management:
Smart Parameter Handling:
Robust Implementation:
Comprehensive guides are available in the docs/guides directory:
See these guides for detailed information about using the PyGithub MCP Server.
{
"owner": "username",
"repo": "repository",
"title": "Issue Title",
"body": "Issue description",
"assignees": ["username1", "username2"],
"labels": ["bug", "help wanted"],
"milestone": 1
}{
"owner": "username",
"repo": "repository",
"issue_number": 1
}{
"owner": "username",
"repo": "repository",
"issue_number": 1,
"title": "Updated Title",
"body": "Updated description",
"state": "closed",
"labels": ["bug", "wontfix"]
}{
"owner": "username",
"repo": "repository",
"issue_number": 1,
"body": "This is a comment"
}{
"owner": "username",
"repo": "repository",
"issue_number": 1,
"per_page": 10
}{
"owner": "username",
"repo": "repository",
"issue_number": 1,
"comment_id": 123456789,
"body": "Updated comment text"
}{
"owner": "username",
"repo": "repository",
"issue_number": 1,
"labels": ["enhancement", "help wanted"]
}{
"owner": "username",
"repo": "repository",
"issue_number": 1,
"label": "enhancement"
}All operations handle optional parameters intelligently:
uv venv
source .venv/bin/activateuv pip install -e .Add the server to your MCP settings (e.g., claude_desktop_config.json or cline_mcp_settings.json):
{
"mcpServers": {
"github": {
"command": "/path/to/repo/.venv/bin/python",
"args": ["-m", "pygithub_mcp_server"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
}The server supports selectively enabling or disabling tool groups through configuration. You can configure this in two ways:
Create a JSON configuration file (e.g., pygithub_mcp_config.json):
{
"tool_groups": {
"issues": {"enabled": true},
"repositories": {"enabled": true},
"pull_requests": {"enabled": false},
"discussions": {"enabled": false},
"search": {"enabled": true}
}
}Then specify this file in your environment:
export PYGITHUB_MCP_CONFIG=/path/to/pygithub_mcp_config.jsonAlternatively, use environment variables to configure tool groups:
export PYGITHUB_ENABLE_ISSUES=true
export PYGITHUB_ENABLE_REPOSITORIES=true
export PYGITHUB_ENABLE_PULL_REQUESTS=falseBy default, only the issues tool group is enabled. See README.config.md for more detailed configuration options.
The project includes a comprehensive test suite:
# Run all tests
pytest
# Run tests with coverage report
pytest --cov
# Run specific test file
pytest tests/test_operations/test_issues.py
# Run tests matching a pattern
pytest -k "test_create_issue"Note: Many tests are currently failing and under investigation. This is a known issue being actively worked on.
Test MCP tools during development using the MCP Inspector:
source .venv/bin/activate # Ensure venv is activated
npx @modelcontextprotocol/inspector -e GITHUB_PERSONAL_ACCESS_TOKEN=your-token-here uv run pygithub-mcp-serverUse the MCP Inspector's Web UI to:
tests/
├── unit/ # Fast tests without external dependencies
│ ├── config/ # Configuration tests
│ ├── tools/ # Tool registration tests
│ └── ... # Other unit tests
└── integration/ # Tests with real GitHub API
├── issues/ # Issue tools tests
└── ... # Other integration testssrc/
└── pygithub_mcp_server/
├── __init__.py
├── __main__.py
├── server.py # Server factory (create_server)
├── version.py
├── config/ # Configuration system
│ ├── __init__.py
│ └── settings.py # Configuration management
├── tools/ # Modular tool system
│ ├── __init__.py # Tool registration framework
│ └── issues/ # Issue tools
│ ├── __init__.py
│ └── tools.py # Issue tool implementations
├── client/ # GitHub client functionality
│ ├── __init__.py
│ ├── client.py # Core GitHub client
│ └── rate_limit.py # Rate limit handling
├── converters/ # Data transformation
│ ├── __init__.py
│ ├── parameters.py # Parameter formatting
│ ├── responses.py # Response formatting
│ ├── common/ # Common converters
│ ├── issues/ # Issue-related converters
│ ├── repositories/ # Repository converters
│ └── users/ # User-related converters
├── errors/ # Error handling
│ ├── __init__.py
│ └── exceptions.py # Custom exceptions
├── operations/ # GitHub operations
│ ├── __init__.py
│ └── issues.py
├── schemas/ # Data models
│ ├── __init__.py
│ ├── base.py
│ ├── issues.py
│ └── ...
└── utils/ # General utilities
├── __init__.py
└── environment.py # Environment utilitiesServer fails to start:
Build errors:
GitHub API errors:
MIT
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add github -- /path/to/repo/.venv/bin/python -m pygithub_mcp_server{
"mcpServers": {
"github": {
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": ""
},
"args": [
"-m",
"pygithub_mcp_server"
],
"command": "/path/to/repo/.venv/bin/python"
}
}
}code --add-mcp '{"name":"github","env":{"GITHUB_PERSONAL_ACCESS_TOKEN":""},"args":["-m","pygithub_mcp_server"],"command":"/path/to/repo/.venv/bin/python"}'[mcp_servers.github]
command = "/path/to/repo/.venv/bin/python"
args = ["-m", "pygithub_mcp_server"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/pygithub-mcp-server to learn what the "PyGithub MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
npx @modelcontextprotocol/inspector -e GITHUB_PERSONAL_ACCESS_TOKEN=your-token-here uv run pygithub-mcp-serverThis server runs locally, so we can't read its tool list over the web yet.
We could not run this server: it ships no npx package for our sandbox and no public endpoint. The four checks that need a live server are left out, and the grade tops out at B until one exists.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/pygithub-mcp-server)Nothing comparable is listed yet.
No tagged releases on record.
Connect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "pygithub-mcp-server" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.