nhevers

mcp-github

Community nhevers
Updated

MCP server for GitHub operations

mcp-github

MCP server for GitHub operations. Provides tools for repository management, issues, pull requests and code search.

Installation

pip install -r requirements.txt

Quick Start

from mcpgithub import GitHubServer

server = GitHubServer(token="ghp_...")
server.run()

Features

  • Repository listing and management
  • Issue and PR operations
  • Code and repository search
  • File read and write operations
  • Branch management

MCP Tools

list_repos

List repositories for a user or organization.

{
  "name": "list_repos",
  "arguments": {
    "owner": "username",
    "type": "all"
  }
}

get_file

Get contents of a file from a repository.

{
  "name": "get_file",
  "arguments": {
    "owner": "username",
    "repo": "repo-name",
    "path": "src/main.py"
  }
}

create_issue

Create a new issue.

{
  "name": "create_issue",
  "arguments": {
    "owner": "username",
    "repo": "repo-name",
    "title": "Bug report",
    "body": "Description..."
  }
}

search_code

Search for code across repositories.

{
  "name": "search_code",
  "arguments": {
    "query": "function authenticate",
    "language": "python"
  }
}

create_pr

Create a pull request.

{
  "name": "create_pr",
  "arguments": {
    "owner": "username",
    "repo": "repo-name",
    "title": "Add feature",
    "head": "feature-branch",
    "base": "main"
  }
}

Configuration

server = GitHubServer(
    token="ghp_...",
    default_owner="myorg"
)

Environment variables:

GITHUB_TOKEN=ghp_...
GITHUB_DEFAULT_OWNER=myorg

Examples

Claude Desktop configuration

{
  "mcpServers": {
    "github": {
      "command": "python",
      "args": ["-m", "mcpgithub"],
      "env": {
        "GITHUB_TOKEN": "ghp_..."
      }
    }
  }
}

License

MIT

MCP Server · Populars

MCP Server · New

    qcri

    🦡 codebadger

    🦡 codebadger is a containerized Model Context Protocol (MCP) server that gives AI agents and LLMs deep, queryable access to a codebase's structure and data flow through Joern Code Property Graphs (CPGs).

    Community qcri
    boringSQL

    DryRun PostgreSQL MCP

    PostgreSQL schema intelligence MCP server with offline linting, migration safety, query validation for AI coding assistants.

    Community boringSQL
    emerzon

    mtdata

    A MetaTrader 5 research toolkit with 90+ AI tools for forecasting, regime detection, pattern recognition, and live trading.

    Community emerzon
    OpenImageDebugger

    Open Image Debugger: Enabling visualization of in-memory buffers on GDB/LLDB

    An advanced in-memory image visualization plugin for GDB and LLDB on Linux, with experimental support for MacOS and Windows. Previously known as gdb-imagewatch. Also available as an extension for VSCode and forks

    Community OpenImageDebugger
    HQBase

    HQBase

    Your team's email workspace. In your Cloudflare account.

    Community HQBase