mcp-github-agent
v0.2.0MCP server giving AI agents controlled GitHub access with policy guard and audit trail
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_code Search Code
Search for code in GitHub repositories.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
repo |
list_issues List Issues
List issues in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
repo * | string | |
state | string |
get_pr_diff Get Pr Diff
Get the diff for a pull request.
| Parameter | Type | Description |
|---|---|---|
pr_number * | integer | |
repo * | string |
review_pr_diff Review Pr Diff
Review a PR diff using ruff + legacy regex rules. Returns structured findings.
| Parameter | Type | Description |
|---|---|---|
pr_number * | integer | |
repo * | string |
comment_pr_review Comment Pr Review
Fetch PR diff, run code review, and post findings as review comments.
| Parameter | Type | Description |
|---|---|---|
pr_number * | integer | |
repo * | string |
get_file_contents Get File Contents
Read a file from a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path (e.g. 'src/main.py'). |
repo * | string | Repository in 'owner/repo' format. |
ref | string | Branch, tag, or commit SHA (default: default branch). |
create_issue Create Issue
Create a new issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
body * | string | Issue body text. |
repo * | string | Repository in 'owner/repo' format. |
title * | string | Issue title. |
dry_run | boolean | If True, preview the operation without executing. |
create_pr Create Pr
Create a new pull request.
| Parameter | Type | Description |
|---|---|---|
base * | string | Target branch name (e.g. 'main'). |
body * | string | PR description. |
head * | string | Source branch name. |
repo * | string | Repository in 'owner/repo' format. |
title * | string | PR title. |
dry_run | boolean | If True, preview the operation without executing. |
create_or_update_file Create Or Update File
Create or update a single file in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
content * | string | New file content. |
path * | string | File path to create/update. |
repo * | string | Repository in 'owner/repo' format. |
branch | string | Branch to commit to (default: repo default branch). |
dry_run | boolean | If True, preview the operation without executing. |
message | string | Commit message (default: auto-generated). |
sha | string | Blob SHA of file being replaced (required for updates). |
push_files Push Files
Push multiple files as a single commit.
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch name to commit to. |
files_json * | string | JSON string of [{"path": "...", "content": "..."}, ...]. |
message * | string | Commit message. |
repo * | string | Repository in 'owner/repo' format. |
dry_run | boolean | If True, preview without executing. |
add_issue_comment Add Issue Comment
Add a comment to a GitHub issue or pull request.
| Parameter | Type | Description |
|---|---|---|
body * | string | Comment text (markdown supported). |
issue_number * | integer | Issue or PR number. |
repo * | string | Repository in 'owner/repo' format. |
dry_run | boolean | If True, preview without executing. |
merge_pull_request Merge Pull Request
Merge a pull request.
| Parameter | Type | Description |
|---|---|---|
pr_number * | integer | Pull request number. |
repo * | string | Repository in 'owner/repo' format. |
commit_title | string | Custom merge commit title. |
dry_run | boolean | If True, preview without executing. |
merge_method | string | 'merge', 'squash', or 'rebase' (default: 'merge'). |