Pygithub MCP Server

A Model Context Protocol server that provides tools for interacting with the GitHub API through PyGithub. This server enables AI assistants to

Local serverstdioPython

What is the Pygithub MCP server?

Pygithub mcp server connects Pygithub to AI assistants that speak the Model Context Protocol. 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.

What Pygithub does

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.

Key capabilities

  • Modular Tool Architecture:
  • Configurable tool groups that can be enabled/disabled
  • Domain-specific organization (issues, repositories, etc.)
  • Flexible configuration via file or environment variables
  • Clear separation of concerns with modular design
  • Easy extension with consistent patterns
  • Complete GitHub Issue Management:
  • Create and update issues

Tools it exposes

Once connected, the assistant can call these 2 tools directly:

  • Testing — The Testing tool exposed by this server
  • Troubleshooting — 1. Server fails to start: - Verify venv Python path in MCP settings - Ensure all requirements are installed in venv - Check GITHUB_PERSONAL_ACCESS_TOKEN is set

Installing the pygithub mcp server

The server is distributed via npm as @modelcontextprotocol/inspector, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 5 environment variables: GITHUB_PERSONAL_ACCESS_TOKEN, PYGITHUB_MCP_CONFIG, PYGITHUB_ENABLE_ISSUES, PYGITHUB_ENABLE_REPOSITORIES, PYGITHUB_ENABLE_PULL_REQUESTS. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Pygithub sits in that group, and the shape of its toolset — Testing, Troubleshooting — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by AstroMined, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the pygithub mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
TestingThe Testing tool exposed by this server.
Troubleshooting1. Server fails to start: - Verify venv Python path in MCP settings - Ensure all requirements are installed in venv - Check GITHUB_PERSONAL_ACCESS_TOKEN is set and valid

How to install the Pygithub MCP server

{
  "mcpServers": {
    "github": {
      "command": "/path/to/repo/.venv/bin/python",
      "args": ["-m", "pygithub_mcp_server"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GITHUB_PERSONAL_ACCESS_TOKENCredential the server authenticates with.Yes
PYGITHUB_MCP_CONFIGConfiguration value read at startup.Optional
PYGITHUB_ENABLE_ISSUESConfiguration value read at startup.Optional
PYGITHUB_ENABLE_REPOSITORIESConfiguration value read at startup.Optional
PYGITHUB_ENABLE_PULL_REQUESTSConfiguration value read at startup.Optional

Example prompts to try

  • Use Pygithub to Testing.
  • Use Pygithub to Troubleshooting.

Frequently asked questions

It connects Pygithub to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (Testing, Troubleshooting) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Pygithub directly.