PyGithub MCP Server
Overview
PyGithub MCP Server is a Model Context Protocol server that provides tools for interacting with the GitHub API through PyGithub, enabling AI assistants to perform GitHub operations like managing issues, repositories, and pull requests.
To use the server, set it up in your MCP settings with your GitHub personal access token, and utilize the provided API endpoints for various GitHub operations such as creating and managing issues and comments.
- Complete GitHub Issue Management: Create, update, and manage issues and comments. - Smart Parameter Handling: Dynamic kwargs building and validation for input parameters. - Robust Implementation: Object-oriented interactions with proper error handling and logging.
- Automating issue management in GitHub repositories.
- Integrating GitHub operations into AI assistants.
- Streamlining collaboration through automated pull request handling.
Add to your AI client
Use these steps to connect PyGithub MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"pygithub-mcp-server-astromined": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-pygithub-mcp-server-astromined"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"pygithub-mcp-server-astromined": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-pygithub-mcp-server-astromined"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"pygithub-mcp-server-astromined": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-pygithub-mcp-server-astromined"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"pygithub-mcp-server-astromined": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-pygithub-mcp-server-astromined"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"pygithub-mcp-server-astromined": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-pygithub-mcp-server-astromined"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"pygithub-mcp-server-astromined": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-pygithub-mcp-server-astromined"
]
}
}
}FAQ
What programming language is used?
The server is built using Python.
Is there documentation available?
Yes, comprehensive guides are available in the docs/guides directory.
How do I handle errors?
The server includes detailed error handling and logging to assist with troubleshooting.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1620,"uuid":"aafaf385-1887-4f63-af3d-63635e97678a","name":"pygithub-mcp-server","title":"PyGithub MCP Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/67924737?v=4","created_at":"2025-02-23T09:50:13.477Z","updated_at":"2025-03-05T04:20:34.774Z","status":"created","author_name":"AstroMined","author_avatar_url":"https://avatars.githubusercontent.com/u/67924737?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/AstroMined/pygithub-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-13 01:30:53\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]