feat: add Gitea issue comment list/create MCP tools (#126) #127
Reference in New Issue
Block a user
Delete Branch "feat/issue-126-issue-comment-tools"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements #126: first-class MCP tools for Gitea issue discussion comments, closing the gap where operators had to fall back to direct API scripts (as happened for mcp-control-plane #24).
New tools
gitea_list_issue_comments(issue_number, limit, remote, host, org, repo)— lists an issue's discussion comments. Returns commentid,author,created_at,updated_at,body. Gated ongitea.read(fail closed, no API call when blocked).gitea_create_issue_comment(issue_number, body, remote, host, org, repo)— posts a markdown comment to the issue thread. Returnscomment_id+issue_number. Gated ongitea.issue.comment— separately from thegitea.pr.*review/merge family; a profile holding full PR review permissions cannot post issue comments and vice versa. Empty body blocked. Audit-logged ascreate_issue_commentwhenGITEA_AUDIT_LOGis configured.Safety
/pulls/{n}/reviews— endpoint separation is tested.GITEA_MCP_REVEAL_ENDPOINTS=1admin opt-in (consistent with #120; forward-compatible with #125)._redactbefore being raised.issue_numberrequired; repo targeting uses only the standard remote/org/repo arguments.Tests
TestIssueCommentTools— 14 new tests: list/create success, output redaction by default, reveal opt-in, permission blocks (missing read, PR-review-perms-don't-grant-issue-comments, forbidden-overrides-allowed), empty body, missing issue with redacted error, review-endpoint separation, unknown remote.Full suite: 481 passed, 6 skipped.
git diff --checkclean;py_compileclean.Docs
New section "Issue comments versus PR reviews (#126)" in
docs/gitea-execution-profiles.md.Follow-up for operator
The live
prgs-authorprofile does not currently allowgitea.issue.comment, so the create tool will fail closed until the operator adds that operation to the intended profiles in the live config (config change is operator-owned; not part of this PR).Closes #126
Independent review of PR #127 at pinned head
5aeb51f132.Validation performed in a clean detached review worktree:
Manual review notes:
Verdict: approve.