Skip to content

Commit 690dd04

Browse files
authored
Merge pull request #376 from docker/remove-registry-add-file
Update profiles and catalogs docs
2 parents 1b8ff57 + f9b8091 commit 690dd04

File tree

3 files changed

+53
-9
lines changed

3 files changed

+53
-9
lines changed

cmd/docker-mcp/commands/catalog_next.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func createCatalogNextCommand() *cobra.Command {
6161
}
6262

6363
flags := cmd.Flags()
64-
flags.StringArrayVar(&opts.Servers, "server", []string{}, "Server to include specified with a URI: https:// (MCP Registry reference) or docker:// (Docker Image reference) or catalog:// (Catalog reference). Can be specified multiple times.")
64+
flags.StringArrayVar(&opts.Servers, "server", []string{}, "Server to include specified with a URI: https:// (MCP Registry reference) or docker:// (Docker Image reference) or catalog:// (Catalog reference) or file:// (Local file path). Can be specified multiple times.")
6565
flags.StringVar(&opts.FromWorkingSet, "from-profile", "", "Profile ID to create the catalog from")
6666
flags.StringVar(&opts.FromLegacyCatalog, "from-legacy-catalog", "", "Legacy catalog URL to create the catalog from")
6767
flags.StringVar(&opts.Title, "title", "", "Title of the catalog")

cmd/docker-mcp/commands/workingset.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ A profile allows you to organize and manage related servers as a single unit.
142142
Profiles are decoupled from catalogs. Servers can be:
143143
- MCP Registry references (e.g. http://registry.modelcontextprotocol.io/v0/servers/312e45a4-2216-4b21-b9a8-0f1a51425073)
144144
- OCI image references with docker:// prefix (e.g., "docker://my-server:latest"). Images must be self-describing.
145-
- Catalog references with catalog:// prefix (e.g., "catalog://mcp/docker-mcp-catalog/github+obsidian").`,
145+
- Catalog references with catalog:// prefix (e.g., "catalog://mcp/docker-mcp-catalog/github+obsidian").
146+
- Local file references with file:// prefix (e.g., "file://./server.yaml").`,
146147
Example: ` # Create a profile with servers from a catalog
147148
docker mcp profile create --name dev-tools --server catalog://mcp/docker-mcp-catalog/github+obsidian
148149
@@ -169,7 +170,7 @@ Profiles are decoupled from catalogs. Servers can be:
169170
flags := cmd.Flags()
170171
flags.StringVar(&opts.Name, "name", "", "Name of the profile (required)")
171172
flags.StringVar(&opts.ID, "id", "", "ID of the profile (defaults to a slugified version of the name)")
172-
flags.StringArrayVar(&opts.Servers, "server", []string{}, "Server to include specified with a URI: https:// (MCP Registry reference) or docker:// (Docker Image reference) or catalog:// (Catalog reference). Can be specified multiple times.")
173+
flags.StringArrayVar(&opts.Servers, "server", []string{}, "Server to include specified with a URI: https:// (MCP Registry reference) or docker:// (Docker Image reference) or catalog:// (Catalog reference) or file:// (Local file path). Can be specified multiple times.")
173174
flags.StringArrayVar(&opts.Connect, "connect", []string{}, fmt.Sprintf("Clients to connect to: mcp-client (can be specified multiple times). Supported clients: %s", client.GetSupportedMCPClients(*cfg)))
174175
_ = cmd.MarkFlagRequired("name")
175176

@@ -409,7 +410,7 @@ func addServerCommand() *cobra.Command {
409410
}
410411

411412
flags := cmd.Flags()
412-
flags.StringArrayVar(&servers, "server", []string{}, "Server to include specified with a URI: https:// (MCP Registry reference) or docker:// (Docker Image reference) or catalog:// (Catalog reference). Can be specified multiple times.")
413+
flags.StringArrayVar(&servers, "server", []string{}, "Server to include specified with a URI: https:// (MCP Registry reference) or docker:// (Docker Image reference) or catalog:// (Catalog reference) or file:// (Local file path). Can be specified multiple times.")
413414

414415
return cmd
415416
}

docs/profiles.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ A profile is a named collection of MCP servers that can be:
1212
Profiles are decoupled from catalogs, meaning the servers in a profile can come from:
1313
- **MCP Registry references**: HTTP(S) URLs pointing to servers in the Model Context Protocol registry
1414
- **OCI image references**: Docker images with the `docker://` prefix
15+
- **Catalog references**: Servers from existing catalogs with the `catalog://` prefix
16+
- **Local file references**: Server definitions from local YAML or JSON files with the `file://` prefix (see [Server Entry Specification](./server-entry-spec.md) for file format details)
1517

1618
⚠️ **Important Caveat:** MCP Registry references are not fully implemented and are not expected to work yet.
1719

@@ -48,14 +50,25 @@ docker mcp profile create --name dev-tools \
4850
--server docker://my-server:latest \
4951
--server docker://my-other-server:latest
5052

53+
# Create with servers from a catalog
54+
docker mcp profile create --name catalog-servers \
55+
--server catalog://mcp/docker-mcp-catalog/github+slack
56+
5157
# Create with MCP Registry references
5258
docker mcp profile create --name registry-servers \
5359
--server https://registry.modelcontextprotocol.io/v0/servers/71de5a2a-6cfb-4250-a196-f93080ecc860
5460

55-
# Mix MCP Registry and OCI references
61+
# Mix different methods of specifying servers
5662
docker mcp profile create --name mixed \
63+
--server catalog://mcp/docker-mcp-catalog/dockerhub \
5764
--server https://registry.modelcontextprotocol.io/v0/servers/71de5a2a-6cfb-4250-a196-f93080ecc860 \
5865
--server docker://my-server:latest
66+
--server file://./my-server.yaml
67+
68+
# Create with servers from local files
69+
docker mcp profile create --name local-servers \
70+
--server file://./my-server.yaml \
71+
--server file://./another-server.json
5972

6073
# Specify a custom ID (otherwise derived from name)
6174
docker mcp profile create --name "My Servers" --id my-servers \
@@ -69,6 +82,8 @@ docker mcp profile create --name "My Servers" --id my-servers \
6982
- Server references must be either:
7083
- `docker://` prefix for OCI images
7184
- `http://` or `https://` URLs for MCP Registry references
85+
- `catalog://` prefix for catalog references
86+
- `file://` prefix for local YAML or JSON server definition files
7287

7388
### Adding Servers to a Profile
7489

@@ -80,6 +95,10 @@ docker mcp profile server add dev-tools \
8095
--server docker://my-server:latest \
8196
--server docker://my-other-server:latest
8297

98+
# Add servers from a catalog
99+
docker mcp profile server add dev-tools \
100+
--server catalog://mcp/docker-mcp-catalog/github+slack
101+
83102
# Add servers with MCP Registry references
84103
docker mcp profile server add dev-tools \
85104
--server https://registry.modelcontextprotocol.io/v0/servers/71de5a2a-6cfb-4250-a196-f93080ecc860
@@ -89,22 +108,41 @@ docker mcp profile server add dev-tools \
89108
--server https://registry.modelcontextprotocol.io/v0/servers/71de5a2a-6cfb-4250-a196-f93080ecc860 \
90109
--server docker://my-server:latest
91110

92-
# Add servers from a catalog
111+
# Add servers from local files
93112
docker mcp profile server add dev-tools \
94-
--server catalog://mcp/docker-mcp-catalog/github+slack
113+
--server file://./my-server.yaml \
114+
--server file://./another-server.json
95115

96116
# Mix catalog servers with direct server references
97117
docker mcp profile server add dev-tools \
98-
--server catalog://mcp/docker-mcp-catalog/github
118+
--server catalog://mcp/docker-mcp-catalog/github \
99119
--server docker://my-server:latest
100120
```
101121

122+
**Local File Format:**
123+
124+
When using `file://`, the file should contain a server definition in YAML or JSON format:
125+
126+
```yaml
127+
# my-server.yaml
128+
name: my-custom-server
129+
title: My Custom Server
130+
type: server
131+
image: my-org/my-server:latest
132+
description: A custom MCP server
133+
allowHosts:
134+
- api.example.com:443
135+
```
136+
137+
See the [Server Entry Specification](./server-entry-spec.md) for complete file format documentation including configuration schemas, secrets, OAuth, and advanced options.
138+
102139
**Server References:**
103140
- Use `--server` flag for all server references (can be specified multiple times)
104141
- Server references must start with:
105-
- `catalog://` for catalog references. This takes the form of `catalog://<catalog-oci-refence>/<server-1>+<server-2>
142+
- `catalog://` for catalog references. This takes the form of `catalog://<catalog-oci-refence>/<server-1>+<server-2>`
106143
- `docker://` for OCI images
107144
- `http://` or `https://` for MCP Registry URLs
145+
- `file://` for local YAML or JSON server definition files (see [Server Entry Specification](./server-entry-spec.md))
108146
- Catalog servers are referenced by their name within the catalog
109147

110148
**Notes:**
@@ -755,6 +793,8 @@ Error: invalid server value: myserver
755793
**Solution**: Ensure server references use either:
756794
- `docker://` prefix for images
757795
- `http://` or `https://` for registry URLs
796+
- `catalog://` prefix for catalog references
797+
- `file://` prefix for local server definition files
758798

759799
### Conflicting Flags
760800

@@ -911,6 +951,9 @@ docker mcp catalog create dev-catalog --title dev-tools --server catalog://mcp/d
911951
# Create a catalog with your own MCP server
912952
docker mcp catalog create my-catalog --title my-catalog --server docker://my-server:latest
913953
954+
# Create a catalog from a local server definition file
955+
docker mcp catalog create my-catalog --title my-catalog --server file://./my-server.yaml
956+
914957
# List all catalogs
915958
docker mcp catalog list
916959

0 commit comments

Comments
 (0)