feat(org): add MCP tools for organization-level labels (list/create/edit/delete) (#99) (#102)

This PR adds full support for managing organization-level labels via MCP. It uses the newly added SDK APIs now available on main branch, see https://gitea.com/gitea/go-sdk/issues/732.

Registers following tools under label module and wires them into the MCP server as read/write tools:

- list_org_labels: list labels defined at the organization level (pagination supported)
- create_org_label: create a label in an organization (name, color, description, exclusive)
- edit_org_label: edit an organization label (name, color, description, exclusive)
- delete_org_label: delete an organization label by ID

Dependency note:
go.mod/go.sum updated to use the SDK main branch pseudo-version that includes the org-label APIs.

If you prefer to merge only after a tagged SDK release, I can bump the dependency to the new tag as soon as it’s available.

Thanks for considering!

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/102
Reviewed-by: Bo-Yi Wu (吳柏毅) <appleboy.tw@gmail.com>
Co-authored-by: Daniel <danielwichers@gmail.com>
Co-committed-by: Daniel <danielwichers@gmail.com>
This commit is contained in:
Daniel
2025-10-20 01:43:39 +00:00
committed by Bo-Yi Wu (吳柏毅)
parent 98f908d5a1
commit f6b45fdf6e
4 changed files with 189 additions and 3 deletions

4
go.sum
View File

@@ -1,5 +1,5 @@
code.gitea.io/sdk/gitea v0.22.0 h1:HCKq7bX/HQ85Nw7c/HAhWgRye+vBp5nQOE8Md1+9Ef0=
code.gitea.io/sdk/gitea v0.22.0/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM=
code.gitea.io/sdk/gitea v0.22.1-0.20251016220613-060554f46291 h1:oVIBPpbLraXywuuapimBbI3uMRGF0qJP3wjU2vb2bU4=
code.gitea.io/sdk/gitea v0.22.1-0.20251016220613-060554f46291/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM=
github.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs=
github.com/42wim/httpsig v1.2.3/go.mod h1:nZq9OlYKDrUBhptd77IHx4/sZZD+IxTBADvAPI9G/EM=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=