This commit is contained in:
seb
2026-10-13 00:36:38 +02:00
parent 2f92199d7f
commit 97540fb745
14 changed files with 1049 additions and 158 deletions

View File

@@ -0,0 +1,21 @@
# `GET /mcp/authorizations`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List active MCP client authorizations
Lists all MCP clients authorized by the authenticated user with token counts and authorization timestamps.
## Response `200`
List of active user authorizations
## Errors
| Status | Description |
|--------|-------------|
| 401 | User not authenticated |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,28 @@
# `DELETE /mcp/authorizations/{clientId}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Revoke MCP client authorizations
Revokes all tokens and authorizations granted to an MCP client by the authenticated user.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `clientId` | yes | string | |
## Response `200`
Authorizations revoked
## Errors
| Status | Description |
|--------|-------------|
| 400 | Missing clientId |
| 401 | User not authenticated |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,35 @@
# `GET /mcp/authorize`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get MCP authorization prompt details
Fetches client information and current user context for the frontend MCP authorization consent screen.
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `client_id` | yes | string | |
| `redirect_uri` | yes | string | |
| `response_type` | no | string | |
| `code_challenge` | no | string | |
| `code_challenge_method` | no | string | |
| `state` | no | string | |
| `scope` | no | string | |
## Response `200`
Client and user consent metadata
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid request or unregistered redirect_uri |
| 401 | User not authenticated |
| 404 | Client not found |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,47 @@
# `POST /mcp/authorize`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Grant or deny MCP client authorization
Issues an OAuth authorization code or refusal for the requesting MCP client on behalf of the authenticated user.
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `client_id` | yes | string | |
| `redirect_uri` | yes | string | |
| `code_challenge` | no | string | |
| `code_challenge_method` | no | string | |
| `state` | no | string | |
| `scope` | no | string | |
| `action` | yes | string | |
```json
{
"client_id": "…",
"redirect_uri": "…",
"code_challenge": "…",
"code_challenge_method": "…",
"state": "…",
"scope": "…",
"action": "allow"
}
```
## Response `200`
Success with redirect URL containing code or error
## Errors
| Status | Description |
|--------|-------------|
| 400 | Invalid request parameters |
| 401 | User not authenticated |
| 404 | Client not found |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `GET /mcp/clients`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List registered MCP clients
Lists all registered OAuth MCP clients.
## Response `200`
List of registered clients
## Errors
| Status | Description |
|--------|-------------|
| 401 | User not authenticated |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,28 @@
# `DELETE /mcp/clients/{clientId}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete registered MCP client
Deletes an MCP client registration.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `clientId` | yes | string | |
## Response `200`
Client deleted
## Errors
| Status | Description |
|--------|-------------|
| 400 | Missing clientId |
| 401 | User not authenticated |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._