Skip to content

Add discussion comment write operations to discussions toolset #1908

Description

@gfortaine

Describe the feature or problem you'd like to solve

The discussions toolset currently only supports read operations. There's no way for AI agents to participate in GitHub Discussions — posting comments, marking answers, or managing their own replies.

I ran into this while trying to contribute to a spec discussion (modelcontextprotocol#1772). My agent could read the thread but couldn't post. The add_issue_comment tool returned 404 because Discussions use GraphQL, not the REST Issues API.

Proposed solution

Add comment-level write operations to the discussions toolset:

Tool GraphQL Mutation
add_discussion_comment addDiscussionComment
update_discussion_comment updateDiscussionComment
delete_discussion_comment deleteDiscussionComment
mark_discussion_comment_as_answer markDiscussionCommentAsAnswer

This mirrors the existing pattern for issues (add_issue_comment, update_issue_comment).

Example prompts or workflows

  1. "Read the latest comments on discussion [docker] build arm64 #42 and post a summary of the key points"
  2. "Find unanswered questions in the Q&A category and draft helpful responses"
  3. "Add a comment to discussion https://github.com/github/github-mcp-server/issues/1771 #1772 with my implementation feedback"
  4. "Mark the most upvoted comment as the answer on discussion add iologger for debugging purposes #15"
  5. "Fix the typo in my last comment on discussion chore: Create docker-publish.yml #30"

Additional context

The GraphQL client (githubv4) is already used in pkg/github/discussions.go for read operations. Happy to submit a PR if this feature is accepted.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions