Skip to content

Commit adcd071

Browse files
committed
Release profiles as the default.
1 parent 0185d0a commit adcd071

File tree

12 files changed

+62
-90
lines changed

12 files changed

+62
-90
lines changed

cmd/docker-mcp/commands/catalog.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ import (
1313
"github.com/docker/mcp-gateway/pkg/yq"
1414
)
1515

16-
func catalogCommand(dockerCli command.Cli) *cobra.Command {
16+
func deprecatedCatalogCommand(dockerCli command.Cli) *cobra.Command {
1717
cmd := &cobra.Command{
18-
Use: "catalog",
19-
Aliases: []string{"catalogs"},
20-
Short: "Manage MCP server catalogs",
21-
Long: `Manage MCP server catalogs for organizing and configuring custom MCP servers alongside Docker's official catalog.`,
18+
Use: "catalog-deprecated",
19+
Aliases: []string{"catalogs-deprecated"},
20+
Short: "Deprecated: Manage MCP server catalogs",
21+
Long: `Deprecated: Manage MCP server catalogs for organizing and configuring custom MCP servers alongside Docker's official catalog.`,
22+
Hidden: true,
2223
}
2324
cmd.AddCommand(bootstrapCatalogCommand())
2425
cmd.AddCommand(importCatalogCommand())

cmd/docker-mcp/commands/catalog_next.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
"github.com/docker/mcp-gateway/pkg/workingset"
1414
)
1515

16-
func catalogNextCommand() *cobra.Command {
16+
func catalogCommand() *cobra.Command {
1717
cmd := &cobra.Command{
18-
Use: "catalog-next",
19-
Short: "Manage catalogs (next generation)",
18+
Use: "catalog",
19+
Short: "Manage MCP server catalogs",
2020
}
2121

2222
cmd.AddCommand(createCatalogNextCommand())

cmd/docker-mcp/commands/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func connectClientCommand(dockerCli command.Cli, cwd string, cfg client.Config)
5252
WorkingSet string
5353
}
5454
cmd := &cobra.Command{
55-
Use: fmt.Sprintf("connect [OPTIONS] <mcp-client>\n\nSupported clients: %s", strings.Join(client.GetSupportedMCPClients(cfg), " ")),
55+
Use: fmt.Sprintf("connect [OPTIONS] <mcp-client> --profile <profile-id>\n\nSupported clients: %s", strings.Join(client.GetSupportedMCPClients(cfg), " ")),
5656
Short: fmt.Sprintf("Connect the Docker MCP Toolkit to a client. Supported clients: %s", strings.Join(client.GetSupportedMCPClients(cfg), " ")),
5757
Args: cobra.ExactArgs(1),
5858
RunE: func(cmd *cobra.Command, args []string) error {
@@ -62,9 +62,8 @@ func connectClientCommand(dockerCli command.Cli, cwd string, cfg client.Config)
6262
flags := cmd.Flags()
6363
addGlobalFlag(flags, &opts.Global)
6464
addQuietFlag(flags, &opts.Quiet)
65-
if isWorkingSetsFeatureEnabled(dockerCli) {
66-
addWorkingSetFlag(flags, &opts.WorkingSet)
67-
}
65+
_ = cmd.MarkFlagRequired(addWorkingSetFlag(flags, &opts.WorkingSet))
66+
6867
return cmd
6968
}
7069

@@ -125,6 +124,7 @@ func addQuietFlag(flags *pflag.FlagSet, p *bool) {
125124
flags.BoolVarP(p, "quiet", "q", false, "Only display errors.")
126125
}
127126

128-
func addWorkingSetFlag(flags *pflag.FlagSet, p *string) {
127+
func addWorkingSetFlag(flags *pflag.FlagSet, p *string) string {
129128
flags.StringVarP(p, "profile", "p", "", "Profile to use for client connection.")
129+
return "profile"
130130
}

cmd/docker-mcp/commands/feature.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ Available features:
4040
oauth-interceptor Enable GitHub OAuth flow interception for automatic authentication
4141
mcp-oauth-dcr Enable Dynamic Client Registration (DCR) for automatic OAuth client setup
4242
dynamic-tools Enable internal MCP management tools (mcp-find, mcp-add, mcp-remove)
43-
profiles Enable profile management (docker mcp profile <subcommand>)
4443
tool-name-prefix Prefix all tool names with server name to avoid conflicts`,
4544
Args: cobra.ExactArgs(1),
4645
RunE: func(_ *cobra.Command, args []string) error {
4746
featureName := args[0]
4847

4948
// Validate feature name
5049
if !isKnownFeature(featureName) {
51-
return fmt.Errorf("unknown feature: %s\n\nAvailable features:\n oauth-interceptor Enable GitHub OAuth flow interception\n mcp-oauth-dcr Enable Dynamic Client Registration for automatic OAuth setup\n dynamic-tools Enable internal MCP management tools\n profiles Enable profile management (docker mcp profile <subcommand>)\n tool-name-prefix Prefix all tool names with server name", featureName)
50+
return fmt.Errorf("unknown feature: %s\n\nAvailable features:\n oauth-interceptor Enable GitHub OAuth flow interception\n mcp-oauth-dcr Enable Dynamic Client Registration for automatic OAuth setup\n dynamic-tools Enable internal MCP management tools\n tool-name-prefix Prefix all tool names with server name", featureName)
5251
}
5352

5453
// Enable the feature
@@ -85,11 +84,6 @@ Available features:
8584
fmt.Println(" - mcp-add: add MCP servers to the registry and reload configuration")
8685
fmt.Println(" - mcp-remove: remove MCP servers from the registry and reload configuration")
8786
fmt.Println("\nNo additional flags are needed - this applies to all gateway runs.")
88-
case "profiles":
89-
fmt.Println("\nThis feature enables profile management tools.")
90-
fmt.Println("When enabled, the cli provides commands for managing profiles:")
91-
fmt.Println(" - docker mcp profile <subcommand> ...")
92-
fmt.Println("\nThis also enables the --profile flag for the docker mcp gateway run command.")
9387
case "tool-name-prefix":
9488
fmt.Println("\nThis feature enables automatic prefixing of tool names with server names.")
9589
fmt.Println("When enabled, all tools are automatically prefixed with their server name:")
@@ -151,7 +145,7 @@ func featureListCommand(dockerCli command.Cli) *cobra.Command {
151145
fmt.Println()
152146

153147
// Show all known features
154-
knownFeatures := []string{"oauth-interceptor", "mcp-oauth-dcr", "dynamic-tools", "profiles", "tool-name-prefix"}
148+
knownFeatures := []string{"oauth-interceptor", "mcp-oauth-dcr", "dynamic-tools", "tool-name-prefix"}
155149
for _, feature := range knownFeatures {
156150
status := "disabled"
157151
if isFeatureEnabledFromCli(dockerCli, feature) {
@@ -168,8 +162,6 @@ func featureListCommand(dockerCli command.Cli) *cobra.Command {
168162
fmt.Printf(" %-20s %s\n", "", "Enable Dynamic Client Registration (DCR) for automatic OAuth client setup")
169163
case "dynamic-tools":
170164
fmt.Printf(" %-20s %s\n", "", "Enable internal MCP management tools (mcp-find, mcp-add, mcp-remove)")
171-
case "profiles":
172-
fmt.Printf(" %-20s %s\n", "", "Enable profile management tools (docker mcp profile <subcommand>)")
173165
case "tool-name-prefix":
174166
fmt.Printf(" %-20s %s\n", "", "Prefix all tool names with server name to avoid conflicts")
175167
}
@@ -240,7 +232,6 @@ func isKnownFeature(feature string) bool {
240232
"oauth-interceptor",
241233
"mcp-oauth-dcr",
242234
"dynamic-tools",
243-
"profiles",
244235
"tool-name-prefix",
245236
}
246237

cmd/docker-mcp/commands/gateway.go

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command
4747
} else {
4848
// On-host.
4949
options = gateway.Config{
50-
CatalogPath: []string{catalog.DockerCatalogFilename},
51-
RegistryPath: []string{"registry.yaml"},
52-
ConfigPath: []string{"config.yaml"},
53-
ToolsPath: []string{"tools.yaml"},
54-
SecretsPath: "docker-desktop",
50+
SecretsPath: "docker-desktop",
5551
Options: gateway.Options{
5652
Cpus: 1,
5753
Memory: "2Gb",
@@ -68,6 +64,22 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command
6864
Short: "Run the gateway",
6965
Args: cobra.NoArgs,
7066
RunE: func(cmd *cobra.Command, _ []string) error {
67+
if len(options.CatalogPath) == 0 && len(options.RegistryPath) == 0 && len(options.ConfigPath) == 0 && len(options.ToolsPath) == 0 {
68+
// We're in working set mode, so use the default profile if no profile is specified
69+
if options.WorkingSet == "" {
70+
options.WorkingSet = "default"
71+
}
72+
}
73+
74+
if options.WorkingSet != "" &&
75+
(len(options.ServerNames) > 0 || enableAllServers ||
76+
len(options.CatalogPath) > 0 || len(options.RegistryPath) > 0 || len(options.ConfigPath) > 0 || len(options.ToolsPath) > 0 ||
77+
len(additionalCatalogs) > 0 || len(additionalRegistries) > 0 || len(additionalConfigs) > 0 || len(additionalToolsConfig) > 0 ||
78+
len(mcpRegistryUrls) > 0 || len(options.OciRef) > 0 ||
79+
options.SecretsPath != "docker-desktop") {
80+
return fmt.Errorf("cannot use --profile with --servers, --enable-all-servers, --catalog, --additional-catalog, --registry, --additional-registry, --config, --additional-config, --tools-config, --additional-tools-config, --secrets, --oci-ref, --mcp-registry flags")
81+
}
82+
7183
// Check if OAuth interceptor feature is enabled
7284
options.OAuthInterceptorEnabled = isOAuthInterceptorFeatureEnabled(dockerCli)
7385

@@ -123,15 +135,6 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command
123135
options.MCPRegistryServers = mcpServers
124136
}
125137

126-
if options.WorkingSet != "" {
127-
if len(options.ServerNames) > 0 {
128-
return fmt.Errorf("cannot use --profile with --servers flag")
129-
}
130-
if enableAllServers {
131-
return fmt.Errorf("cannot use --profile with --enable-all-servers flag")
132-
}
133-
}
134-
135138
// Handle --enable-all-servers flag
136139
if enableAllServers {
137140
if len(options.ServerNames) > 0 {
@@ -169,9 +172,7 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command
169172
}
170173

171174
runCmd.Flags().StringSliceVar(&options.ServerNames, "servers", nil, "Names of the servers to enable (if non empty, ignore --registry flag)")
172-
if isWorkingSetsFeatureEnabled(dockerCli) {
173-
runCmd.Flags().StringVar(&options.WorkingSet, "profile", "", "Profile ID to use (mutually exclusive with --servers and --enable-all-servers)")
174-
}
175+
runCmd.Flags().StringVar(&options.WorkingSet, "profile", options.WorkingSet, "Profile ID to use (incompatible with --servers, --enable-all-servers, --catalog, --registry, --config, --tools-config, --secrets, --oci-ref, --mcp-registry)")
175176
runCmd.Flags().BoolVar(&enableAllServers, "enable-all-servers", false, "Enable all servers in the catalog (instead of using individual --servers options)")
176177
runCmd.Flags().StringSliceVar(&options.CatalogPath, "catalog", options.CatalogPath, "Paths to docker catalogs (absolute or relative to ~/.docker/mcp/catalogs/)")
177178
runCmd.Flags().StringSliceVar(&additionalCatalogs, "additional-catalog", nil, "Additional catalog paths to append to the default catalogs")
@@ -345,17 +346,3 @@ func isToolNamePrefixFeatureEnabled(dockerCli command.Cli) bool {
345346

346347
return value == "enabled"
347348
}
348-
349-
// isWorkingSetsFeatureEnabled checks if the profiles feature is enabled
350-
func isWorkingSetsFeatureEnabled(dockerCli command.Cli) bool {
351-
configFile := dockerCli.ConfigFile()
352-
if configFile == nil || configFile.Features == nil {
353-
return false
354-
}
355-
356-
value, exists := configFile.Features["profiles"]
357-
if !exists {
358-
return false
359-
}
360-
return value == "enabled"
361-
}

cmd/docker-mcp/commands/root.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ func Root(ctx context.Context, cwd string, dockerCli command.Cli) *cobra.Command
7070

7171
dockerClient := docker.NewClient(dockerCli)
7272

73-
if isWorkingSetsFeatureEnabled(dockerCli) {
74-
cmd.AddCommand(workingSetCommand())
75-
cmd.AddCommand(catalogNextCommand())
76-
}
77-
cmd.AddCommand(catalogCommand(dockerCli))
73+
cmd.AddCommand(workingSetCommand())
74+
cmd.AddCommand(catalogCommand())
75+
cmd.AddCommand(deprecatedCatalogCommand(dockerCli))
7876
cmd.AddCommand(clientCommand(dockerCli, cwd))
7977
cmd.AddCommand(configCommand(dockerClient))
8078
cmd.AddCommand(featureCommand(dockerCli))

cmd/docker-mcp/commands/workingset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func workingSetCommand() *cobra.Command {
2020

2121
cmd := &cobra.Command{
2222
Use: "profile",
23-
Short: "Manage profiles",
23+
Short: "Manage MCP profiles",
2424
}
2525

2626
cmd.AddCommand(exportWorkingSetCommand())

docs/profiles.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,11 @@ docker mcp profile pull docker.io/myorg/my-tools:1.1
615615

616616
```bash
617617
# 1. Import Docker's official catalog (or pull from OCI registry)
618-
docker mcp catalog-next create docker-mcp-catalog \
618+
docker mcp catalog create docker-mcp-catalog \
619619
--from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json
620620

621621
# Or pull a team catalog from OCI registry
622-
docker mcp catalog-next pull myorg/team-catalog:latest
622+
docker mcp catalog pull myorg/team-catalog:latest
623623

624624
# 2. Create an initial profile
625625
docker mcp profile create --name my-workflow
@@ -801,7 +801,7 @@ Error: server 'nonexistent' not found in catalog
801801
```
802802

803803
**Solution**:
804-
- Use `docker mcp catalog-next show <catalog-name>` to see available servers in the catalog
804+
- Use `docker mcp catalog show <catalog-name>` to see available servers in the catalog
805805
- Check that the server name is spelled correctly (names are case-sensitive)
806806

807807
### Cannot Remove Server
@@ -868,36 +868,36 @@ Error: tool 'invalid_tool' not found in server 'github'
868868

869869
## Creating Catalogs from Profiles
870870

871-
The `catalog-next` command allows you to create and share catalogs:
871+
The `catalog` command allows you to create and share catalogs:
872872

873873
```bash
874874
# Create a catalog from a working set
875-
docker mcp catalog-next create my-catalog --from-profile my-profile
875+
docker mcp catalog create my-catalog --from-profile my-profile
876876

877877
# Create with a custom name
878-
docker mcp catalog-next create my-catalog --from-profile my-profile --name "My Catalog"
878+
docker mcp catalog create my-catalog --from-profile my-profile --name "My Catalog"
879879

880880
# Create a catalog from a legacy catalog
881-
docker mcp catalog-next create docker-mcp-catalog --from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json
881+
docker mcp catalog create docker-mcp-catalog --from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json
882882

883883
# List all catalogs
884-
docker mcp catalog-next list
884+
docker mcp catalog list
885885

886886
# Show catalog details
887-
docker mcp catalog-next show my-catalog
887+
docker mcp catalog show my-catalog
888888

889889
# Show a catalog, pulling it if missing (other options include 'never' and 'always')
890-
docker mcp catalog-next show mcp/docker-mcp-catalog --pull missing
890+
docker mcp catalog show mcp/docker-mcp-catalog --pull missing
891891

892892
# Remove a catalog
893-
docker mcp catalog-next remove my-catalog
893+
docker mcp catalog remove my-catalog
894894

895895
# Push catalog to OCI registry
896-
docker mcp catalog-next tag my-catalog my-org/my-catalog:latest
897-
docker mcp catalog-next push myorg/my-catalog:latest
896+
docker mcp catalog tag my-catalog my-org/my-catalog:latest
897+
docker mcp catalog push myorg/my-catalog:latest
898898

899899
# Pull catalog from OCI registry
900-
docker mcp catalog-next pull myorg/my-catalog:latest
900+
docker mcp catalog pull myorg/my-catalog:latest
901901
```
902902

903903
**Key points:**
@@ -909,7 +909,7 @@ docker mcp catalog-next pull myorg/my-catalog:latest
909909

910910
**💡 Tip:** You can import Docker's official MCP catalog as a starting point:
911911
```bash
912-
docker mcp catalog-next create docker-mcp-catalog \
912+
docker mcp catalog create docker-mcp-catalog \
913913
--from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json
914914
```
915915
This gives you access to Docker's curated collection of MCP servers, which you can then use to build your profiles with the `--server catalog://docker-mcp-catalog/<server>` flag

pkg/catalog_next/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func List(ctx context.Context, dao db.DAO, format workingset.OutputFormat) error
1919
}
2020

2121
if len(dbCatalogs) == 0 && format == workingset.OutputFormatHumanReadable {
22-
fmt.Println("No catalogs found. Use `docker mcp catalog-next create` or `docker mcp catalog-next pull <oci-reference>` to create a catalog.")
22+
fmt.Println("No catalogs found. Use `docker mcp catalog create` or `docker mcp catalog pull <oci-reference>` to create a catalog.")
2323
return nil
2424
}
2525

pkg/catalog_next/list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestListEmpty(t *testing.T) {
4141
})
4242

4343
assert.Contains(t, output, "No catalogs found")
44-
assert.Contains(t, output, "docker mcp catalog-next create")
44+
assert.Contains(t, output, "docker mcp catalog create")
4545
}
4646

4747
func TestListHumanReadable(t *testing.T) {

0 commit comments

Comments
 (0)