Skip to content

Add support for Repository Discussions #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ The following sets of tools are available (all are on by default):
| `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |
| `actions` | GitHub Actions workflows and CI/CD operations |
| `code_security` | Code security related tools, such as GitHub Code Scanning |
| `discussions` | GitHub Discussions tools (list, get, comments, categories) |
| `experiments` | Experimental features that are not considered stable yet |
| `issues` | GitHub Issues related tools |
| `notifications` | GitHub Notifications related tools |
Expand Down Expand Up @@ -920,7 +921,71 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description

</details>

<details>
- **manage_repository_notification_subscription** – Manage a repository notification subscription (ignore, watch, or delete)
- `owner`: The account owner of the repository (string, required)
- `repo`: The name of the repository (string, required)
- `action`: Action to perform: `ignore`, `watch`, or `delete` (string, required)

### Discussions

- **list_discussions** - List discussions for a repository
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `category`: Filter by category name (string, optional)
- `since`: Filter by date (ISO 8601 timestamp) (string, optional)
- `first`: Pagination - Number of records to retrieve (number, optional)
- `last`: Pagination - Number of records to retrieve from the end (number, optional)
- `after`: Pagination - Cursor to start with (string, optional)
- `before`: Pagination - Cursor to end with (string, optional)
- `sort`: Sort by ('CREATED_AT', 'UPDATED_AT') (string, optional)
- `direction`: Sort direction ('ASC', 'DESC') (string, optional)
- `answered`: Filter by whether discussions have been answered or not (boolean, optional)

- **get_discussion** - Get a specific discussion by ID
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `discussionNumber`: Discussion number (required)

- **get_discussion_comments** - Get comments from a discussion
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `discussionNumber`: Discussion number (required)

- **list_discussion_categories** - List discussion categories for a repository, with their IDs and names
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `first`: Pagination - Number of categories to return per page (number, optional, min 1, max 100)
- `last`: Pagination - Number of categories to return from the end (number, optional, min 1, max 100)
- `after`: Pagination - Cursor to start with (string, optional)
- `before`: Pagination - Cursor to end with (string, optional)

## Resources

### Repository Content

- **Get Repository Content**
Retrieves the content of a repository at a specific path.

- **Template**: `repo://{owner}/{repo}/contents{/path*}`
- **Parameters**:
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `path`: File or directory path (string, optional)

- **Get Repository Content for a Specific Branch**
Retrieves the content of a repository at a specific path for a given branch.

- **Template**: `repo://{owner}/{repo}/refs/heads/{branch}/contents{/path*}`
- **Parameters**:
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `branch`: Branch name (string, required)
- `path`: File or directory path (string, optional)

- **Get Repository Content for a Specific Commit**
Retrieves the content of a repository at a specific path for a given commit.



<summary>Users</summary>

Expand Down
Loading
Loading