Skip to content

Missing tool: list_issue_comments for reading general PR/issue comments #2064

Closed
@mol-george

Description

@mol-george

GitHub Issue Draft for modelcontextprotocol/servers

Title

Missing tool: list_issue_comments for reading general PR/issue comments

Body

Summary

The GitHub MCP server is missing a critical tool for reading issue comments, creating an asymmetric API where users can write general PR/issue comments but cannot read them programmatically.

Related Issues & PRs

Previous Missing Tools Issues:

Fix Attempt:

  • bug(github): Add missing pull request operations to MCP server #728: "Add missing pull request operations to MCP server" (March 2025) - MERGED
    • Fixed: get_pull_request, list_pull_requests, create_pull_request_review, merge_pull_request, get_pull_request_files, get_pull_request_status, update_pull_request_branch, get_pull_request_comments, get_pull_request_reviews
    • Missing: Issue comment reading functionality was not included

Current State

✅ Working (Write Operation):

  • Tool: add_issue_comment
  • GitHub API: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
  • Functionality: Can successfully add general comments to PRs/issues

❌ Missing (Read Operation):

  • No corresponding read tool exists
  • GitHub API: GET /repos/{owner}/{repo}/issues/{issue_number}/comments
  • Impact: Cannot read general PR/issue comments programmatically

Expected Behavior

There should be a tool (e.g., list_issue_comments or get_issue_comments) that allows reading issue comments, following the same pattern as other GitHub resources and completing the fix from PR #728.

Reproduction Steps

  1. Setup: Use any GitHub MCP server integration (tested with Claude Code)

  2. Create issue comment:

    add_issue_comment(owner="mol-george", repo="ads", issue_number=20, body="test comment")
    

    Result: Successfully creates comment

  3. Attempt to read comments:

    • No tool available for GET /repos/{owner}/{repo}/issues/{issue_number}/comments
    • Result: Cannot read the comment that was just created
  4. Verify comments exist:

    get_issue(owner="mol-george", repo="ads", issue_number=20)
    

    Result: Shows "comments": 2 confirming comments exist but are unreadable via MCP

Technical Analysis

API Pattern Inconsistency

Resource List/Read Tool Create/Write Tool Complete?
Issues list_issues create_issue
Pull Requests list_pull_requests create_pull_request
PR Review Comments get_pull_request_comments create_pull_request_review
Issue Comments MISSING add_issue_comment

GitHub API Support

The GitHub REST API fully supports reading issue comments:

  • Endpoint: GET /repos/{owner}/{repo}/issues/{issue_number}/comments
  • Documentation: https://docs.github.com/en/rest/issues/comments
  • Authentication: Same requirements as existing working tools
  • Permissions: Same requirements as add_issue_comment

Suggested Implementation

Add a new tool with signature:

list_issue_comments(
  owner: string,
  repo: string,
  issue_number: number,
  since?: string,  // Optional: only comments updated after this time
  per_page?: number, // Optional: pagination
  page?: number     // Optional: pagination
)

Returns: Array of issue comment objects matching GitHub API response format.

Impact

This missing functionality affects:

  • PR workflow automation: Cannot read comment threads programmatically
  • Issue management: Cannot process user feedback in comments
  • GitHub integrations: Incomplete API coverage breaks automation workflows
  • Developer experience: Asymmetric API creates confusion and limitations

Distinction from Fixed Tools

What PR #728 Fixed Successfully:

  • get_pull_request_comments - Reads review comments (code line-specific comments)
  • get_pull_request_reviews - Reads reviews (overall PR reviews)

What's Still Missing:

  • list_issue_comments - Read issue comments (general conversation comments)

GitHub Comment Types Explained:

  1. Issue Comments: General conversation on PRs/issues (/issues/{id}/comments) - Missing read tool
  2. Review Comments: Code line-specific comments (/pulls/{id}/comments) - Fixed in bug(github): Add missing pull request operations to MCP server #728
  3. Reviews: Overall PR reviews with approval/changes (/pulls/{id}/reviews) - Fixed in bug(github): Add missing pull request operations to MCP server #728

Workarounds

Currently users must:

  1. Use GitHub web interface to read comments manually
  2. Use gh CLI for comment reading
  3. Implement custom API calls outside MCP
  4. Use only review comments (line-specific) which do have read tools

Environment

  • GitHub MCP Server: Version available in Claude Code (June 2025)
  • Test Repository: https://github.com/mol-george/ads/pull/20
  • Authentication: Working (can create issues, PRs, and comments)
  • Permissions: Full repository access

Test Evidence

Live Test PR: https://github.com/mol-george/ads/pull/20

Test Results:

  1. Created issue comment via add_issue_comment - Confirmed working
  2. Cannot read issue comments - no tool available
  3. Confirmed comments exist via get_issue showing "comments": 2
  4. Review comments work perfectly via get_pull_request_comments (fixed in bug(github): Add missing pull request operations to MCP server #728)
  5. Reviews work perfectly via get_pull_request_reviews (fixed in bug(github): Add missing pull request operations to MCP server #728)

This demonstrates the asymmetric implementation clearly - PR #728 fixed review-related reading but missed issue comment reading.


Priority: Medium (affects core GitHub workflow functionality)
Effort: Low (follows existing patterns, GitHub API already supports it, similar to tools fixed in #728)
Benefit: High (completes the missing piece of GitHub integration)

This issue represents the final gap in the GitHub MCP server's comment functionality that wasn't addressed in the comprehensive fix of PR #728.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions