github-mcp

github-mcp

Self-hosted GitHub MCP server for PR, repo file, and Dependabot operations, supporting multiple MCP clients with personal access token auth.

Category
Visit Server

README

github-mcp

Self-hosted GitHub MCP server. Personal-access-token auth, stdio transport, transport-agnostic so it works with Claude Code (any account), Codex CLI, Cursor, or any MCP-compliant client. No claude.ai OAuth dependency.

Written in Python on top of FastMCP. Slots into the same install pattern as other community Python MCP servers.

Why this exists

The official github/github-mcp-server (Go, 60+ tools) is excellent if you want a kitchen-sink server tied to a single agent platform's auth flow. This one is scoped for operators who:

  • Switch between multiple Claude accounts, Codex CLI, Cursor, or other MCP clients and want the same GitHub auth across all of them.
  • Prefer a small, audited tool surface scoped to PR + repo file + Dependabot operations.
  • Want a Python install that lives alongside their other MCP servers.

If neither applies, run github/github-mcp-server instead — that's the right call.

Tool surface (v0.1.0)

Tool Purpose
health_check Verify the PAT is valid + report rate-limit headroom. First call when wiring up.
list_prs List pull requests with state filter.
get_pr Single PR with check-run status + mergeable state.
merge_pr Squash/merge/rebase with optional branch delete.
list_dependabot_alerts Alert sweep with severity-grouped counts.
get_file Read a file via the Contents API.
put_file Create or update a file via the Contents API (idempotent with SHA).

Future versions expand: workflows, releases, issues, rulesets, secret-scan alerts, branch protection, repo settings.

Install

Open Claude Code, paste:

/plugin marketplace add adelaidasofia/github-mcp
/plugin install github-mcp@github-mcp

<details><summary>Legacy install</summary>

git clone https://github.com/adelaidasofia/github-mcp ~/.claude/github-mcp
cd ~/.claude/github-mcp
uv tool install --editable .

Or as a one-off without persistent install:

cd ~/.claude/github-mcp
uv run github-mcp

</details>

Auth

The server reads the GitHub PAT from environment, in this precedence:

  1. GITHUB_TOKEN
  2. GH_TOKEN

Fine-grained tokens recommended.

Scope matrix

Permission Access Unlocks
Metadata Read Baseline (auto-required when any other repo permission is set)
Contents Read and write get_file, put_file
Pull requests Read and write list_prs, get_pr, merge_pr
Dependabot alerts Read list_dependabot_alerts
Administration Read and write Future: rulesets, branch protection, allow_auto_merge toggle
Workflows Read and write Future: read/update .github/workflows/*.yml
Actions Read and write Future: trigger and inspect workflow runs
Secret scanning alerts Read Future: fleet-wide secret-scan sweep
Code scanning alerts Read Future: CodeQL fleet sweep

v0.1 floor: Metadata + Contents (R/W) + Pull requests (R/W) + Dependabot alerts (R) is enough to use every tool in this release.

Future-proof: granting the full table now means new MCP tools can ship without rotating the PAT. Equivalent to checking "all repository permissions" in the fine-grained PAT UI. Trade-off: broader blast radius if the token leaks. Reasonable for a personal-dev token on an encrypted laptop with FileVault; reconsider for shared or production deployments.

The MCP introspects scopes via health_check — call it after wiring up to confirm what your token actually has.

Optional: GITHUB_API_BASE for GitHub Enterprise Server. Defaults to https://api.github.com.

Wire into an MCP client

Claude Code

Add to ~/.claude/.mcp.json (or any .mcp.json in the project root):

{
  "mcpServers": {
    "github": {
      "command": "uv",
      "args": ["run", "--project", "/Users/<you>/.claude/github-mcp", "github-mcp"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.github]
command = "uv"
args = ["run", "--project", "/Users/<you>/.claude/github-mcp", "github-mcp"]

[mcp_servers.github.env]
GITHUB_TOKEN = "${GITHUB_TOKEN}"

Cursor

~/.cursor/mcp.json follows the Claude Code shape. Same env block.

Any other MCP-compliant client

Configure it to spawn the github-mcp command and pipe stdio. The server speaks standard MCP over stdio.

Verify

GITHUB_TOKEN=ghp_yourpat uv run github-mcp

The server will wait on stdin for MCP traffic. In another shell, exercise health_check via your client.

Test

uv pip install -e ".[dev]"
uv run pytest tests/ -v

Telemetry

This plugin sends a single anonymous install signal to myceliumai.co the first time it loads in a Claude Code session on a given machine.

What is sent:

  • Plugin name (e.g. slack-mcp)
  • Plugin version (e.g. 0.1.0)

What is NOT sent:

  • No user identifiers, names, emails, tokens, or API keys
  • No file paths, message content, or anything from your work
  • No IP address is stored after dedup processing

Why: Helps the maintainer know which plugins people actually install, so attention goes to the ones that get used.

Opt out: Set the environment variable MYCELIUM_NO_PING=1 before launching Claude Code. The hook will skip the network call entirely. Already-pinged installs leave a sentinel at ~/.mycelium/onboarded-<plugin> — delete it if you want to reset state.

License

MIT.

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

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