Skip to main content
Glama
damijanc

GitHub MCP Server

by damijanc

GitHub MCP Server

FastMCP server for GitHub pull requests, code, and reviews.

Features

  • Repository/account helpers: authenticated user, repository metadata, branches, branch creation, ref comparison.

  • Pull requests: list, get, create, update, merge, changed files, commits, raw diff.

  • Code: read files, list directories, search code, create/update text files, delete files.

  • Reviews: list reviews, list review comments, list conversation comments, add conversation comments, create/submit/dismiss reviews, add file-level review comments, request reviewers.

Related MCP server: mcp-server-github

Create .env file

GITHUB_TOKEN=github_pat_or_personal_access_token_here
GITHUB_OWNER=owner-or-org
GITHUB_REPO=repo-name

# Optional
GITHUB_API_URL=https://api.github.com
GITHUB_API_VERSION=2022-11-28

GITHUB_OWNER and GITHUB_REPO are optional if every tool call passes owner and repo.

For fine-grained GitHub tokens, grant only the permissions you need. Common permissions:

  • Pull requests: read/write

  • Contents: read/write

  • Metadata: read

  • Issues: read/write, for pull request conversation comments

Create a virtual environment

cd PROJECT_FOLDER
python3 -m venv .venv

Activate it

source .venv/bin/activate

Install dependencies

pip install fastmcp requests python-dotenv

Freeze the requirements

pip freeze > requirements.txt

Test it

python3 server.py

You should see:

Starting MCP server 'github-mcp-server' with transport 'stdio'

Configure OpenCode

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "github": {
      "type": "local",
      "command": [
        "PATH_TO_YOUR_MCP_PROJECT/.venv/bin/python",
        "PATH_TO_YOUR_MCP_PROJECT/server.py"
      ],
      "enabled": true
    }
  }
}

Docker / HTTP mode

docker compose up --build

HTTP mode listens on port 8002.

Useful Next Features

  • Issues and labels: create issues, triage labels, milestone assignment, linked PR discovery.

  • Checks and CI: list check suites/runs, rerun failed checks, summarize failing annotations.

  • Actions workflows: list workflow runs, trigger workflow_dispatch, download artifacts.

  • Releases and tags: draft releases, generate changelog notes, compare release refs.

  • Branch protection: inspect required checks, review rules, and merge restrictions.

  • Security: Dependabot alerts, secret scanning alerts, code scanning alerts, SARIF summaries.

  • Repository admin: collaborators, teams, permissions, rulesets, webhooks.

  • Notifications: list assigned/review-requested items across repositories.

  • Project planning: GitHub Projects items, statuses, and field updates.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.

  • Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/damijanc/github-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server