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
- Go to github.com/settings/tokens
- Click "Generate new token (classic)" or "Fine-grained tokens"
- Select scopes:
repo— full repository access (issues, PRs, commits)gist— create and list gistsread:user— read user profiles
- Copy the generated token
Connecting to AI Agents
Note: Use
uvx --from workos-github-mcp-server github-mcp-serverin all configs below. The--fromflag 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 uvon 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-serverand 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.
Release files for workos-github-mcp-server 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| workos_github_mcp_server-1.0.1.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| workos_github_mcp_server-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.9 kB
Release files / workos_github_mcp_server-1.0.1.tar.gz
| Download URL | workos_github_mcp_server-1.0.1.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fa67124a4d3b53376d35387a306e62d8663e26c5934f018a5c5219a826518ed
|
|
BLAKE2b-256 checksum How to use checksums |
25b8bffd9cb06ca674979a15162bd9d2e44bfb1a3cfc97dd38d58eac265e543b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / workos_github_mcp_server-1.0.1-py3-none-any.whl
| Download URL | workos_github_mcp_server-1.0.1-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
783d33f6e0e389664493792fc488ddd0d0340a15a5ed45c1d03846a48cb8ae14
|
|
BLAKE2b-256 checksum How to use checksums |
08cbe2bf2b0aea61f8fb8d7d4447a4a81f4b82148819e435257fe6ae698ef603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|