Skip to content

Commit 1d7fb4a

Browse files
author
Lasim
committed
feat(all): added new route for MCP client config
1 parent bce275a commit 1d7fb4a

File tree

27 files changed

+615
-77
lines changed

27 files changed

+615
-77
lines changed

services/backend/api-spec.json

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5273,14 +5273,26 @@
52735273
"clients": {
52745274
"type": "array",
52755275
"items": {
5276-
"type": "string",
5277-
"enum": [
5278-
"claude-desktop",
5279-
"vscode",
5280-
"claude-code"
5281-
]
5276+
"type": "object",
5277+
"properties": {
5278+
"id": {
5279+
"type": "string"
5280+
},
5281+
"name": {
5282+
"type": "string"
5283+
},
5284+
"iconPath": {
5285+
"type": "string"
5286+
}
5287+
},
5288+
"required": [
5289+
"id",
5290+
"name",
5291+
"iconPath"
5292+
],
5293+
"additionalProperties": false
52825294
},
5283-
"description": "List of supported MCP client types"
5295+
"description": "List of supported MCP client types with metadata"
52845296
}
52855297
},
52865298
"required": [
@@ -30764,6 +30776,33 @@
3076430776
"enabled": {
3076530777
"type": "boolean",
3076630778
"description": "Whether this server is enabled"
30779+
},
30780+
"secret_metadata": {
30781+
"type": "object",
30782+
"properties": {
30783+
"query_params": {
30784+
"type": "array",
30785+
"items": {
30786+
"type": "string"
30787+
},
30788+
"description": "Names of query parameters that are secrets (should be masked in logs)"
30789+
},
30790+
"headers": {
30791+
"type": "array",
30792+
"items": {
30793+
"type": "string"
30794+
},
30795+
"description": "Names of headers that are secrets (should be masked in logs)"
30796+
},
30797+
"env": {
30798+
"type": "array",
30799+
"items": {
30800+
"type": "string"
30801+
},
30802+
"description": "Names of environment variables that are secrets (should be masked in logs)"
30803+
}
30804+
},
30805+
"description": "Metadata about which fields contain secrets and should be masked in satellite logs"
3076730806
}
3076830807
},
3076930808
"required": [

services/backend/api-spec.yaml

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3631,12 +3631,20 @@ paths:
36313631
clients:
36323632
type: array
36333633
items:
3634-
type: string
3635-
enum:
3636-
- claude-desktop
3637-
- vscode
3638-
- claude-code
3639-
description: List of supported MCP client types
3634+
type: object
3635+
properties:
3636+
id:
3637+
type: string
3638+
name:
3639+
type: string
3640+
iconPath:
3641+
type: string
3642+
required:
3643+
- id
3644+
- name
3645+
- iconPath
3646+
additionalProperties: false
3647+
description: List of supported MCP client types with metadata
36403648
required:
36413649
- clients
36423650
additionalProperties: false
@@ -21796,6 +21804,28 @@ paths:
2179621804
enabled:
2179721805
type: boolean
2179821806
description: Whether this server is enabled
21807+
secret_metadata:
21808+
type: object
21809+
properties:
21810+
query_params:
21811+
type: array
21812+
items:
21813+
type: string
21814+
description: Names of query parameters that are secrets (should be masked in
21815+
logs)
21816+
headers:
21817+
type: array
21818+
items:
21819+
type: string
21820+
description: Names of headers that are secrets (should be masked in logs)
21821+
env:
21822+
type: array
21823+
items:
21824+
type: string
21825+
description: Names of environment variables that are secrets (should be masked
21826+
in logs)
21827+
description: Metadata about which fields contain secrets and should be masked in
21828+
satellite logs
2179921829
required:
2180021830
- installation_id
2180121831
- team_id

services/backend/src/routes/users/satellite/schemas.ts

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
// Shared schemas for gateway configuration endpoints
22

3-
// Supported MCP client types
4-
// export const CLIENT_TYPES = ['claude-desktop', 'cline', 'vscode', 'cursor', 'windsurf'] as const;
5-
export const CLIENT_TYPES = ['claude-desktop', 'vscode', 'claude-code'] as const;
3+
// Client information with icons
4+
export interface ClientInfo {
5+
id: string;
6+
name: string;
7+
iconPath: string;
8+
}
9+
10+
// Supported MCP client types with icon paths
11+
export const CLIENT_TYPES: readonly ClientInfo[] = [
12+
{ id: 'claude-desktop', name: 'Claude Desktop', iconPath: '/images/provider/claude.svg' },
13+
{ id: 'vscode', name: 'VS Code', iconPath: '/images/provider/vscode.svg' },
14+
{ id: 'claude-code', name: 'Claude Code', iconPath: '/images/provider/claude.svg' },
15+
] as const;
616

7-
export type ClientType = typeof CLIENT_TYPES[number];
17+
// Extract client IDs for validation
18+
export const CLIENT_IDS = CLIENT_TYPES.map(client => client.id);
19+
20+
export type ClientType = typeof CLIENT_IDS[number];
821

922
// Reusable Schema Constants
1023
export const CLIENT_PARAM_SCHEMA = {
1124
type: 'object',
1225
properties: {
1326
client: {
1427
type: 'string',
15-
enum: CLIENT_TYPES,
28+
enum: CLIENT_IDS,
1629
description: 'The MCP client type'
1730
}
1831
},
@@ -91,10 +104,16 @@ export const CLIENTS_LIST_RESPONSE_SCHEMA = {
91104
clients: {
92105
type: 'array',
93106
items: {
94-
type: 'string',
95-
enum: CLIENT_TYPES
107+
type: 'object',
108+
properties: {
109+
id: { type: 'string' },
110+
name: { type: 'string' },
111+
iconPath: { type: 'string' }
112+
},
113+
required: ['id', 'name', 'iconPath'],
114+
additionalProperties: false
96115
},
97-
description: 'List of supported MCP client types'
116+
description: 'List of supported MCP client types with metadata'
98117
}
99118
},
100119
required: ['clients'],
@@ -116,7 +135,7 @@ export interface ClientParams {
116135
}
117136

118137
export interface ClientsListResponse {
119-
clients: readonly string[];
138+
clients: readonly ClientInfo[];
120139
}
121140

122141
export interface ErrorResponse {

services/frontend/public/images/provider/cursor-mcp-install-dark.svg renamed to services/frontend/public/images/add-to/cursor-mcp-install-dark.svg

File renamed without changes.

services/frontend/public/images/provider/cursor-mcp-install-light.svg renamed to services/frontend/public/images/add-to/cursor-mcp-install-light.svg

File renamed without changes.
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)