-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Describe the feature or problem you'd like to solve
Currently, the GitHub MCP Server supports creating comments on issues via the add_issue_comment
tool, but there is no corresponding functionality to edit existing issue comments. This limitation prevents users from correcting typos, updating information, or making other modifications to comments that have already been posted.
Use cases
- Correcting typos or formatting errors in comments after posting
- Updating information in comments when circumstances change
- Adding additional context to existing comments
- Fixing broken links or references in comments
- Modifying automated comments generated by bots or scripts
Example scenario
Consider a situation where you've posted a comment like this one: vmware-tanzu/velero#9178 (comment)
After posting, you realize there's a typo, formatting issue, or need to add more information. Currently, there's no way to edit this comment through the MCP server - you would need to either:
- Leave the comment as-is with errors
- Delete and recreate the comment (losing the original timestamp and any replies)
- Manually edit through the GitHub web interface
Proposed solution
Add an edit_issue_comment
tool that would accept:
owner
(string): Repository ownerrepo
(string): Repository namecomment_id
(number): The ID of the comment to editbody
(string): New comment text content
This would use the GitHub REST API's Update an issue comment endpoint.
Additional context
This functionality would complement the existing add_issue_comment
tool and provide a more complete set of comment management capabilities. The GitHub REST API already supports this operation, so implementation should be straightforward.
Similar functionality could potentially be extended to:
- Pull request comments
- Discussion comments
- Other comment types throughout GitHub
Alternative solutions
As an alternative or complementary approach, the MCP server could also support:
delete_issue_comment
for removing comments entirelylist_issue_comments
for retrieving existing comments (to find comment IDs for editing)
Would appreciate this enhancement to make issue management workflows more complete!