---
name: GitHub MCP
version: 1.0.0
description: "GitHub integration for AI agents - manage issues, PRs, repos, and more"
homepage: https://api.githubcopilot.com/mcp/
metadata: {"seren":{"category":"integration","publisher_slug":"mcp-github","api_base":"https://api.serendb.com"}}
---

# GitHub MCP

GitHub integration for AI agents - manage issues, PRs, repos, and more

## MCP Tools

**MCP Endpoint:** https://api.githubcopilot.com/mcp/

### Available Tools

#### `add_comment_to_pending_review`

Add review comment to the requester's latest pending pull request review. A pending review needs to already exist to call this (check with the user if not sure).

**Input Schema:**

```json
{
  "properties": {
    "body": {
      "description": "The text of the review comment",
      "type": "string"
    },
    "line": {
      "description": "The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range",
      "type": "number"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "path": {
      "description": "The relative path to the file that necessitates a comment",
      "type": "string"
    },
    "pullNumber": {
      "description": "Pull request number",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "side": {
      "description": "The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state",
      "enum": [
        "LEFT",
        "RIGHT"
      ],
      "type": "string"
    },
    "startLine": {
      "description": "For multi-line comments, the first line of the range that the comment applies to",
      "type": "number"
    },
    "startSide": {
      "description": "For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state",
      "enum": [
        "LEFT",
        "RIGHT"
      ],
      "type": "string"
    },
    "subjectType": {
      "description": "The level at which the comment is targeted",
      "enum": [
        "FILE",
        "LINE"
      ],
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "pullNumber",
    "path",
    "body",
    "subjectType"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/add_comment_to_pending_review \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `add_issue_comment`

Add a comment to a specific issue in a GitHub repository. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.

**Input Schema:**

```json
{
  "properties": {
    "body": {
      "description": "Comment content",
      "type": "string"
    },
    "issue_number": {
      "description": "Issue number to comment on",
      "type": "number"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "issue_number",
    "body"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/add_issue_comment \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `add_reply_to_pull_request_comment`

Add a reply to an existing pull request comment. This creates a new comment that is linked as a reply to the specified comment.

**Input Schema:**

```json
{
  "properties": {
    "body": {
      "description": "The text of the reply",
      "type": "string"
    },
    "commentId": {
      "description": "The ID of the comment to reply to",
      "type": "number"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "pullNumber": {
      "description": "Pull request number",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "pullNumber",
    "commentId",
    "body"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/add_reply_to_pull_request_comment \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `assign_copilot_to_issue`

Assign Copilot to a specific issue in a GitHub repository.

This tool can help with the following outcomes:
- a Pull Request created with source code changes to resolve the issue


More information can be found at:
- https://docs.github.com/en/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot


**Input Schema:**

```json
{
  "properties": {
    "base_ref": {
      "description": "Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch",
      "type": "string"
    },
    "custom_instructions": {
      "description": "Optional custom instructions to guide the agent beyond the issue body. Use this to provide additional context, constraints, or guidance that is not captured in the issue description",
      "type": "string"
    },
    "issue_number": {
      "description": "Issue number",
      "type": "number"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "issue_number"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/assign_copilot_to_issue \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `create_branch`

Create a new branch in a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "branch": {
      "description": "Name for new branch",
      "type": "string"
    },
    "from_branch": {
      "description": "Source branch (defaults to repo default)",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "branch"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/create_branch \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `create_or_update_file`

Create or update a single file in a GitHub repository. 
If updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.

In order to obtain the SHA of original file version before updating, use the following git command:
git ls-tree HEAD <path to file>

If the SHA is not provided, the tool will attempt to acquire it by fetching the current file contents from the repository, which may lead to rewriting latest committed changes if the file has changed since last retrieval.


**Input Schema:**

```json
{
  "properties": {
    "branch": {
      "description": "Branch to create/update the file in",
      "type": "string"
    },
    "content": {
      "description": "Content of the file",
      "type": "string"
    },
    "message": {
      "description": "Commit message",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner (username or organization)",
      "type": "string"
    },
    "path": {
      "description": "Path where to create/update the file",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "sha": {
      "description": "The blob SHA of the file being replaced.",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "path",
    "content",
    "message",
    "branch"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/create_or_update_file \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `create_pull_request`

Create a new pull request in a GitHub repository.

**Input Schema:**

```json
{
  "properties": {
    "base": {
      "description": "Branch to merge into",
      "type": "string"
    },
    "body": {
      "description": "PR description",
      "type": "string"
    },
    "draft": {
      "description": "Create as draft PR",
      "type": "boolean"
    },
    "head": {
      "description": "Branch containing changes",
      "type": "string"
    },
    "maintainer_can_modify": {
      "description": "Allow maintainer edits",
      "type": "boolean"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "title": {
      "description": "PR title",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "title",
    "head",
    "base"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/create_pull_request \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `create_repository`

Create a new GitHub repository in your account or specified organization

**Input Schema:**

```json
{
  "properties": {
    "autoInit": {
      "description": "Initialize with README",
      "type": "boolean"
    },
    "description": {
      "description": "Repository description",
      "type": "string"
    },
    "name": {
      "description": "Repository name",
      "type": "string"
    },
    "organization": {
      "description": "Organization to create the repository in (omit to create in your personal account)",
      "type": "string"
    },
    "private": {
      "description": "Whether repo should be private",
      "type": "boolean"
    }
  },
  "required": [
    "name"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/create_repository \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `delete_file`

Delete a file from a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "branch": {
      "description": "Branch to delete the file from",
      "type": "string"
    },
    "message": {
      "description": "Commit message",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner (username or organization)",
      "type": "string"
    },
    "path": {
      "description": "Path to the file to delete",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "path",
    "message",
    "branch"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/delete_file \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `fork_repository`

Fork a GitHub repository to your account or specified organization

**Input Schema:**

```json
{
  "properties": {
    "organization": {
      "description": "Organization to fork to",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/fork_repository \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_commit`

Get details for a commit from a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "include_diff": {
      "default": true,
      "description": "Whether to include file diffs and stats in the response. Default is true.",
      "type": "boolean"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "sha": {
      "description": "Commit SHA, branch name, or tag name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "sha"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_commit \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_file_contents`

Get the contents of a file or directory from a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner (username or organization)",
      "type": "string"
    },
    "path": {
      "default": "/",
      "description": "Path to file/directory",
      "type": "string"
    },
    "ref": {
      "description": "Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head`",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "sha": {
      "description": "Accepts optional commit SHA. If specified, it will be used instead of ref",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_file_contents \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_label`

Get a specific label from a repository.

**Input Schema:**

```json
{
  "properties": {
    "name": {
      "description": "Label name.",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner (username or organization name)",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "name"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_label \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_latest_release`

Get the latest release in a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_latest_release \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_me`

Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.

**Input Schema:**

```json
{
  "properties": {},
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_me \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_release_by_tag`

Get a specific release by its tag name in a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "tag": {
      "description": "Tag name (e.g., 'v1.0.0')",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "tag"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_release_by_tag \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_tag`

Get details about a specific git tag in a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "tag": {
      "description": "Tag name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "tag"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_tag \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_team_members`

Get member usernames of a specific team in an organization. Limited to organizations accessible with current credentials

**Input Schema:**

```json
{
  "properties": {
    "org": {
      "description": "Organization login (owner) that contains the team.",
      "type": "string"
    },
    "team_slug": {
      "description": "Team slug",
      "type": "string"
    }
  },
  "required": [
    "org",
    "team_slug"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_team_members \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `get_teams`

Get details of the teams the user is a member of. Limited to organizations accessible with current credentials

**Input Schema:**

```json
{
  "properties": {
    "user": {
      "description": "Username to get teams for. If not provided, uses the authenticated user.",
      "type": "string"
    }
  },
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/get_teams \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `issue_read`

Get information about a specific issue in a GitHub repository.

**Input Schema:**

```json
{
  "properties": {
    "issue_number": {
      "description": "The number of the issue",
      "type": "number"
    },
    "method": {
      "description": "The read operation to perform on a single issue.\nOptions are:\n1. get - Get details of a specific issue.\n2. get_comments - Get issue comments.\n3. get_sub_issues - Get sub-issues of the issue.\n4. get_labels - Get labels assigned to the issue.\n",
      "enum": [
        "get",
        "get_comments",
        "get_sub_issues",
        "get_labels"
      ],
      "type": "string"
    },
    "owner": {
      "description": "The owner of the repository",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "The name of the repository",
      "type": "string"
    }
  },
  "required": [
    "method",
    "owner",
    "repo",
    "issue_number"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/issue_read \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `issue_write`

Create a new or update an existing issue in a GitHub repository.

**Input Schema:**

```json
{
  "properties": {
    "assignees": {
      "description": "Usernames to assign to this issue",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "body": {
      "description": "Issue body content",
      "type": "string"
    },
    "duplicate_of": {
      "description": "Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'.",
      "type": "number"
    },
    "issue_number": {
      "description": "Issue number to update",
      "type": "number"
    },
    "labels": {
      "description": "Labels to apply to this issue",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "method": {
      "description": "Write operation to perform on a single issue.\nOptions are:\n- 'create' - creates a new issue.\n- 'update' - updates an existing issue.\n",
      "enum": [
        "create",
        "update"
      ],
      "type": "string"
    },
    "milestone": {
      "description": "Milestone number",
      "type": "number"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "state": {
      "description": "New state",
      "enum": [
        "open",
        "closed"
      ],
      "type": "string"
    },
    "state_reason": {
      "description": "Reason for the state change. Ignored unless state is changed.",
      "enum": [
        "completed",
        "not_planned",
        "duplicate"
      ],
      "type": "string"
    },
    "title": {
      "description": "Issue title",
      "type": "string"
    },
    "type": {
      "description": "Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter.",
      "type": "string"
    }
  },
  "required": [
    "method",
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/issue_write \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `list_branches`

List branches in a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/list_branches \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `list_commits`

Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).

**Input Schema:**

```json
{
  "properties": {
    "author": {
      "description": "Author username or email address to filter commits by",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "sha": {
      "description": "Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA.",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/list_commits \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `list_issue_types`

List supported issue types for repository owner (organization).

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "The organization owner of the repository",
      "type": "string"
    }
  },
  "required": [
    "owner"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/list_issue_types \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `list_issues`

List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.

**Input Schema:**

```json
{
  "properties": {
    "after": {
      "description": "Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs.",
      "type": "string"
    },
    "direction": {
      "description": "Order direction. If provided, the 'orderBy' also needs to be provided.",
      "enum": [
        "ASC",
        "DESC"
      ],
      "type": "string"
    },
    "labels": {
      "description": "Filter by labels",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "orderBy": {
      "description": "Order issues by field. If provided, the 'direction' also needs to be provided.",
      "enum": [
        "CREATED_AT",
        "UPDATED_AT",
        "COMMENTS"
      ],
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "since": {
      "description": "Filter by date (ISO 8601 timestamp)",
      "type": "string"
    },
    "state": {
      "description": "Filter by state, by default both open and closed issues are returned when not provided",
      "enum": [
        "OPEN",
        "CLOSED"
      ],
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/list_issues \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `list_pull_requests`

List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.

**Input Schema:**

```json
{
  "properties": {
    "base": {
      "description": "Filter by base branch",
      "type": "string"
    },
    "direction": {
      "description": "Sort direction",
      "enum": [
        "asc",
        "desc"
      ],
      "type": "string"
    },
    "head": {
      "description": "Filter by head user/org and branch",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "sort": {
      "description": "Sort by",
      "enum": [
        "created",
        "updated",
        "popularity",
        "long-running"
      ],
      "type": "string"
    },
    "state": {
      "description": "Filter by state",
      "enum": [
        "open",
        "closed",
        "all"
      ],
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/list_pull_requests \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `list_releases`

List releases in a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/list_releases \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `list_tags`

List git tags in a GitHub repository

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/list_tags \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `merge_pull_request`

Merge a pull request in a GitHub repository.

**Input Schema:**

```json
{
  "properties": {
    "commit_message": {
      "description": "Extra detail for merge commit",
      "type": "string"
    },
    "commit_title": {
      "description": "Title for merge commit",
      "type": "string"
    },
    "merge_method": {
      "description": "Merge method",
      "enum": [
        "merge",
        "squash",
        "rebase"
      ],
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "pullNumber": {
      "description": "Pull request number",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "pullNumber"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/merge_pull_request \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `pull_request_read`

Get information on a specific pull request in GitHub repository.

**Input Schema:**

```json
{
  "properties": {
    "method": {
      "description": "Action to specify what pull request data needs to be retrieved from GitHub. \nPossible options: \n 1. get - Get details of a specific pull request.\n 2. get_diff - Get the diff of a pull request.\n 3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.\n 4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.\n 5. get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns threads with metadata (isResolved, isOutdated, isCollapsed) and their associated comments. Use cursor-based pagination (perPage, after) to control results.\n 6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.\n 7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.\n",
      "enum": [
        "get",
        "get_diff",
        "get_status",
        "get_files",
        "get_review_comments",
        "get_reviews",
        "get_comments"
      ],
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "pullNumber": {
      "description": "Pull request number",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "method",
    "owner",
    "repo",
    "pullNumber"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/pull_request_read \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `pull_request_review_write`

Create and/or submit, delete review of a pull request.

Available methods:
- create: Create a new review of a pull request. If "event" parameter is provided, the review is submitted. If "event" is omitted, a pending review is created.
- submit_pending: Submit an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. The "body" and "event" parameters are used when submitting the review.
- delete_pending: Delete an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request.


**Input Schema:**

```json
{
  "properties": {
    "body": {
      "description": "Review comment text",
      "type": "string"
    },
    "commitID": {
      "description": "SHA of commit to review",
      "type": "string"
    },
    "event": {
      "description": "Review action to perform.",
      "enum": [
        "APPROVE",
        "REQUEST_CHANGES",
        "COMMENT"
      ],
      "type": "string"
    },
    "method": {
      "description": "The write operation to perform on pull request review.",
      "enum": [
        "create",
        "submit_pending",
        "delete_pending"
      ],
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "pullNumber": {
      "description": "Pull request number",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "method",
    "owner",
    "repo",
    "pullNumber"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/pull_request_review_write \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `push_files`

Push multiple files to a GitHub repository in a single commit

**Input Schema:**

```json
{
  "properties": {
    "branch": {
      "description": "Branch to push to",
      "type": "string"
    },
    "files": {
      "description": "Array of file objects to push, each object with path (string) and content (string)",
      "items": {
        "properties": {
          "content": {
            "description": "file content",
            "type": "string"
          },
          "path": {
            "description": "path to the file",
            "type": "string"
          }
        },
        "required": [
          "path",
          "content"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "message": {
      "description": "Commit message",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "branch",
    "files",
    "message"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/push_files \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `request_copilot_review`

Request a GitHub Copilot code review for a pull request. Use this for automated feedback on pull requests, usually before requesting a human reviewer.

**Input Schema:**

```json
{
  "properties": {
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "pullNumber": {
      "description": "Pull request number",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "pullNumber"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/request_copilot_review \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `search_code`

Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.

**Input Schema:**

```json
{
  "properties": {
    "order": {
      "description": "Sort order for results",
      "enum": [
        "asc",
        "desc"
      ],
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "query": {
      "description": "Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more.",
      "type": "string"
    },
    "sort": {
      "description": "Sort field ('indexed' only)",
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/search_code \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `search_issues`

Search for issues in GitHub repositories using issues search syntax already scoped to is:issue

**Input Schema:**

```json
{
  "properties": {
    "order": {
      "description": "Sort order",
      "enum": [
        "asc",
        "desc"
      ],
      "type": "string"
    },
    "owner": {
      "description": "Optional repository owner. If provided with repo, only issues for this repository are listed.",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "query": {
      "description": "Search query using GitHub issues search syntax",
      "type": "string"
    },
    "repo": {
      "description": "Optional repository name. If provided with owner, only issues for this repository are listed.",
      "type": "string"
    },
    "sort": {
      "description": "Sort field by number of matches of categories, defaults to best match",
      "enum": [
        "comments",
        "reactions",
        "reactions-+1",
        "reactions--1",
        "reactions-smile",
        "reactions-thinking_face",
        "reactions-heart",
        "reactions-tada",
        "interactions",
        "created",
        "updated"
      ],
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/search_issues \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `search_pull_requests`

Search for pull requests in GitHub repositories using issues search syntax already scoped to is:pr

**Input Schema:**

```json
{
  "properties": {
    "order": {
      "description": "Sort order",
      "enum": [
        "asc",
        "desc"
      ],
      "type": "string"
    },
    "owner": {
      "description": "Optional repository owner. If provided with repo, only pull requests for this repository are listed.",
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "query": {
      "description": "Search query using GitHub pull request search syntax",
      "type": "string"
    },
    "repo": {
      "description": "Optional repository name. If provided with owner, only pull requests for this repository are listed.",
      "type": "string"
    },
    "sort": {
      "description": "Sort field by number of matches of categories, defaults to best match",
      "enum": [
        "comments",
        "reactions",
        "reactions-+1",
        "reactions--1",
        "reactions-smile",
        "reactions-thinking_face",
        "reactions-heart",
        "reactions-tada",
        "interactions",
        "created",
        "updated"
      ],
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/search_pull_requests \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `search_repositories`

Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.

**Input Schema:**

```json
{
  "properties": {
    "minimal_output": {
      "default": true,
      "description": "Return minimal repository information (default: true). When false, returns full GitHub API repository objects.",
      "type": "boolean"
    },
    "order": {
      "description": "Sort order",
      "enum": [
        "asc",
        "desc"
      ],
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "query": {
      "description": "Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.",
      "type": "string"
    },
    "sort": {
      "description": "Sort repositories by field, defaults to best match",
      "enum": [
        "stars",
        "forks",
        "help-wanted-issues",
        "updated"
      ],
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/search_repositories \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `search_users`

Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.

**Input Schema:**

```json
{
  "properties": {
    "order": {
      "description": "Sort order",
      "enum": [
        "asc",
        "desc"
      ],
      "type": "string"
    },
    "page": {
      "description": "Page number for pagination (min 1)",
      "minimum": 1,
      "type": "number"
    },
    "perPage": {
      "description": "Results per page for pagination (min 1, max 100)",
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "query": {
      "description": "User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user.",
      "type": "string"
    },
    "sort": {
      "description": "Sort users by number of followers or repositories, or when the person joined GitHub.",
      "enum": [
        "followers",
        "repositories",
        "joined"
      ],
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/search_users \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `sub_issue_write`

Add a sub-issue to a parent issue in a GitHub repository.

**Input Schema:**

```json
{
  "properties": {
    "after_id": {
      "description": "The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified)",
      "type": "number"
    },
    "before_id": {
      "description": "The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified)",
      "type": "number"
    },
    "issue_number": {
      "description": "The number of the parent issue",
      "type": "number"
    },
    "method": {
      "description": "The action to perform on a single sub-issue\nOptions are:\n- 'add' - add a sub-issue to a parent issue in a GitHub repository.\n- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.\n- 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position.\n\t\t\t\t",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "replace_parent": {
      "description": "When true, replaces the sub-issue's current parent issue. Use with 'add' method only.",
      "type": "boolean"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "sub_issue_id": {
      "description": "The ID of the sub-issue to add. ID is not the same as issue number",
      "type": "number"
    }
  },
  "required": [
    "method",
    "owner",
    "repo",
    "issue_number",
    "sub_issue_id"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/sub_issue_write \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `update_pull_request`

Update an existing pull request in a GitHub repository.

**Input Schema:**

```json
{
  "properties": {
    "base": {
      "description": "New base branch name",
      "type": "string"
    },
    "body": {
      "description": "New description",
      "type": "string"
    },
    "draft": {
      "description": "Mark pull request as draft (true) or ready for review (false)",
      "type": "boolean"
    },
    "maintainer_can_modify": {
      "description": "Allow maintainer edits",
      "type": "boolean"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "pullNumber": {
      "description": "Pull request number to update",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    },
    "reviewers": {
      "description": "GitHub usernames to request reviews from",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "state": {
      "description": "New state",
      "enum": [
        "open",
        "closed"
      ],
      "type": "string"
    },
    "title": {
      "description": "New title",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "pullNumber"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/update_pull_request \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

#### `update_pull_request_branch`

Update the branch of a pull request with the latest changes from the base branch.

**Input Schema:**

```json
{
  "properties": {
    "expectedHeadSha": {
      "description": "The expected SHA of the pull request's HEAD ref",
      "type": "string"
    },
    "owner": {
      "description": "Repository owner",
      "type": "string"
    },
    "pullNumber": {
      "description": "Pull request number",
      "type": "number"
    },
    "repo": {
      "description": "Repository name",
      "type": "string"
    }
  },
  "required": [
    "owner",
    "repo",
    "pullNumber"
  ],
  "type": "object"
}
```

**Example:**

```bash
curl -X POST https://api.serendb.com/publishers/mcp-github/update_pull_request_branch \
  -H "Authorization: Bearer $SEREN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arg1": "value1"}'
```

### Introspection

List available tools and resources:

```bash
# List tools
curl https://api.serendb.com/publishers/mcp-github/_mcp/tools \
  -H "Authorization: Bearer $SEREN_API_KEY"

# List resources
curl https://api.serendb.com/publishers/mcp-github/_mcp/resources \
  -H "Authorization: Bearer $SEREN_API_KEY"
```

## Pricing

**Pricing Model:** per_request


**Minimum charge:** $0.00010000

---

## Need Help?

- Seren Docs: https://docs.serendb.com
- Publisher: GitHub integration for AI agents - manage issues, PRs, repos, and more
