Skip to content

Feature Request: Add support for editing issue comments #868

@kaovilai

Description

@kaovilai

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

  1. Correcting typos or formatting errors in comments after posting
  2. Updating information in comments when circumstances change
  3. Adding additional context to existing comments
  4. Fixing broken links or references in comments
  5. 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 owner
  • repo (string): Repository name
  • comment_id (number): The ID of the comment to edit
  • body (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 entirely
  • list_issue_comments for retrieving existing comments (to find comment IDs for editing)

Would appreciate this enhancement to make issue management workflows more complete!

Metadata

Metadata

Assignees

No one assigned

    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