|
|
@@ -45,6 +45,21 @@ This MCP server provides tools to:
|
|
|
- Replace all labels on an issue
|
|
|
- Remove all labels from an issue
|
|
|
|
|
|
+- **Organization Management**
|
|
|
+ - List organizations for authenticated user
|
|
|
+ - Create new organization
|
|
|
+ - List public organizations for a user
|
|
|
+ - Get organization details
|
|
|
+ - Update organization information
|
|
|
+ - Add/update organization member with role
|
|
|
+
|
|
|
+- **Team Management**
|
|
|
+ - List teams in an organization
|
|
|
+ - Create new team
|
|
|
+ - Get team details
|
|
|
+ - Add member to a team
|
|
|
+ - Remove member from a team
|
|
|
+
|
|
|
## Installation
|
|
|
|
|
|
### Prerequisites
|
|
|
@@ -475,6 +490,112 @@ Remove all labels from an issue.
|
|
|
- `repo` (string, required): Repository name
|
|
|
- `number` (number, required): Issue number
|
|
|
|
|
|
+### Organization Management Tools
|
|
|
+
|
|
|
+#### `list_user_organizations`
|
|
|
+List organizations for the authenticated user.
|
|
|
+- No parameters required
|
|
|
+
|
|
|
+#### `create_organization`
|
|
|
+Create a new organization.
|
|
|
+- `username` (string, required): Organization username (alphanumeric, dashes, underscores)
|
|
|
+- `full_name` (string, optional): Organization full name
|
|
|
+- `description` (string, optional): Organization description
|
|
|
+- `website` (string, optional): Organization website
|
|
|
+- `location` (string, optional): Organization location
|
|
|
+
|
|
|
+#### `list_public_organizations`
|
|
|
+List public organizations for a specific user.
|
|
|
+- `username` (string, required): Username to get public organizations for
|
|
|
+
|
|
|
+#### `get_organization`
|
|
|
+Get information about a specific organization.
|
|
|
+- `orgname` (string, required): Organization name
|
|
|
+
|
|
|
+#### `update_organization`
|
|
|
+Update an organization (requires owner permissions).
|
|
|
+- `orgname` (string, required): Organization name
|
|
|
+- `full_name` (string, optional): Organization full name
|
|
|
+- `description` (string, optional): Organization description
|
|
|
+- `website` (string, optional): Organization website
|
|
|
+- `location` (string, optional): Organization location
|
|
|
+
|
|
|
+#### `add_organization_member`
|
|
|
+Add or update organization membership (requires owner permissions).
|
|
|
+- `orgname` (string, required): Organization name
|
|
|
+- `username` (string, required): Username to add as member
|
|
|
+- `role` (string, required): Member role - 'admin' or 'member'
|
|
|
+
|
|
|
+### Team Management Tools
|
|
|
+
|
|
|
+#### `list_organization_teams`
|
|
|
+List teams in an organization.
|
|
|
+- `orgname` (string, required): Organization name
|
|
|
+
|
|
|
+#### `create_team`
|
|
|
+Create a new team in an organization (requires admin permissions).
|
|
|
+- `orgname` (string, required): Organization name
|
|
|
+- `name` (string, required): Team name (max 30 characters, alphanumeric with dashes and dots)
|
|
|
+- `description` (string, optional): Team description (max 255 characters)
|
|
|
+- `permission` (string, optional): Team permission level - 'read', 'write', or 'admin' (default: 'read')
|
|
|
+
|
|
|
+#### `get_team`
|
|
|
+Get information about a specific team.
|
|
|
+- `teamId` (number, required): Team ID
|
|
|
+
|
|
|
+#### `add_team_member`
|
|
|
+Add a user to a team (requires admin permissions).
|
|
|
+- `teamId` (number, required): Team ID
|
|
|
+- `username` (string, required): Username to add to the team
|
|
|
+
|
|
|
+#### `remove_team_member`
|
|
|
+Remove a user from a team (requires admin permissions).
|
|
|
+- `teamId` (number, required): Team ID
|
|
|
+- `username` (string, required): Username to remove from the team
|
|
|
+
|
|
|
+## Documented but Not Yet Implemented API Endpoints
|
|
|
+
|
|
|
+The following Gogs API v1 endpoints are officially documented but not yet implemented in this MCP server. These represent potential features for future development:
|
|
|
+
|
|
|
+| Category | Endpoint | Method | Description | Documentation |
|
|
|
+|----------|----------|--------|-------------|---------------|
|
|
|
+| **User Administration** | `/admin/users` | POST | Create a new user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#create-a-new-user) |
|
|
|
+| **User Administration** | `/admin/users/:username` | PATCH | Edit an existing user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#edit-an-existing-user) |
|
|
|
+| **User Administration** | `/admin/users/:username` | DELETE | Delete a user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#delete-a-user) |
|
|
|
+| **User Administration** | `/admin/users/:username/keys` | POST | Create public key for user | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Users.md#create-a-public-key-for-user) |
|
|
|
+| **Repository Administration** | `/admin/users/:username/repos` | POST | Create repository for user/org | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Repositories.md) |
|
|
|
+| **Team Administration** | `/admin/teams/:teamid/members` | GET | List all members of a team | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Teams.md#list-all-members-of-a-team) |
|
|
|
+| **Team Administration** | `/admin/teams/:teamid/repos/:reponame` | PUT | Add or update team repository | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Teams.md#add-or-update-team-repository) |
|
|
|
+| **Team Administration** | `/admin/teams/:teamid/repos/:reponame` | DELETE | Remove team repository | [Link](https://github.com/gogs/docs-api/blob/master/Administration/Teams.md#remove-team-repository) |
|
|
|
+| **Public Keys** | `/users/:username/keys` | GET | List public keys for a user | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
|
|
|
+| **Public Keys** | `/user/keys` | GET | List your public keys | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
|
|
|
+| **Public Keys** | `/user/keys/:id` | GET | Get a single public key | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
|
|
|
+| **Public Keys** | `/user/keys` | POST | Create a public key | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
|
|
|
+| **Public Keys** | `/user/keys/:id` | DELETE | Delete a public key | [Link](https://github.com/gogs/docs-api/blob/master/Users/Public%20Keys.md) |
|
|
|
+| **Deploy Keys** | `/repos/:username/:reponame/keys` | GET | List deploy keys | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
|
|
|
+| **Deploy Keys** | `/repos/:username/:reponame/keys/:id` | GET | Get a deploy key | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
|
|
|
+| **Deploy Keys** | `/repos/:username/:reponame/keys` | POST | Add a new deploy key | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
|
|
|
+| **Deploy Keys** | `/repos/:username/:reponame/keys/:id` | DELETE | Remove a deploy key | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
|
|
|
+| **Webhooks** | `/repos/:username/:reponame/hooks` | GET | List hooks | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
|
|
|
+| **Webhooks** | `/repos/:username/:reponame/hooks` | POST | Create a hook | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
|
|
|
+| **Webhooks** | `/repos/:username/:reponame/hooks/:id` | PATCH | Edit a hook | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
|
|
|
+| **Webhooks** | `/repos/:username/:reponame/hooks/:id` | DELETE | Delete a hook | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Webhooks.md) |
|
|
|
+| **Collaborators** | `/repos/:username/:reponame/collaborators` | GET | Get collaborators | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Collaborators.md) |
|
|
|
+| **Collaborators** | `/repos/:username/:reponame/collaborators/:collaborator` | PUT | Add user as a collaborator | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Collaborators.md) |
|
|
|
+| **Collaborators** | `/repos/:username/:reponame/collaborators/:collaborator` | DELETE | Delete collaborator | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Collaborators.md) |
|
|
|
+| **Releases** | `/repos/:owner/:repo/releases` | GET | List releases | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Releases.md) |
|
|
|
+
|
|
|
+### Contributing New Endpoints
|
|
|
+
|
|
|
+If you'd like to help implement any of these endpoints:
|
|
|
+
|
|
|
+1. Check the official [Gogs API documentation](https://github.com/gogs/docs-api) for endpoint details
|
|
|
+2. Add the method to `src/gogs-client.ts` with proper TypeScript types
|
|
|
+3. Add the Zod schema and tool definition to `src/server.ts`
|
|
|
+4. Test the endpoint against a real Gogs instance
|
|
|
+5. Update this README with the new tool documentation
|
|
|
+6. Submit a pull request
|
|
|
+
|
|
|
## Development
|
|
|
|
|
|
### Run in Development Mode
|