Skip to content

Commit 79c6a53

Browse files
author
Lasim
committed
feat(backend): add API endpoint to list featured MCP categories
1 parent e035a86 commit 79c6a53

File tree

5 files changed

+467
-6
lines changed

5 files changed

+467
-6
lines changed

services/backend/api-spec.json

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15196,6 +15196,164 @@
1519615196
}
1519715197
}
1519815198
},
15199+
"/api/mcp/categories/featured": {
15200+
"get": {
15201+
"summary": "List categories with featured MCP servers",
15202+
"tags": [
15203+
"MCP Categories"
15204+
],
15205+
"description": "Retrieve all MCP server categories that contain at least one featured global server, including the count of featured servers per category. Requires mcp.servers.read permission.",
15206+
"security": [
15207+
{
15208+
"cookieAuth": []
15209+
}
15210+
],
15211+
"responses": {
15212+
"200": {
15213+
"description": "Featured categories retrieved successfully",
15214+
"content": {
15215+
"application/json": {
15216+
"schema": {
15217+
"type": "object",
15218+
"properties": {
15219+
"success": {
15220+
"type": "boolean",
15221+
"description": "Indicates if the categories were retrieved successfully"
15222+
},
15223+
"data": {
15224+
"type": "array",
15225+
"items": {
15226+
"type": "object",
15227+
"properties": {
15228+
"id": {
15229+
"type": "string",
15230+
"description": "Unique identifier of the category"
15231+
},
15232+
"name": {
15233+
"type": "string",
15234+
"description": "Name of the category"
15235+
},
15236+
"description": {
15237+
"type": "string",
15238+
"nullable": true,
15239+
"description": "Description of the category"
15240+
},
15241+
"icon": {
15242+
"type": "string",
15243+
"nullable": true,
15244+
"description": "Icon identifier for the category"
15245+
},
15246+
"sort_order": {
15247+
"type": "number",
15248+
"description": "Sort order for display"
15249+
},
15250+
"featured_server_count": {
15251+
"type": "number",
15252+
"description": "Number of featured MCP servers in this category"
15253+
}
15254+
},
15255+
"required": [
15256+
"id",
15257+
"name",
15258+
"description",
15259+
"icon",
15260+
"sort_order",
15261+
"featured_server_count"
15262+
]
15263+
},
15264+
"description": "Array of MCP server categories that have featured servers"
15265+
}
15266+
},
15267+
"required": [
15268+
"success",
15269+
"data"
15270+
],
15271+
"description": "Featured categories retrieved successfully"
15272+
}
15273+
}
15274+
}
15275+
},
15276+
"401": {
15277+
"description": "Unauthorized - Authentication required",
15278+
"content": {
15279+
"application/json": {
15280+
"schema": {
15281+
"type": "object",
15282+
"properties": {
15283+
"success": {
15284+
"type": "boolean",
15285+
"default": false,
15286+
"description": "Indicates the operation failed"
15287+
},
15288+
"error": {
15289+
"type": "string",
15290+
"description": "Error message describing what went wrong"
15291+
}
15292+
},
15293+
"required": [
15294+
"success",
15295+
"error"
15296+
],
15297+
"description": "Unauthorized - Authentication required"
15298+
}
15299+
}
15300+
}
15301+
},
15302+
"403": {
15303+
"description": "Forbidden - Insufficient permissions",
15304+
"content": {
15305+
"application/json": {
15306+
"schema": {
15307+
"type": "object",
15308+
"properties": {
15309+
"success": {
15310+
"type": "boolean",
15311+
"default": false,
15312+
"description": "Indicates the operation failed"
15313+
},
15314+
"error": {
15315+
"type": "string",
15316+
"description": "Error message describing what went wrong"
15317+
}
15318+
},
15319+
"required": [
15320+
"success",
15321+
"error"
15322+
],
15323+
"description": "Forbidden - Insufficient permissions"
15324+
}
15325+
}
15326+
}
15327+
},
15328+
"500": {
15329+
"description": "Internal Server Error",
15330+
"content": {
15331+
"application/json": {
15332+
"schema": {
15333+
"type": "object",
15334+
"properties": {
15335+
"success": {
15336+
"type": "boolean",
15337+
"default": false,
15338+
"description": "Indicates the operation failed"
15339+
},
15340+
"error": {
15341+
"type": "string",
15342+
"description": "Error message describing what went wrong"
15343+
}
15344+
},
15345+
"required": [
15346+
"success",
15347+
"error"
15348+
],
15349+
"description": "Internal Server Error"
15350+
}
15351+
}
15352+
}
15353+
}
15354+
}
15355+
}
15356+
},
1519915357
"/api/mcp/categories/{id}": {
1520015358
"put": {
1520115359
"summary": "Update MCP category (Admin only)",

services/backend/api-spec.yaml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10570,6 +10570,118 @@ paths:
1057010570
- success
1057110571
- error
1057210572
description: Internal Server Error
10573+
/api/mcp/categories/featured:
10574+
get:
10575+
summary: List categories with featured MCP servers
10576+
tags:
10577+
- MCP Categories
10578+
description: Retrieve all MCP server categories that contain at least one
10579+
featured global server, including the count of featured servers per
10580+
category. Requires mcp.servers.read permission.
10581+
security:
10582+
- cookieAuth: []
10583+
responses:
10584+
"200":
10585+
description: Featured categories retrieved successfully
10586+
content:
10587+
application/json:
10588+
schema:
10589+
type: object
10590+
properties:
10591+
success:
10592+
type: boolean
10593+
description: Indicates if the categories were retrieved successfully
10594+
data:
10595+
type: array
10596+
items:
10597+
type: object
10598+
properties:
10599+
id:
10600+
type: string
10601+
description: Unique identifier of the category
10602+
name:
10603+
type: string
10604+
description: Name of the category
10605+
description:
10606+
type: string
10607+
nullable: true
10608+
description: Description of the category
10609+
icon:
10610+
type: string
10611+
nullable: true
10612+
description: Icon identifier for the category
10613+
sort_order:
10614+
type: number
10615+
description: Sort order for display
10616+
featured_server_count:
10617+
type: number
10618+
description: Number of featured MCP servers in this category
10619+
required:
10620+
- id
10621+
- name
10622+
- description
10623+
- icon
10624+
- sort_order
10625+
- featured_server_count
10626+
description: Array of MCP server categories that have featured servers
10627+
required:
10628+
- success
10629+
- data
10630+
description: Featured categories retrieved successfully
10631+
"401":
10632+
description: Unauthorized - Authentication required
10633+
content:
10634+
application/json:
10635+
schema:
10636+
type: object
10637+
properties:
10638+
success:
10639+
type: boolean
10640+
default: false
10641+
description: Indicates the operation failed
10642+
error:
10643+
type: string
10644+
description: Error message describing what went wrong
10645+
required:
10646+
- success
10647+
- error
10648+
description: Unauthorized - Authentication required
10649+
"403":
10650+
description: Forbidden - Insufficient permissions
10651+
content:
10652+
application/json:
10653+
schema:
10654+
type: object
10655+
properties:
10656+
success:
10657+
type: boolean
10658+
default: false
10659+
description: Indicates the operation failed
10660+
error:
10661+
type: string
10662+
description: Error message describing what went wrong
10663+
required:
10664+
- success
10665+
- error
10666+
description: Forbidden - Insufficient permissions
10667+
"500":
10668+
description: Internal Server Error
10669+
content:
10670+
application/json:
10671+
schema:
10672+
type: object
10673+
properties:
10674+
success:
10675+
type: boolean
10676+
default: false
10677+
description: Indicates the operation failed
10678+
error:
10679+
type: string
10680+
description: Error message describing what went wrong
10681+
required:
10682+
- success
10683+
- error
10684+
description: Internal Server Error
1057310685
/api/mcp/categories/{id}:
1057410686
put:
1057510687
summary: Update MCP category (Admin only)

0 commit comments

Comments
 (0)