Skip to main content
Glama
asifumar

github-repo-assistant

by asifumar
README.md
# github-repo-assistant

An MCP server that lets any MCP client (Claude Desktop, Claude Code, etc.)
inspect and interact with GitHub pull requests and issues via natural
language, using the GitHub REST API.

## Tools

- `list_open_prs(repo)` - list open pull requests
- `get_pr_diff(repo, pr_number)` - file-by-file diff for a PR
- `list_failing_checks(repo, pr_number)` - failing CI checks on a PR's latest commit
- `list_open_issues(repo)` - list open issues
- `post_review_comment(repo, pr_number, body, confirm)` - post a PR comment (guarded, see below)

`repo` is always in `"owner/repo"` form.

## Write-action safety

`post_review_comment` is the only tool that changes anything on GitHub, and
it's gated two ways:

1. **Environment flag** - refuses outright unless `ALLOW_WRITES=true` is set.
2. **Confirm step** - the first call (`confirm=False`, the default) only
   returns a preview of what would be posted; nothing is sent until you call
   it again with `confirm=True`.

## Setup

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# edit .env: set GITHUB_TOKEN to a fine-grained PAT scoped to the repos you want
```

## Run

```bash
python server.py
```

Point an MCP client at this file via stdio transport (same pattern as any
other local MCP server).

## Status

Scaffolded - tools are implemented but not yet tested against a live repo.