mcp-github-agent

v0.2.0
mcp-github-agent Checked 1 day ago Published 5 months ago

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

ParameterTypeDescription
query *string
repo

list_issues List Issues

List issues in a GitHub repository.

ParameterTypeDescription
repo *string
statestring

get_pr_diff Get Pr Diff

Get the diff for a pull request.

ParameterTypeDescription
pr_number *integer
repo *string

review_pr_diff Review Pr Diff

Review a PR diff using ruff + legacy regex rules. Returns structured findings.

ParameterTypeDescription
pr_number *integer
repo *string

comment_pr_review Comment Pr Review

Fetch PR diff, run code review, and post findings as review comments.

ParameterTypeDescription
pr_number *integer
repo *string

get_file_contents Get File Contents

Read a file from a GitHub repository.

ParameterTypeDescription
path *stringFile path (e.g. 'src/main.py').
repo *stringRepository in 'owner/repo' format.
refstringBranch, tag, or commit SHA (default: default branch).

create_issue Create Issue

Create a new issue in a GitHub repository.

ParameterTypeDescription
body *stringIssue body text.
repo *stringRepository in 'owner/repo' format.
title *stringIssue title.
dry_runbooleanIf True, preview the operation without executing.

create_pr Create Pr

Create a new pull request.

ParameterTypeDescription
base *stringTarget branch name (e.g. 'main').
body *stringPR description.
head *stringSource branch name.
repo *stringRepository in 'owner/repo' format.
title *stringPR title.
dry_runbooleanIf True, preview the operation without executing.

create_or_update_file Create Or Update File

Create or update a single file in a GitHub repository.

ParameterTypeDescription
content *stringNew file content.
path *stringFile path to create/update.
repo *stringRepository in 'owner/repo' format.
branchstringBranch to commit to (default: repo default branch).
dry_runbooleanIf True, preview the operation without executing.
messagestringCommit message (default: auto-generated).
shastringBlob SHA of file being replaced (required for updates).

push_files Push Files

Push multiple files as a single commit.

ParameterTypeDescription
branch *stringBranch name to commit to.
files_json *stringJSON string of [{"path": "...", "content": "..."}, ...].
message *stringCommit message.
repo *stringRepository in 'owner/repo' format.
dry_runbooleanIf True, preview without executing.

add_issue_comment Add Issue Comment

Add a comment to a GitHub issue or pull request.

ParameterTypeDescription
body *stringComment text (markdown supported).
issue_number *integerIssue or PR number.
repo *stringRepository in 'owner/repo' format.
dry_runbooleanIf True, preview without executing.

merge_pull_request Merge Pull Request

Merge a pull request.

ParameterTypeDescription
pr_number *integerPull request number.
repo *stringRepository in 'owner/repo' format.
commit_titlestringCustom merge commit title.
dry_runbooleanIf True, preview without executing.
merge_methodstring'merge', 'squash', or 'rebase' (default: 'merge').