|
@@ -71,6 +71,13 @@ This MCP server provides tools to:
|
|
|
- **Release Management**
|
|
- **Release Management**
|
|
|
- List releases for a repository
|
|
- List releases for a repository
|
|
|
|
|
|
|
|
|
|
+- **Public Key Management**
|
|
|
|
|
+ - List public SSH keys for a user
|
|
|
|
|
+ - List authenticated user's public SSH keys
|
|
|
|
|
+ - Get details of a specific public SSH key
|
|
|
|
|
+ - Create new public SSH key
|
|
|
|
|
+ - Delete public SSH key
|
|
|
|
|
+
|
|
|
## Installation
|
|
## Installation
|
|
|
|
|
|
|
|
### Prerequisites
|
|
### Prerequisites
|
|
@@ -653,6 +660,49 @@ Remove a user's collaborator access from a repository.
|
|
|
- `repo` (string, required): Repository name
|
|
- `repo` (string, required): Repository name
|
|
|
- `username` (string, required): Username to remove as collaborator
|
|
- `username` (string, required): Username to remove as collaborator
|
|
|
|
|
|
|
|
|
|
+### Public Key Management Tools
|
|
|
|
|
+
|
|
|
|
|
+#### `list_user_keys`
|
|
|
|
|
+List all public SSH keys for a specific user. Returns key information including ID, title, key content, URL, and creation timestamp.
|
|
|
|
|
+- `username` (string, required): Username to list public keys for
|
|
|
|
|
+
|
|
|
|
|
+#### `list_my_keys`
|
|
|
|
|
+List all public SSH keys for the authenticated user. Returns key information including ID, title, key content, URL, and creation timestamp.
|
|
|
|
|
+
|
|
|
|
|
+**Example response:**
|
|
|
|
|
+```json
|
|
|
|
|
+[
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 2,
|
|
|
|
|
+ "title": "my-laptop-key",
|
|
|
|
|
+ "key": "ssh-ed25519 AAAAC3Nza...",
|
|
|
|
|
+ "url": "https://gogs.example.com/api/v1/user/keys/2",
|
|
|
|
|
+ "created_at": "2025-10-28T11:09:29Z"
|
|
|
|
|
+ }
|
|
|
|
|
+]
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+#### `get_public_key`
|
|
|
|
|
+Get details of a specific public SSH key by ID. Returns full key information.
|
|
|
|
|
+- `keyId` (number, required): Public key ID
|
|
|
|
|
+
|
|
|
|
|
+#### `create_public_key`
|
|
|
|
|
+Create a new public SSH key for the authenticated user. Returns the created key with its assigned ID.
|
|
|
|
|
+- `title` (string, required): Key title/name for identification
|
|
|
|
|
+- `key` (string, required): The public key content in SSH public key format (e.g., "ssh-ed25519 AAAA...")
|
|
|
|
|
+
|
|
|
|
|
+**Example:**
|
|
|
|
|
+```json
|
|
|
|
|
+{
|
|
|
|
|
+ "title": "My Development Key",
|
|
|
|
|
+ "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBf... user@hostname"
|
|
|
|
|
+}
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+#### `delete_public_key`
|
|
|
|
|
+Delete a public SSH key by ID. Only the authenticated user can delete their own keys.
|
|
|
|
|
+- `keyId` (number, required): Public key ID to delete
|
|
|
|
|
+
|
|
|
## Documented but Not Yet Implemented API Endpoints
|
|
## 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:
|
|
The following Gogs API v1 endpoints are officially documented but not yet implemented in this MCP server. These represent potential features for future development:
|
|
@@ -667,11 +717,6 @@ The following Gogs API v1 endpoints are officially documented but not yet implem
|
|
|
| **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/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` | 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) |
|
|
| **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` | 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/: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` | POST | Add a new deploy key | [Link](https://github.com/gogs/docs-api/blob/master/Repositories/Deploy%20Keys.md) |
|