Proposal, design, specs, and tasks for adding 15 MCP tools covering org CRUD, membership, and team operations. Tracks issue #92.
2.4 KiB
2.4 KiB
Why
Forgejo MCP currently has no organization management capabilities. Users working with Forgejo instances need to manage organizations — creating them, listing memberships, managing teams — but must leave the MCP/CLI workflow to do so. The Forgejo Go SDK already provides 38+ organization-related methods, making this a well-supported addition. Requested in issue #92.
What Changes
- Add a new
operation/org/domain with MCP tool handlers for organization CRUD, membership, and team operations - Register the new domain in
operation/operation.goandcmd/cli.go(domain mapping) - All new tools automatically available via both MCP (stdio/SSE) and CLI (
--cli) — no separate CLI wiring needed
New MCP Tools
Organization CRUD:
create_org— Create a new organizationget_org— Get organization details by namelist_my_orgs— List organizations the authenticated user belongs tolist_user_orgs— List organizations for a given useredit_org— Update organization settings (description, visibility, etc.)delete_org— Delete an organization
Membership:
list_org_members— List members of an organizationcheck_org_membership— Check if a user is a memberremove_org_member— Remove a member from an organization
Teams:
list_org_teams— List teams in an organizationcreate_org_team— Create a team in an organizationadd_team_member— Add a user to a teamremove_team_member— Remove a user from a teamadd_team_repo— Add a repository to a teamremove_team_repo— Remove a repository from a team
Capabilities
New Capabilities
org-crud: Organization create, read, update, delete, and listing operationsorg-membership: Organization membership queries and managementorg-teams: Team creation, membership, and repository assignment within organizations
Modified Capabilities
(none — this is purely additive)
Impact
- Code: New
operation/org/package (3-4 files). One-line additions tooperation/operation.goandcmd/cli.godomain registry. - API surface: 15 new MCP tools in the
orgdomain. No existing tools change. - Dependencies: No new dependencies — uses existing
forgejo-sdk/forgejo/v2already vendored. - Breaking changes: None. Purely additive.
- Testing: New unit tests in
operation/org/following existing patterns.