Skip to content

Commit 4ebdb4e

Browse files
authored
Add support for remote MCP servers in registry (#1350)
Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent 2fc9c45 commit 4ebdb4e

File tree

9 files changed

+797
-59
lines changed

9 files changed

+797
-59
lines changed

cmd/regup/app/update_test.go

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -174,37 +174,43 @@ func setupTestRegistryWithMultipleServers(t *testing.T) (string, func()) {
174174
LastUpdated: "2025-06-16T12:00:00Z",
175175
Servers: map[string]*registry.ImageMetadata{
176176
"github": {
177-
Name: "github",
178-
Description: "GitHub MCP server",
179-
Image: "ghcr.io/github/github-mcp-server:latest",
180-
RepositoryURL: "https://github.com/github/github-mcp-server",
181-
Metadata: &registry.Metadata{
182-
Stars: 100,
183-
Pulls: 5000,
184-
LastUpdated: "2025-06-16T12:00:00Z", // Older
177+
BaseServerMetadata: registry.BaseServerMetadata{
178+
Name: "github",
179+
Description: "GitHub MCP server",
180+
RepositoryURL: "https://github.com/github/github-mcp-server",
181+
Metadata: &registry.Metadata{
182+
Stars: 100,
183+
Pulls: 5000,
184+
LastUpdated: "2025-06-16T12:00:00Z", // Older
185+
},
185186
},
187+
Image: "ghcr.io/github/github-mcp-server:latest",
186188
},
187189
"gitlab": {
188-
Name: "gitlab",
189-
Description: "GitLab MCP server",
190-
Image: "mcp/gitlab:latest",
191-
RepositoryURL: "https://github.com/example/gitlab-mcp-server",
192-
Metadata: &registry.Metadata{
193-
Stars: 50,
194-
Pulls: 2000,
195-
LastUpdated: "2025-06-17T12:00:00Z", // Newer
190+
BaseServerMetadata: registry.BaseServerMetadata{
191+
Name: "gitlab",
192+
Description: "GitLab MCP server",
193+
RepositoryURL: "https://github.com/example/gitlab-mcp-server",
194+
Metadata: &registry.Metadata{
195+
Stars: 50,
196+
Pulls: 2000,
197+
LastUpdated: "2025-06-17T12:00:00Z", // Newer
198+
},
196199
},
200+
Image: "mcp/gitlab:latest",
197201
},
198202
"fetch": {
199-
Name: "fetch",
200-
Description: "Fetch MCP server",
201-
Image: "mcp/fetch:latest",
202-
RepositoryURL: "https://github.com/example/fetch-mcp-server",
203-
Metadata: &registry.Metadata{
204-
Stars: 25,
205-
Pulls: 1000,
206-
LastUpdated: "2025-06-15T12:00:00Z", // Oldest
203+
BaseServerMetadata: registry.BaseServerMetadata{
204+
Name: "fetch",
205+
Description: "Fetch MCP server",
206+
RepositoryURL: "https://github.com/example/fetch-mcp-server",
207+
Metadata: &registry.Metadata{
208+
Stars: 25,
209+
Pulls: 1000,
210+
LastUpdated: "2025-06-15T12:00:00Z", // Oldest
211+
},
207212
},
213+
Image: "mcp/fetch:latest",
208214
},
209215
},
210216
}

docs/registry/schema.json

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121
},
2222
"additionalProperties": false
2323
},
24+
"remote_servers": {
25+
"type": "object",
26+
"description": "Collection of remote MCP server entries indexed by server name",
27+
"patternProperties": {
28+
"^[a-z0-9][a-z0-9-]+[a-z0-9]$": {
29+
"$ref": "#/definitions/remote_server"
30+
}
31+
},
32+
"additionalProperties": false
33+
},
2434
"version": {
2535
"type": "string",
2636
"description": "Registry schema version",
@@ -349,6 +359,188 @@
349359
}
350360
},
351361
"additionalProperties": false
362+
},
363+
"header": {
364+
"type": "object",
365+
"description": "HTTP header definition for remote MCP server authentication",
366+
"required": ["name", "description", "required"],
367+
"properties": {
368+
"name": {
369+
"type": "string",
370+
"description": "Header name (e.g., X-API-Key, Authorization)",
371+
"pattern": "^[A-Za-z0-9][A-Za-z0-9-]*$"
372+
},
373+
"description": {
374+
"type": "string",
375+
"description": "Human-readable explanation of the header's purpose",
376+
"minLength": 5,
377+
"maxLength": 200
378+
},
379+
"required": {
380+
"type": "boolean",
381+
"description": "Whether this header is required for the server to function",
382+
"default": false
383+
},
384+
"secret": {
385+
"type": "boolean",
386+
"description": "Whether this header contains sensitive information that should be stored as a secret",
387+
"default": false
388+
},
389+
"default": {
390+
"type": "string",
391+
"description": "Value to use if the header is not explicitly provided (only used for non-required headers)"
392+
},
393+
"choices": {
394+
"type": "array",
395+
"description": "List of valid values for the header",
396+
"items": {
397+
"type": "string"
398+
},
399+
"uniqueItems": true
400+
}
401+
},
402+
"additionalProperties": false
403+
},
404+
"oauth_config": {
405+
"type": "object",
406+
"description": "OAuth/OIDC configuration for remote server authentication",
407+
"properties": {
408+
"issuer": {
409+
"type": "string",
410+
"description": "OAuth/OIDC issuer URL for OIDC discovery",
411+
"format": "uri"
412+
},
413+
"authorize_url": {
414+
"type": "string",
415+
"description": "OAuth authorization endpoint URL (for non-OIDC OAuth)",
416+
"format": "uri"
417+
},
418+
"token_url": {
419+
"type": "string",
420+
"description": "OAuth token endpoint URL (for non-OIDC OAuth)",
421+
"format": "uri"
422+
},
423+
"client_id": {
424+
"type": "string",
425+
"description": "OAuth client ID for authentication"
426+
},
427+
"scopes": {
428+
"type": "array",
429+
"description": "OAuth scopes to request",
430+
"items": {
431+
"type": "string"
432+
}
433+
},
434+
"use_pkce": {
435+
"type": "boolean",
436+
"description": "Whether to use PKCE for the OAuth flow",
437+
"default": true
438+
}
439+
},
440+
"additionalProperties": false
441+
},
442+
"remote_server": {
443+
"type": "object",
444+
"description": "Remote MCP server entry definition accessed via HTTP/HTTPS",
445+
"required": [
446+
"url",
447+
"description",
448+
"status",
449+
"tier",
450+
"tools",
451+
"transport"
452+
],
453+
"properties": {
454+
"name": {
455+
"type": "string",
456+
"description": "Identifier for the remote MCP server (auto-generated from the object key)"
457+
},
458+
"url": {
459+
"type": "string",
460+
"description": "Endpoint URL for the remote MCP server",
461+
"format": "uri",
462+
"examples": [
463+
"https://api.example.com/mcp",
464+
"https://mcp-server.example.com/sse",
465+
"http://localhost:8080/stream"
466+
]
467+
},
468+
"description": {
469+
"type": "string",
470+
"description": "Human-readable description of the server's purpose and functionality",
471+
"minLength": 10,
472+
"maxLength": 500
473+
},
474+
"tier": {
475+
"type": "string",
476+
"description": "Tier classification of the server (Official or Community)",
477+
"enum": ["Official", "Community"]
478+
},
479+
"status": {
480+
"type": "string",
481+
"description": "Current status of the server (Active or Deprecated)",
482+
"enum": ["Active", "Deprecated"]
483+
},
484+
"transport": {
485+
"type": "string",
486+
"description": "Communication transport protocol used by the remote MCP server",
487+
"enum": ["sse", "streamable-http"],
488+
"default": "sse"
489+
},
490+
"tools": {
491+
"type": "array",
492+
"description": "List of tool names provided by this MCP server",
493+
"items": {
494+
"type": "string",
495+
"pattern": "^[\\w-]+$"
496+
},
497+
"minItems": 1,
498+
"uniqueItems": true
499+
},
500+
"headers": {
501+
"type": "array",
502+
"description": "HTTP headers for authentication to the remote server",
503+
"items": {
504+
"$ref": "#/definitions/header"
505+
}
506+
},
507+
"oauth_config": {
508+
"description": "OAuth/OIDC configuration for authentication",
509+
"$ref": "#/definitions/oauth_config"
510+
},
511+
"env_vars": {
512+
"type": "array",
513+
"description": "Environment variables for client-side configuration",
514+
"items": {
515+
"$ref": "#/definitions/environment_variable"
516+
}
517+
},
518+
"metadata": {
519+
"description": "Additional information about the server",
520+
"$ref": "#/definitions/metadata"
521+
},
522+
"repository_url": {
523+
"type": "string",
524+
"description": "URL of the source code repository for the server",
525+
"format": "uri"
526+
},
527+
"tags": {
528+
"type": "array",
529+
"description": "Categorization tags for search and filtering",
530+
"items": {
531+
"type": "string",
532+
"pattern": "^[a-z0-9][a-z0-9_-]+[a-z0-9]$"
533+
},
534+
"minItems": 1,
535+
"uniqueItems": true
536+
},
537+
"custom_metadata": {
538+
"type": "object",
539+
"description": "Custom user-defined metadata for the remote MCP server",
540+
"additionalProperties": true
541+
}
542+
},
543+
"additionalProperties": false
352544
}
353545
}
354546
}

docs/server/docs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/server/swagger.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)