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
Auto-generate discriminated unions from OpenAPI discriminators
- Add discriminators to OpenAPI spec for transport and Argument types
- Enhance schema generation tool to auto-convert discriminators to allOf with if/then blocks
- Replace manual discriminated union patterns with auto-generated schema
- Ensures schema stays in sync with OpenAPI spec and produces cleaner validation errors
summary: API for discovering and accessing MCP server metadata
8
8
description: |
9
9
Specification for a theoretical REST API that serves up metadata about MCP servers.
10
10
license:
11
11
name: MIT
12
12
identifier: MIT
13
13
14
-
tags:
15
-
- name: servers
16
-
description: Operations for discovering and retrieving MCP servers
17
-
- name: publish
18
-
description: Operations for publishing MCP servers to the registry
19
-
20
14
paths:
21
15
/v0/servers:
22
16
get:
23
-
tags: [servers]
24
17
summary: List MCP servers
25
18
description: Returns a list of all registered MCP servers
26
19
parameters:
@@ -39,28 +32,6 @@ paths:
39
32
required: false
40
33
schema:
41
34
type: integer
42
-
- name: search
43
-
in: query
44
-
description: Search servers by name (substring match)
45
-
required: false
46
-
schema:
47
-
type: string
48
-
example: "filesystem"
49
-
- name: updated_since
50
-
in: query
51
-
description: Filter servers updated since timestamp (RFC3339 datetime)
52
-
required: false
53
-
schema:
54
-
type: string
55
-
format: date-time
56
-
example: "2025-08-07T13:15:04.280Z"
57
-
- name: version
58
-
in: query
59
-
description: Filter by version ('latest' for latest version, or an exact version like '1.2.3')
60
-
required: false
61
-
schema:
62
-
type: string
63
-
example: "1.2.3"
64
35
responses:
65
36
'200':
66
37
description: A list of MCP servers
@@ -70,7 +41,6 @@ paths:
70
41
$ref: '#/components/schemas/ServerList'
71
42
/v0/servers/{serverName}/versions:
72
43
get:
73
-
tags: [servers]
74
44
summary: List all versions of an MCP server
75
45
description: Returns all available versions for a specific MCP server, ordered by publication date (newest first)
76
46
parameters:
@@ -100,7 +70,6 @@ paths:
100
70
example: "Server not found"
101
71
/v0/servers/{serverName}/versions/{version}:
102
72
get:
103
-
tags: [servers]
104
73
summary: Get specific MCP server version
105
74
description: Returns detailed information about a specific version of an MCP server. Use the special version `latest` to get the latest version.
106
75
parameters:
@@ -137,13 +106,12 @@ paths:
137
106
example: "Server not found"
138
107
/v0/publish:
139
108
post:
140
-
tags: [publish]
141
109
summary: Publish MCP server (Optional)
142
110
description: |
143
111
Publish a new MCP server to the registry or update an existing one.
144
-
112
+
145
113
**Note**: This endpoint is optional for registry implementations. Read-only registries may not provide this functionality.
146
-
114
+
147
115
Authentication mechanism is registry-specific and may vary between implementations.
148
116
security:
149
117
- bearerAuth: []
@@ -347,11 +315,17 @@ components:
347
315
description: A hint to help clients determine the appropriate runtime for the package. This field should be provided when `runtimeArguments` are present.
348
316
examples: [npx, uvx, docker, dnx]
349
317
transport:
350
-
anyOf:
318
+
description: Transport protocol configuration for the package
description: Transport protocol configuration for the package
355
329
runtimeArguments:
356
330
type: array
357
331
description: A list of arguments to be passed to the package's runtime command (such as docker or npx). The `runtimeHint` field should be provided when `runtimeArguments` are present.
@@ -478,7 +452,12 @@ components:
478
452
479
453
Argument:
480
454
description: "Warning: Arguments construct command-line parameters that may contain user-provided input. This creates potential command injection risks if clients execute commands in a shell environment. For example, a malicious argument value like ';rm -rf ~/Development' could execute dangerous commands. Clients should prefer non-shell execution methods (e.g., posix_spawn) when possible to eliminate injection risks entirely. Where not possible, clients should obtain consent from users or agents to run the resolved command before execution."
"description": "Warning: Arguments construct command-line parameters that may contain user-provided input. This creates potential command injection risks if clients execute commands in a shell environment. For example, a malicious argument value like ';rm -rf ~/Development' could execute dangerous commands. Clients should prefer non-shell execution methods (e.g., posix_spawn) when possible to eliminate injection risks entirely. Where not possible, clients should obtain consent from users or agents to run the resolved command before execution.",
35
+
"properties": {
36
+
"type": {
37
+
"enum": [
38
+
"positional",
39
+
"named"
40
+
],
41
+
"type": "string"
14
42
}
43
+
},
44
+
"required": [
45
+
"type"
15
46
],
16
-
"description": "Warning: Arguments construct command-line parameters that may contain user-provided input. This creates potential command injection risks if clients execute commands in a shell environment. For example, a malicious argument value like ';rm -rf ~/Development' could execute dangerous commands. Clients should prefer non-shell execution methods (e.g., posix_spawn) when possible to eliminate injection risks entirely. Where not possible, clients should obtain consent from users or agents to run the resolved command before execution."
47
+
"type": "object"
17
48
},
18
49
"Icon": {
19
50
"description": "An optionally-sized icon that can be displayed in a user interface.",
@@ -262,18 +293,59 @@
262
293
"type": "string"
263
294
},
264
295
"transport": {
265
-
"anyOf": [
296
+
"allOf": [
266
297
{
267
-
"$ref": "#/definitions/StdioTransport"
298
+
"if": {
299
+
"properties": {
300
+
"type": {
301
+
"const": "stdio"
302
+
}
303
+
}
304
+
},
305
+
"then": {
306
+
"$ref": "#/definitions/StdioTransport"
307
+
}
268
308
},
269
309
{
270
-
"$ref": "#/definitions/StreamableHttpTransport"
310
+
"if": {
311
+
"properties": {
312
+
"type": {
313
+
"const": "streamable-http"
314
+
}
315
+
}
316
+
},
317
+
"then": {
318
+
"$ref": "#/definitions/StreamableHttpTransport"
319
+
}
271
320
},
272
321
{
273
-
"$ref": "#/definitions/SseTransport"
322
+
"if": {
323
+
"properties": {
324
+
"type": {
325
+
"const": "sse"
326
+
}
327
+
}
328
+
},
329
+
"then": {
330
+
"$ref": "#/definitions/SseTransport"
331
+
}
274
332
}
275
333
],
276
-
"description": "Transport protocol configuration for the package"
334
+
"description": "Transport protocol configuration for the package",
335
+
"properties": {
336
+
"type": {
337
+
"enum": [
338
+
"stdio",
339
+
"streamable-http",
340
+
"sse"
341
+
],
342
+
"type": "string"
343
+
}
344
+
},
345
+
"required": [
346
+
"type"
347
+
],
348
+
"type": "object"
277
349
},
278
350
"version": {
279
351
"description": "Package version. Must be a specific version. Version ranges are rejected (e.g., '^1.2.3', '~1.2.3', '\u003e=1.2.3', '1.x', '1.*').",
@@ -373,7 +445,7 @@
373
445
"properties": {
374
446
"$schema": {
375
447
"description": "JSON Schema URI for this server.json format",
0 commit comments