Your entire GitHub workflow, accessible through AI.
A Model Context Protocol (MCP) server that exposes GitHub's API for repository management, code search, issue tracking, pull request workflows, and release management.
The GitHub MCP Server provides comprehensive access to GitHub operations:
Perfect for:
Returns basic information about a GitHub repository.
Inputs:
- `owner` (string, required) — Repository owner (user or organization)
- `repo` (string, required) — Repository nameoutput:
{
"name": "my-repo",
"full_name": "owner/my-repo",
"description": "...",
"default_branch": "main",
"stargazers_count": 42,
...
}Returns a paginated list of branches in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `page` (int, optional) — Page number (default: 1)
- `per_page` (int, optional) — Results per page (max: 100, default: 30)output:
{
"branches": [{ "name": "main", "commit"
Creates a new repository under the authenticated user or an organization.
Inputs:
- `name` (string, required) — Repository name
- `description` (string, optional) — Repository description
- `private` (bool, optional) — Make the repository private (default: false)
- `org` (string, optional) — Organization to create the repo under (omit for personal)
- `auto_init` (bool, optional) — Initialize with a README (default: false)output:
{
"full_name": "owner/new-repo",
Forks a repository to the authenticated user's account or an organization.
Inputs:
- `owner` (string, required) — Owner of the repository to fork
- `repo` (string, required) — Repository to fork
- `org` (string, optional) — Organization to fork into (omit for personal account)output:
{
"full_name": "your-username/forked-repo",
"html_url": "https://github.com/your-username/forked-repo",
...
}Creates a new branch in a repository from a specified commit SHA.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `branch` (string, required) — Name of the new branch
- `sha` (string, required) — Commit SHA to branch fromoutput:
{
"ref": "refs/heads/new-branch",
"object": { "sha": "abc123" }
}Returns the contents of a file or directory from a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `path` (string, required) — File or directory path
- `branch` (string, optional) — Branch, tag, or commit SHA (default: default branch)output:
{
"type": "file",
"name": "README.md",
"content": "base64-encoded-content"
Creates a new file or updates an existing file in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `path` (string, required) — Path to the file
- `content` (string, required) — File content (base64 encoded)
- `message` (string, required) — Commit message
- `branch` (string, optional) — Branch to commit to
- `sha` (string, optional) — SHA of file being replaced (required for updates)output:
{
"commit": {
Atomically pushes multiple files to a repository branch in a single commit.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `branch` (string, required) — Branch to push to
- `files` (list, required) — List of file objects with path and content
- `message` (string, required) — Commit messageoutput:
{
"sha": "new-commit-sha",
"message": "Commit message"
}Returns a paginated list of commits with optional filtering.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `sha` (string, optional) — Branch or commit SHA to start from
- `path` (string, optional) — Filter commits by file path
- `author` (string, optional) — Filter by author username or email
- `since` (string, optional) — ISO 8601 datetime; only commits after this date
- `until` (string, optional) — ISO 8601 datetime; only commits before this date
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)Returns details of a single commit including the diff.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `sha` (string, required) — Commit SHAoutput:
{
"sha": "abc123",
"commit": { "message": "...", "author": {...} },
"files"
Searches GitHub repositories using query syntax with optional sorting.
Inputs:
- `query` (string, required) — Search query (supports GitHub search syntax)
- `sort` (string, optional) — Sort by: stars, forks, updated, or help-wanted-issues
- `order` (string, optional) — Sort direction: asc or desc
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"total_count": 1200,
"items": [{
Searches code using GitHub's code search syntax.
Inputs:
- `query` (string, required) — Code search query (supports GitHub code search syntax)
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"total_count": 45,
"items": [{ "name": "file.py", "repository": { "full_name"
Searches GitHub users by name, location, followers, or other criteria.
Inputs:
- `query` (string, required) — User search query
- `sort` (string, optional) — Sort by: followers, repositories, or joined
- `order` (string, optional) — Sort direction: asc or desc
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"total_count": 12,
"items": [{ "login"
Searches issues (and PRs) across GitHub using search syntax.
Inputs:
- `query` (string, required) — Issue search query (supports GitHub issue search syntax)
- `sort` (string, optional) — Sort by: comments, reactions, created, updated
- `order` (string, optional) — Sort direction: asc or desc
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"total_count": 8,
"items": [{
Searches pull requests across GitHub using search syntax.
Inputs:
- `query` (string, required) — PR search query (supports GitHub search syntax)
- `sort` (string, optional) — Sort by: comments, reactions, created, updated
- `order` (string, optional) — Sort direction: asc or desc
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"total_count": 3,
"items": [{
Returns issues in a repository with optional state and label filtering.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `state` (string, optional) — Issue state: open, closed, or all (default: open)
- `labels` (string, optional) — Comma-separated label names to filter by
- `assignee` (string, optional) — Filter by assignee username
- `milestone` (string, optional) — Filter by milestone number or title
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
Returns full details of a single issue.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `issue_number` (int, required) — Issue numberoutput:
{
"number": 42,
"title": "Bug report",
"body": "...",
"state": "open",
Returns paginated comments for an issue or pull request.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `issue_number` (int, required) — Issue number
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"comments": [{ "id": 1, "user": { "login"
Creates a new issue in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `title` (string, required) — Issue title
- `body` (string, optional) — Issue description (Markdown supported)
- `assignees` (list, optional) — List of usernames to assign
- `labels` (list, optional) — List of label names to apply
- `milestone` (int, optional) — Milestone number to associateoutput:
{
"number": 43,
Adds a comment to an issue or pull request.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `issue_number` (int, required) — Issue or PR number
- `body` (string, required) — Comment text (Markdown supported)output:
{
"id": 101,
"body": "Your comment here",
"user": { "login":
Updates the title, body, state, assignees, labels, or milestone of an issue.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `issue_number` (int, required) — Issue number
- `title` (string, optional) — New title
- `body` (string, optional) — New body
- `state` (string, optional) — New state: open or closed
- `assignees` (list, optional) — Replacement list of assignees
- `labels` (list, optional) — Replacement list of labels
- `milestone` (int, optional) — Milestone number (or null to unset)output:
Adds, removes, or reprioritizes sub-issues within a parent issue.
Inputs:
- `operation` (string, required) — Operation: add, remove, or reprioritize
- `parent_issue_id` (int, required) — Node ID of the parent issue
- `sub_issue_id` (int, optional) — Node ID of the sub-issue (for add/remove)
- `after_id` (int, optional) — Sub-issue ID to insert after (for reprioritize)output:
{
"success": true,
"parent_issue": { "number": 10,
Returns pull requests in a repository with optional filtering.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `state` (string, optional) — PR state: open, closed, or all (default: open)
- `head` (string, optional) — Filter by head branch (format: user:branch)
- `base` (string, optional) — Filter by base branch
- `sort` (string, optional) — Sort by: created, updated, popularity, long-running
- `direction` (string, optional) — Sort direction: asc or desc
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
Retrieves PR details, changed files, status checks, comments, or reviews depending on the operation.
Inputs:
- `operation` (string, required) — What to retrieve: details, files, status, comments, or reviews
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `pull_number` (int, required) — Pull request numberoutput:
{
"number": 15,
"title": "Add feature",
"state": "open"
Creates a new pull request from a head branch into a base branch.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `title` (string, required) — PR title
- `head` (string, required) — Branch with changes (format: username:branch or just branch)
- `base` (string, required) — Branch to merge into
- `body` (string, optional) — PR description (Markdown supported)
- `draft` (bool, optional) — Create as draft PR (default: false)
- `maintainer_can_modify` (bool, optional) — Allow maintainers to push to head branchoutput:
Updates the title, body, state, or base branch of a pull request.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `pull_number` (int, required) — Pull request number
- `title` (string, optional) — New title
- `body` (string, optional) — New description
- `state` (string, optional) — New state: open or closed
- `base` (string, optional) — New base branchoutput:
{
"number": 16,
"title"
Merges a pull request using the specified merge method.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `pull_number` (int, required) — Pull request number
- `commit_title` (string, optional) — Title for the merge commit
- `commit_message` (string, optional) — Message for the merge commit
- `merge_method` (string, optional) — Merge method: merge, squash, or rebase (default: merge)output:
{
"merged": true,
"message"
Updates a pull request branch with the latest changes from the base branch.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `pull_number` (int, required) — Pull request numberoutput:
{
"message": "Updating pull request branch.",
"url": "..."
}Creates, submits, deletes reviews, or resolves review threads on a pull request.
Inputs:
- `operation` (string, required) — Operation: create, submit, delete, or resolve_thread
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `pull_number` (int, required) — Pull request number
- `review_id` (int, optional) — Review ID (required for submit/delete)
- `body` (string, optional) — Review comment body
- `event` (string, optional) — Review event: APPROVE, REQUEST_CHANGES, or COMMENT
- `thread_id` (string, optional) — Thread ID to resolveoutput:
Adds a reply to an existing review comment on a pull request.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `pull_number` (int, required) — Pull request number
- `comment_id` (int, required) — ID of the comment to reply to
- `body` (string, required) — Reply text (Markdown supported)output:
{
"id": 202,
"body": "Reply text",
"user"
Returns a paginated list of tags in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"tags": [{ "name": "v1.0.0", "commit": { "sha": "abc123" } },
Returns details about a specific tag in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `tag` (string, required) — Tag nameoutput:
{
"name": "v1.0.0",
"commit": { "sha": "abc123" },
...
}Returns a list of releases published in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `page` (int, optional) — Page number
- `per_page` (int, optional) — Results per page (max: 100)output:
{
"releases": [{ "tag_name": "v1.0.0", "name": "First release", "body":
Returns the release associated with a specific tag.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `tag` (string, required) — Tag name of the releaseoutput:
{
"tag_name": "v1.2.0",
"name": "Release v1.2.0",
"body": "Release notes...",
...
}Returns the most recent non-prerelease, non-draft release in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository nameoutput:
{
"tag_name": "v2.0.0",
"name": "Latest stable",
"published_at": "2024-01-01T00:00:00Z",
...
}Returns information about the currently authenticated GitHub user.
Inputs:
noneoutput:
{
"login": "your-username",
"name": "Your Name",
"email": "you@example.com",
...
}Returns details about a specific label in a repository.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `name` (string, required) — Label nameoutput:
{
"name": "bug",
"color": "d73a4a",
"description": "Something isn't working"
}Lists repositories within an organization where a specific user has contributed.
Inputs:
- `org` (string, required) — Organization name
- `username` (string, required) — GitHub username to search for contributionsoutput:
{
"repositories": [{ "name": "repo-name", "full_name": "org/repo-name", ... }]
}Assigns GitHub Copilot as an assignee to work on an issue, with optional custom instructions.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `issue_number` (int, required) — Issue number
- `instructions` (string, optional) — Custom instructions for Copilotoutput:
{
"success": true,
"issue_number": 42,
"assignee": "copilot"
Requests GitHub Copilot to review a pull request.
Inputs:
- `owner` (string, required) — Repository owner
- `repo` (string, required) — Repository name
- `pull_number` (int, required) — Pull request numberoutput:
{
"success": true,
"pull_number": 16,
"reviewer": "copilot"
}Most list endpoints support pagination:
page — Page number (starting from 1)per_page — Results per page (default: 30, max: 100)Search tools support GitHub's full query syntax:
language:python stars:>1000 — Repos with Python, 1000+ stars
repo:owner/repo is:open label:bug — Open bug issues in a specific repo
author:username created:>2024-01-01 — Commits by author after datefull syntax reference: GitHub Search Documentation
All datetime parameters use ISO 8601 format:
format: YYYY-MM-DDTHH:MM:SSZ
Example: 2024-01-15T10:30:00ZAuthorization: Bearer YOUR_TOKEN and X-Mewcp-Credential-Id: CREDENTIAL-ID headers are presentX-Mewcp-Credential-Id header{server-name}/mcp/{tool-name}repo, read:org){
"commits": [{ "sha": "abc123", "commit": { "message": "..." }, "author": {...} }, ...]
}{
"number": 42,
"state": "closed",
"title": "Updated title",
...
}{
"pull_requests": [{ "number": 15, "title": "Feature", "state": "open", ... }]
}