Skip to content

Commit 51282d3

Browse files
authored
Merge pull request #202 from docker/add-astro-docs-server
Add remote MCP Servers to registry and add validation check to transport_type
2 parents 4acf73d + c9dac2b commit 51282d3

File tree

157 files changed

+2080
-0
lines changed

Some content is hidden

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

157 files changed

+2080
-0
lines changed

cmd/validate/main.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ func run(name string) error {
5656
if err := isRemoteValid(name); err != nil {
5757
return err
5858
}
59+
60+
if err := isOAuthDynamicValid(name); err != nil {
61+
return err
62+
}
5963

6064
return nil
6165
}
@@ -233,10 +237,41 @@ func isRemoteValid(name string) error {
233237
return fmt.Errorf("remote server must have a transport_type specified")
234238
}
235239

240+
// Validate transport_type is one of the allowed values
241+
validTransports := []string{"stdio", "sse", "streamable-http"}
242+
isValid := false
243+
for _, valid := range validTransports {
244+
if server.Remote.TransportType == valid {
245+
isValid = true
246+
break
247+
}
248+
}
249+
if !isValid {
250+
return fmt.Errorf("remote server transport_type must be one of: stdio, sse, streamable-http (got: %s)", server.Remote.TransportType)
251+
}
252+
236253
fmt.Println("✅ Remote is valid")
237254
return nil
238255
}
239256

257+
// check if servers with OAuth have dynamic tools enabled
258+
func isOAuthDynamicValid(name string) error {
259+
server, err := readServerYaml(name)
260+
if err != nil {
261+
return err
262+
}
263+
264+
// If server has OAuth configuration, it must have dynamic tools enabled
265+
if len(server.OAuth) > 0 {
266+
if server.Dynamic == nil || !server.Dynamic.Tools {
267+
return fmt.Errorf("server with OAuth must have 'dynamic: tools: true' configuration")
268+
}
269+
}
270+
271+
fmt.Println("✅ OAuth dynamic configuration is valid")
272+
return nil
273+
}
274+
240275
func readServerYaml(name string) (servers.Server, error) {
241276
serverYaml, err := os.ReadFile(filepath.Join("servers", name, "server.yaml"))
242277
if err != nil {

pkg/servers/types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,15 @@ import (
2828
"gopkg.in/yaml.v3"
2929
)
3030

31+
type Dynamic struct {
32+
Tools bool `yaml:"tools,omitempty" json:"tools,omitempty"`
33+
}
34+
3135
type Server struct {
3236
Name string `yaml:"name" json:"name"`
3337
Image string `yaml:"image,omitempty" json:"image,omitempty"`
3438
Type string `yaml:"type" json:"type"`
39+
Dynamic *Dynamic `yaml:"dynamic,omitempty" json:"dynamic,omitempty"`
3540
LongLived bool `yaml:"longLived,omitempty" json:"longLived,omitempty"`
3641
Meta Meta `yaml:"meta,omitempty" json:"meta,omitempty"`
3742
About About `yaml:"about,omitempty" json:"about,omitempty"`

servers/apify/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Docs: https://docs.apify.com/platform/integrations/mcp

servers/apify/server.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: apify
2+
type: remote
3+
dynamic:
4+
tools: true
5+
meta:
6+
category: automation
7+
tags:
8+
- automation
9+
- web-scraping
10+
- data-extraction
11+
- remote
12+
about:
13+
title: Apify
14+
description: Web Data Extraction Platform
15+
icon: https://www.google.com/s2/favicons?domain=apify.com&sz=64
16+
remote:
17+
transport_type: streamable-http
18+
url: https://mcp.apify.com
19+
config:
20+
secrets:
21+
- name: apify.api_key
22+
env: APIFY_API_KEY
23+
example: <YOUR_API_KEY>

servers/apify/tools.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

servers/asana/server.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: asana
2+
type: remote
3+
dynamic:
4+
tools: true
5+
meta:
6+
category: productivity
7+
tags:
8+
- productivity
9+
- project-management
10+
- collaboration
11+
- remote
12+
about:
13+
title: Asana
14+
description: Project Management
15+
icon: https://www.google.com/s2/favicons?domain=asana.com&sz=64
16+
remote:
17+
transport_type: sse
18+
url: https://mcp.asana.com/sse
19+
oauth:
20+
- provider: asana

servers/asana/tools.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

servers/astro-docs/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Docs: https://docs.astro.build/en/guides/build-with-ai/

servers/astro-docs/server.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: astro-docs
2+
type: remote
3+
# dynamic:
4+
# tools: true
5+
meta:
6+
category: documentation
7+
tags:
8+
- documentation
9+
- astro
10+
- web-framework
11+
- remote
12+
about:
13+
title: Astro Docs
14+
description: Access the latest Astro web framework documentation, guides, and API references
15+
icon: https://astro.build/favicon.svg
16+
remote:
17+
transport_type: streamable-http
18+
url: https://mcp.docs.astro.build/mcp
19+
source:
20+
project: https://github.com/withastro/docs-mcp

servers/astro-docs/tools.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"name": "search_astro_docs",
4+
"description": "Search the official Astro framework docs",
5+
"arguments": [
6+
{
7+
"name": "query",
8+
"type": "string",
9+
"description": "Search query",
10+
"required": true
11+
}
12+
]
13+
}
14+
]

0 commit comments

Comments
 (0)