GitHub MCP Server

GitHub MCP Server

Enables interacting with GitHub repositories for pull requests, code, and reviews through natural language.

Category
Visit Server

README

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.

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.

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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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