Skip to main content

MCP server for GitHub operations — manage repos, issues, pull requests, commits, gists, and more.

Project description

GitHub MCP Server

A production-ready Model Context Protocol (MCP) server for GitHub operations. Connect any AI agent to GitHub — manage repos, issues, pull requests, commits, gists, search code, and look up user profiles.

This is an independent, generalized MCP server. It is not tied to any specific project and can be connected to any AI agent that supports MCP (Claude Desktop, Cursor, WorkOS, or custom agents).

Features

  • 📦 Repositories: List, search, and get repo details
  • 🐛 Issues: Create, read, update, search issues
  • 🔀 Pull Requests: List, create, and inspect PRs
  • 📝 Commits: Browse commit history
  • 🔍 Search: Search code and issues across GitHub
  • 👤 Users: Look up user profiles
  • 📋 Gists: List and create gists

Installation

Recommended — no pre-install required (uses uv):

# uv manages a temporary isolated environment automatically
uvx --from workos-github-mcp-server github-mcp-server

Or install permanently with pip:

pip install workos-github-mcp-server

Or install from source:

git clone https://github.com/workos/workos-github-mcp-server
cd workos-github-mcp-server
pip install -e .

Quick Start

export GITHUB_TOKEN="ghp_your-personal-access-token"

# Recommended: run via uvx (no install needed)
uvx --from workos-github-mcp-server github-mcp-server

# Or if installed via pip
github-mcp-server

# Or run as a Python module
python -m github_mcp_server

Configuration

Environment Variables

Variable Required Description
GITHUB_TOKEN ✅ Yes GitHub Personal Access Token (ghp_... or github_pat_...)

Getting a GitHub Token

  1. Go to github.com/settings/tokens
  2. Click "Generate new token (classic)" or "Fine-grained tokens"
  3. Select scopes:
    • repo — full repository access (issues, PRs, commits)
    • gist — create and list gists
    • read:user — read user profiles
  4. Copy the generated token

Connecting to AI Agents

Note: Use uvx --from workos-github-mcp-server github-mcp-server in all configs below. The --from flag is needed because the PyPI package name (workos-github-mcp-server) differs from the CLI entry point (github-mcp-server). You must have uv installed (brew install uv on macOS).

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "github": {
      "command": "uvx",
      "args": ["--from", "workos-github-mcp-server", "github-mcp-server"],
      "env": {
        "GITHUB_TOKEN": "ghp_your-token"
      }
    }
  }
}

Alternative — if you have installed via pip install workos-github-mcp-server and prefer not to use uvx, use the full absolute path to the binary instead:

{ "command": "/path/to/your/bin/github-mcp-server" }

Find the path with: which github-mcp-server

Cursor

Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "github": {
      "command": "uvx",
      "args": ["--from", "workos-github-mcp-server", "github-mcp-server"],
      "env": {
        "GITHUB_TOKEN": "ghp_your-token"
      }
    }
  }
}

VS Code (GitHub Copilot / MCP extension)

Edit .vscode/mcp.json in your project:

{
  "servers": {
    "github": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "workos-github-mcp-server", "github-mcp-server"],
      "env": {
        "GITHUB_TOKEN": "${input:githubToken}"
      }
    }
  },
  "inputs": [
    {
      "id": "githubToken",
      "type": "promptString",
      "description": "GitHub Personal Access Token (ghp_... or github_pat_...)",
      "password": true
    }
  ]
}

WorkOS / Custom Agents

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "github": {
      "transport": "stdio",
      "command": "uvx",
      "args": ["--from", "workos-github-mcp-server", "github-mcp-server"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Available Tools (15)

Tool Description
github_list_repos List repositories for a user or the authenticated user
github_get_repo Get detailed repository information
github_search_repos Search repositories across GitHub
github_list_issues List issues in a repository
github_create_issue Create a new issue
github_get_issue Get issue details
github_update_issue Update an existing issue
github_search_issues Search issues and PRs across GitHub
github_list_pull_requests List pull requests in a repository
github_get_pull_request Get pull request details
github_create_pull_request Create a new pull request
github_list_commits List recent commits
github_list_gists List gists for the authenticated user
github_create_gist Create a new gist
github_get_user Get user profile information

Development

git clone https://github.com/workos/workos-github-mcp-server
cd workos-github-mcp-server
pip install -e .

# Run tests
pytest

# Run the server locally
GITHUB_TOKEN=ghp_test python -m github_mcp_server

Publishing

To PyPI

pip install build twine
rm -rf dist/ build/ src/*.egg-info
python -m build
pip install "packaging>=24.2"   # required for Metadata 2.4 support in twine
twine check dist/*              # validate before uploading
twine upload dist/*

To MCP Registry

mcp-publisher login github
mcp-publisher publish

License

MIT — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

workos_github_mcp_server-1.0.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

workos_github_mcp_server-1.0.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file workos_github_mcp_server-1.0.1.tar.gz.

File metadata

  • Download URL: workos_github_mcp_server-1.0.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for workos_github_mcp_server-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8fa67124a4d3b53376d35387a306e62d8663e26c5934f018a5c5219a826518ed
MD5 91aa42b3cdc557b804846b95da61f642
BLAKE2b-256 25b8bffd9cb06ca674979a15162bd9d2e44bfb1a3cfc97dd38d58eac265e543b

See more details on using hashes here.

File details

Details for the file workos_github_mcp_server-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for workos_github_mcp_server-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 783d33f6e0e389664493792fc488ddd0d0340a15a5ed45c1d03846a48cb8ae14
MD5 d2a740682f173cd82bbfffe83ffa2e24
BLAKE2b-256 08cbe2bf2b0aea61f8fb8d7d4447a4a81f4b82148819e435257fe6ae698ef603

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page