Skip to content

Commit fce8128

Browse files
author
Lasim
committed
feat(all): add OAuth authorization step in server installation wizard
1 parent aab785c commit fce8128

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+11743
-997
lines changed

services/backend/api-spec.json

Lines changed: 198 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15469,6 +15469,10 @@
1546915469
"type": "boolean",
1547015470
"description": "Auto-install for new default teams"
1547115471
},
15472+
"requires_oauth": {
15473+
"type": "boolean",
15474+
"description": "Whether this server requires OAuth authentication"
15475+
},
1547215476
"source": {
1547315477
"type": "string",
1547415478
"enum": [
@@ -15517,6 +15521,7 @@
1551715521
"status",
1551815522
"featured",
1551915523
"auto_install_new_default_team",
15524+
"requires_oauth",
1552015525
"created_at",
1552115526
"updated_at"
1552215527
]
@@ -15876,6 +15881,10 @@
1587615881
"type": "boolean",
1587715882
"description": "Auto-install for new default teams"
1587815883
},
15884+
"requires_oauth": {
15885+
"type": "boolean",
15886+
"description": "Whether this server requires OAuth authentication"
15887+
},
1587915888
"source": {
1588015889
"type": "string",
1588115890
"enum": [
@@ -15899,11 +15908,6 @@
1589915908
"format": "date-time",
1590015909
"nullable": true,
1590115910
"description": "Last sync timestamp"
15902-
},
15903-
"github_readme_base64": {
15904-
"type": "string",
15905-
"nullable": true,
15906-
"description": "Base64-encoded GitHub README content"
1590715911
}
1590815912
},
1590915913
"required": [
@@ -15929,6 +15933,7 @@
1592915933
"status",
1593015934
"featured",
1593115935
"auto_install_new_default_team",
15936+
"requires_oauth",
1593215937
"created_at",
1593315938
"updated_at"
1593415939
]
@@ -16033,6 +16038,157 @@
1603316038
}
1603416039
}
1603516040
},
16041+
"/api/mcp/servers/{id}/readme": {
16042+
"get": {
16043+
"summary": "Get MCP server README",
16044+
"tags": [
16045+
"MCP Servers"
16046+
],
16047+
"description": "Retrieve the GitHub README content for a specific MCP server. Returns base64-encoded README data. Access is controlled based on user role and team membership - users can access global servers and their team servers, while global admins can access all servers.",
16048+
"parameters": [
16049+
{
16050+
"schema": {
16051+
"type": "string",
16052+
"minLength": 1
16053+
},
16054+
"in": "path",
16055+
"name": "id",
16056+
"required": true,
16057+
"description": "Server ID is required"
16058+
}
16059+
],
16060+
"security": [
16061+
{
16062+
"cookieAuth": []
16063+
}
16064+
],
16065+
"responses": {
16066+
"200": {
16067+
"description": "README retrieved successfully",
16068+
"content": {
16069+
"application/json": {
16070+
"schema": {
16071+
"type": "object",
16072+
"properties": {
16073+
"success": {
16074+
"type": "boolean",
16075+
"description": "Indicates successful README retrieval"
16076+
},
16077+
"data": {
16078+
"type": "object",
16079+
"properties": {
16080+
"github_readme_base64": {
16081+
"type": "string",
16082+
"nullable": true,
16083+
"description": "Base64-encoded GitHub README content"
16084+
}
16085+
},
16086+
"required": [
16087+
"github_readme_base64"
16088+
],
16089+
"additionalProperties": false
16090+
}
16091+
},
16092+
"required": [
16093+
"success",
16094+
"data"
16095+
],
16096+
"additionalProperties": false,
16097+
"description": "README retrieved successfully"
16098+
}
16099+
}
16100+
}
16101+
},
16102+
"401": {
16103+
"description": "Unauthorized - Authentication required",
16104+
"content": {
16105+
"application/json": {
16106+
"schema": {
16107+
"type": "object",
16108+
"properties": {
16109+
"success": {
16110+
"type": "boolean",
16111+
"default": false,
16112+
"description": "Indicates the operation failed"
16113+
},
16114+
"error": {
16115+
"type": "string",
16116+
"description": "Error message describing what went wrong"
16117+
},
16118+
"details": {
16119+
"description": "Additional error details"
16120+
}
16121+
},
16122+
"required": [
16123+
"success",
16124+
"error"
16125+
],
16126+
"description": "Unauthorized - Authentication required"
16127+
}
16128+
}
16129+
}
16130+
},
16131+
"404": {
16132+
"description": "Not Found - Server not found or access denied",
16133+
"content": {
16134+
"application/json": {
16135+
"schema": {
16136+
"type": "object",
16137+
"properties": {
16138+
"success": {
16139+
"type": "boolean",
16140+
"default": false,
16141+
"description": "Indicates the operation failed"
16142+
},
16143+
"error": {
16144+
"type": "string",
16145+
"description": "Error message describing what went wrong"
16146+
},
16147+
"details": {
16148+
"description": "Additional error details"
16149+
}
16150+
},
16151+
"required": [
16152+
"success",
16153+
"error"
16154+
],
16155+
"description": "Not Found - Server not found or access denied"
16156+
}
16157+
}
16158+
}
16159+
},
16160+
"500": {
16161+
"description": "Internal Server Error",
16162+
"content": {
16163+
"application/json": {
16164+
"schema": {
16165+
"type": "object",
16166+
"properties": {
16167+
"success": {
16168+
"type": "boolean",
16169+
"default": false,
16170+
"description": "Indicates the operation failed"
16171+
},
16172+
"error": {
16173+
"type": "string",
16174+
"description": "Error message describing what went wrong"
16175+
},
16176+
"details": {
16177+
"description": "Additional error details"
16178+
}
16179+
},
16180+
"required": [
16181+
"success",
16182+
"error"
16183+
],
16184+
"description": "Internal Server Error"
16185+
}
16186+
}
16187+
}
16188+
}
16189+
}
16190+
}
16191+
},
1603616192
"/api/mcp/servers/search": {
1603716193
"get": {
1603816194
"summary": "Search MCP servers",
@@ -16390,6 +16546,10 @@
1639016546
"type": "boolean",
1639116547
"description": "Auto-install for new default teams"
1639216548
},
16549+
"requires_oauth": {
16550+
"type": "boolean",
16551+
"description": "Whether this server requires OAuth authentication"
16552+
},
1639316553
"source": {
1639416554
"type": "string",
1639516555
"enum": [
@@ -16438,6 +16598,7 @@
1643816598
"status",
1643916599
"featured",
1644016600
"auto_install_new_default_team",
16601+
"requires_oauth",
1644116602
"created_at",
1644216603
"updated_at"
1644316604
]
@@ -17705,6 +17866,10 @@
1770517866
"auto_install_new_default_team": {
1770617867
"type": "boolean",
1770717868
"description": "Auto-install for new default teams"
17869+
},
17870+
"requires_oauth": {
17871+
"type": "boolean",
17872+
"description": "Whether this server requires OAuth authentication"
1770817873
}
1770917874
},
1771017875
"required": [
@@ -17946,6 +18111,10 @@
1794618111
"type": "boolean",
1794718112
"description": "Auto-install for new default teams"
1794818113
},
18114+
"requires_oauth": {
18115+
"type": "boolean",
18116+
"description": "Whether this server requires OAuth authentication"
18117+
},
1794918118
"source": {
1795018119
"type": "string",
1795118120
"enum": [
@@ -17994,6 +18163,7 @@
1799418163
"status",
1799518164
"featured",
1799618165
"auto_install_new_default_team",
18166+
"requires_oauth",
1799718167
"created_at",
1799818168
"updated_at"
1799918169
]
@@ -18366,6 +18536,10 @@
1836618536
"type": "boolean",
1836718537
"description": "Auto-install for new default teams"
1836818538
},
18539+
"requires_oauth": {
18540+
"type": "boolean",
18541+
"description": "Whether this server requires OAuth authentication"
18542+
},
1836918543
"template_args": {
1837018544
"type": "array",
1837118545
"items": {
@@ -19132,6 +19306,10 @@
1913219306
"type": "boolean",
1913319307
"description": "Auto-install for new default teams"
1913419308
},
19309+
"requires_oauth": {
19310+
"type": "boolean",
19311+
"description": "Whether this server requires OAuth authentication"
19312+
},
1913519313
"source": {
1913619314
"type": "string",
1913719315
"enum": [
@@ -19180,6 +19358,7 @@
1918019358
"status",
1918119359
"featured",
1918219360
"auto_install_new_default_team",
19361+
"requires_oauth",
1918319362
"created_at",
1918419363
"updated_at"
1918519364
]
@@ -23823,6 +24002,10 @@
2382324002
"format": "uri",
2382424003
"description": "OAuth authorization URL to redirect user to for authentication"
2382524004
},
24005+
"requires_authorization": {
24006+
"type": "boolean",
24007+
"description": "Indicates that OAuth authorization is required (always true for this endpoint)"
24008+
},
2382624009
"expires_at": {
2382724010
"type": "string",
2382824011
"format": "date-time",
@@ -23832,6 +24015,7 @@
2383224015
"required": [
2383324016
"installation_id",
2383424017
"authorization_url",
24018+
"requires_authorization",
2383524019
"expires_at"
2383624020
],
2383724021
"description": "OAuth authorization URL generated successfully"
@@ -23972,7 +24156,7 @@
2397224156
}
2397324157
}
2397424158
},
23975-
"/api/api/teams/{teamId}/mcp/installations/{installationId}/oauth/callback": {
24159+
"/api/teams/{teamId}/mcp/installations/{installationId}/oauth/callback": {
2397624160
"get": {
2397724161
"tags": [
2397824162
"MCP Installations",
@@ -32075,6 +32259,14 @@
3207532259
"type": "boolean",
3207632260
"description": "Whether this server is enabled"
3207732261
},
32262+
"requires_oauth": {
32263+
"type": "boolean",
32264+
"description": "Whether this MCP server requires OAuth authentication (Phase 10)"
32265+
},
32266+
"user_id": {
32267+
"type": "string",
32268+
"description": "User ID who created the installation (for OAuth token retrieval, Phase 10)"
32269+
},
3207832270
"secret_metadata": {
3207932271
"type": "object",
3208032272
"properties": {

0 commit comments

Comments
 (0)