You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/backend/api-spec.json
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3638,13 +3638,23 @@
3638
3638
},
3639
3639
"/api/users/me/mcp/client-activity": {
3640
3640
"get": {
3641
-
"summary": "Get current user's active MCP clients",
3641
+
"summary": "Get current user's active MCP clients for a specific team",
3642
3642
"tags": [
3643
3643
"Users",
3644
3644
"MCP"
3645
3645
],
3646
-
"description": "Returns the current user's active MCP clients (VS Code, Cursor, etc.) based on recent activity. This is a PERSONAL dashboard endpoint - users see ONLY their own clients, not their team members' activity.",
3646
+
"description": "Returns the current user's active MCP clients (VS Code, Cursor, etc.) based on recent activity for the specified team. This is a TEAM-AWARE PERSONAL dashboard endpoint - users see ONLY their own clients within the specified team, not their team members' activity. Requires team_id query parameter.",
3647
3647
"parameters": [
3648
+
{
3649
+
"schema": {
3650
+
"type": "string",
3651
+
"minLength": 1
3652
+
},
3653
+
"in": "query",
3654
+
"name": "team_id",
3655
+
"required": true,
3656
+
"description": "Team ID to filter activity by (required for team-aware filtering)"
Copy file name to clipboardExpand all lines: services/backend/src/routes/users/getMcpClientActivity.ts
+14-4Lines changed: 14 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,11 @@ import { requireAuthenticationAny } from '../../middleware/oauthMiddleware';
8
8
constQUERY_PARAMS_SCHEMA={
9
9
type: 'object',
10
10
properties: {
11
+
team_id: {
12
+
type: 'string',
13
+
minLength: 1,
14
+
description: 'Team ID to filter activity by (required for team-aware filtering)'
15
+
},
11
16
limit: {
12
17
type: 'integer',
13
18
minimum: 1,
@@ -29,6 +34,7 @@ const QUERY_PARAMS_SCHEMA = {
29
34
description: 'Show clients active within N minutes (1-1440)'
30
35
}
31
36
},
37
+
required: ['team_id'],
32
38
additionalProperties: false
33
39
}asconst;
34
40
@@ -93,6 +99,7 @@ const ERROR_RESPONSE_SCHEMA = {
93
99
94
100
// TypeScript interfaces
95
101
interfaceQueryParams{
102
+
team_id: string;
96
103
limit?: number;
97
104
offset?: number;
98
105
active_within_minutes?: number;
@@ -147,8 +154,8 @@ export default async function getMcpClientActivityRoute(server: FastifyInstance)
147
154
preValidation: [requireAuthenticationAny()],
148
155
schema: {
149
156
tags: ['Users','MCP'],
150
-
summary: 'Get current user\'s active MCP clients',
151
-
description: 'Returns the current user\'s active MCP clients (VS Code, Cursor, etc.) based on recent activity. This is a PERSONAL dashboard endpoint - users see ONLY their own clients, not their team members\' activity.',
157
+
summary: 'Get current user\'s active MCP clients for a specific team',
158
+
description: 'Returns the current user\'s active MCP clients (VS Code, Cursor, etc.) based on recent activity for the specified team. This is a TEAM-AWARE PERSONAL dashboard endpoint - users see ONLY their own clients within the specified team, not their team members\' activity. Requires team_id query parameter.',
152
159
security: [
153
160
{cookieAuth: []},
154
161
{bearerAuth: []}
@@ -181,27 +188,29 @@ export default async function getMcpClientActivityRoute(server: FastifyInstance)
0 commit comments