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 12 commits into
base: main
Choose a base branch
from
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ The following sets of tools are available (all are on by default):
| ----------------------- | ------------------------------------------------------------- |
| `repos` | Repository-related tools (file operations, branches, commits) |
| `issues` | Issue-related tools (create, read, update, comment) |
| `discussions` | GitHub Discussions tools (list, get, comments, categories) |
| `users` | Anything relating to GitHub Users |
| `pull_requests` | Pull request operations (create, merge, review) |
| `code_security` | Code scanning alerts and security features |
Expand Down Expand Up @@ -615,6 +616,39 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `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
Expand Down
Loading