Phase 3: Forgejo MCP completeness

phase-pal-e-agency-3-forgejo-mcp-completeness Phase

completed phase
Goal: Add set_label, comment_on_issue, and create_repo tools to forgejo-mcp so agents can fully manage workflow state.
Owner: Dev agent
Repo: forgejo_admin/forgejo-mcp
Depends on: None

Scope

The label signaling protocol (agent-workflow) requires agents to set status labels on Forgejo issues. Without set_label, agents can't signal workflow state changes (in-progress → qa → approved). This is the #1 blocker for autonomous workflow.
Three new MCP tools, all wrapping existing forgejo-sdk methods:
  • set_label — Add/replace labels on an issue. SDK has issue_add_label, issue_replace_labels, issue_remove_label, issue_get_labels. The MCP tool should support adding a single label by name (not ID), which means looking up the label ID first via issue_list_labels.
  • comment_on_issue — Post a comment on a Forgejo issue. QA agents need this to post findings on issues (not PRs, per agent-workflow). SDK has issue comment methods.
  • create_repo — Create a new repository. Betty Sue needs this for onboarding new services. SDK has repo creation methods in repository.py.
Follow existing tool pattern in tools/workflows.py: @mcp.tool() decorator, Annotated[type, Field(description=...)] params, JSON string return, _error_response() for errors.

Deliverables

  • PR #10 merged (forgejo-mcp) — set_label, comment_on_issue, create_repo tools added to tools/workflows.py
  • 6 integration tests in tests/test_new_tools.py
  • Forgejo issue #6 closed
  • QA nits deferred: 100-label pagination limit, generic test filename, comment tool naming overlap, no pytest in CI
  • plan-pal-e-agency — parent plan
  • agent-workflow — label signaling protocol that depends on set_label
  • todo-forgejo-mcp-label-comment-tools — original TODO (graduating)
  • bug-forgejo-mcp-missing-create-repo — original TODO (graduating)