github-mcp

github-mcp

GitHub MCP server for Claude Code, Cursor, Cline, Windsurf, and any MCP-compatible client. Exposes GitHub tools (issues, pull requests, code search, file content) to your LLM via the Model Context Protocol.

Category
Visit Server

README

github-mcp

Tests PyPI version Python License: MIT

GitHub MCP server for Claude Code, Cursor, Cline, Windsurf, and any MCP-compatible client.

Exposes GitHub tools (issues, pull requests, code search, file content) to your LLM via the Model Context Protocol.

Features

  • ๐Ÿ” Connection pooling & retry โ€” single HTTP client per process, exponential backoff on 429/5xx, honors Retry-After.
  • ๐Ÿ›ก๏ธ Typed errors โ€” GitHubError carries HTTP status, parsed message, and endpoint.
  • โœ… Input validation โ€” catches bad inputs before the network round-trip.
  • ๐Ÿ“„ Text files decoded โ€” get_file_content returns UTF-8 text under decoded_content for text files.
  • ๐Ÿงช Fully tested โ€” 75 mock-based tests, plus opt-in live integration tests.
  • ๐Ÿชถ Tiny โ€” three runtime deps (mcp, httpx, pydantic); no PyGithub.

Tools exposed

Tool Description
list_issues List issues (filter by state, labels, since) โ€” PRs filtered out
get_issue Get a single issue by number
create_issue Create an issue (with optional labels)
list_pull_requests List PRs (filter by state)
get_pull_request Get a single PR by number
search_code Search code across GitHub (requires code-search scope)
get_file_content Read a file at a ref; text files returned UTF-8-decoded

Full parameter docs: docs/USAGE.md.

Install

pip install github-mcp

Or with uv:

uv tool install github-mcp

Requires Python 3.10+.

Authenticate

  1. Create a GitHub personal access token:

    • Fine-grained (recommended): https://github.com/settings/personal-access-tokens/new
    • Classic (legacy): https://github.com/settings/tokens/new
  2. Set the token:

    export GITHUB_TOKEN="ghp_..."   # macOS / Linux / Git Bash
    # or PowerShell: $env:GITHUB_TOKEN = "ghp_..."
    

    See docs/AUTH.md for Windows and per-client config.

Configure your client

Claude Code

claude mcp add --transport stdio github -- github-mcp

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "github": {
      "command": "github-mcp",
      "env": {
        "GITHUB_TOKEN": "ghp_..."
      }
    }
  }
}

Cline / Windsurf

See your client's docs for adding a stdio MCP server. Command: github-mcp. Env: GITHUB_TOKEN.

Example prompts

"List the 5 most recent open issues in cli/cli labeled bug."

"Get issue #1234 in cli/cli and summarize the discussion."

"Create a new issue in my-org/my-repo titled Bug: login fails on Safari with body Steps to reproduce: ...."

"Show me the contents of src/main.py in cli/cli on the main branch."

"Search GitHub for function authenticate in cli/cli."

Development

git clone https://github.com/AbdeeBuilds/github-mcp
cd github-mcp
python -m venv .venv
source .venv/Scripts/activate   # Git Bash on Windows
pip install -e ".[dev]"
pytest                          # mock-based suite
GITHUB_TOKEN=*** pytest tests/test_live.py -v   # live integration

Quality gates (run on every PR):

ruff check src tests
ruff format --check src tests
mypy src

License

MIT โ€” see LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured