diff --git a/cmd/docker-mcp/commands/catalog.go b/cmd/docker-mcp/commands/catalog.go index eb3c20aa..12d83de9 100644 --- a/cmd/docker-mcp/commands/catalog.go +++ b/cmd/docker-mcp/commands/catalog.go @@ -13,12 +13,13 @@ import ( "github.com/docker/mcp-gateway/pkg/yq" ) -func catalogCommand(dockerCli command.Cli) *cobra.Command { +func deprecatedCatalogCommand(dockerCli command.Cli) *cobra.Command { cmd := &cobra.Command{ - Use: "catalog", - Aliases: []string{"catalogs"}, - Short: "Manage MCP server catalogs", - Long: `Manage MCP server catalogs for organizing and configuring custom MCP servers alongside Docker's official catalog.`, + Use: "catalog-deprecated", + Aliases: []string{"catalogs-deprecated"}, + Short: "Deprecated: Manage MCP server catalogs", + Long: `Deprecated: Manage MCP server catalogs for organizing and configuring custom MCP servers alongside Docker's official catalog.`, + Hidden: true, } cmd.AddCommand(bootstrapCatalogCommand()) cmd.AddCommand(importCatalogCommand()) diff --git a/cmd/docker-mcp/commands/catalog_next.go b/cmd/docker-mcp/commands/catalog_next.go index 23162a6f..6b3c2fe6 100644 --- a/cmd/docker-mcp/commands/catalog_next.go +++ b/cmd/docker-mcp/commands/catalog_next.go @@ -13,10 +13,10 @@ import ( "github.com/docker/mcp-gateway/pkg/workingset" ) -func catalogNextCommand() *cobra.Command { +func catalogCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "catalog-next", - Short: "Manage catalogs (next generation)", + Use: "catalog", + Short: "Manage MCP server catalogs", } cmd.AddCommand(createCatalogNextCommand()) diff --git a/cmd/docker-mcp/commands/client.go b/cmd/docker-mcp/commands/client.go index 04bea5a8..13e485ad 100644 --- a/cmd/docker-mcp/commands/client.go +++ b/cmd/docker-mcp/commands/client.go @@ -52,7 +52,7 @@ func connectClientCommand(dockerCli command.Cli, cwd string, cfg client.Config) WorkingSet string } cmd := &cobra.Command{ - Use: fmt.Sprintf("connect [OPTIONS] \n\nSupported clients: %s", strings.Join(client.GetSupportedMCPClients(cfg), " ")), + Use: fmt.Sprintf("connect [OPTIONS] --profile \n\nSupported clients: %s", strings.Join(client.GetSupportedMCPClients(cfg), " ")), Short: fmt.Sprintf("Connect the Docker MCP Toolkit to a client. Supported clients: %s", strings.Join(client.GetSupportedMCPClients(cfg), " ")), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -62,9 +62,8 @@ func connectClientCommand(dockerCli command.Cli, cwd string, cfg client.Config) flags := cmd.Flags() addGlobalFlag(flags, &opts.Global) addQuietFlag(flags, &opts.Quiet) - if isWorkingSetsFeatureEnabled(dockerCli) { - addWorkingSetFlag(flags, &opts.WorkingSet) - } + _ = cmd.MarkFlagRequired(addWorkingSetFlag(flags, &opts.WorkingSet)) + return cmd } @@ -125,6 +124,7 @@ func addQuietFlag(flags *pflag.FlagSet, p *bool) { flags.BoolVarP(p, "quiet", "q", false, "Only display errors.") } -func addWorkingSetFlag(flags *pflag.FlagSet, p *string) { +func addWorkingSetFlag(flags *pflag.FlagSet, p *string) string { flags.StringVarP(p, "profile", "p", "", "Profile to use for client connection.") + return "profile" } diff --git a/cmd/docker-mcp/commands/feature.go b/cmd/docker-mcp/commands/feature.go index c12403e6..b6ea5b9d 100644 --- a/cmd/docker-mcp/commands/feature.go +++ b/cmd/docker-mcp/commands/feature.go @@ -40,7 +40,6 @@ Available features: oauth-interceptor Enable GitHub OAuth flow interception for automatic authentication mcp-oauth-dcr Enable Dynamic Client Registration (DCR) for automatic OAuth client setup dynamic-tools Enable internal MCP management tools (mcp-find, mcp-add, mcp-remove) - profiles Enable profile management (docker mcp profile ) tool-name-prefix Prefix all tool names with server name to avoid conflicts`, Args: cobra.ExactArgs(1), RunE: func(_ *cobra.Command, args []string) error { @@ -48,7 +47,7 @@ Available features: // Validate feature name if !isKnownFeature(featureName) { - 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 )\n tool-name-prefix Prefix all tool names with server name", featureName) + 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) } // Enable the feature @@ -85,11 +84,6 @@ Available features: fmt.Println(" - mcp-add: add MCP servers to the registry and reload configuration") fmt.Println(" - mcp-remove: remove MCP servers from the registry and reload configuration") fmt.Println("\nNo additional flags are needed - this applies to all gateway runs.") - case "profiles": - fmt.Println("\nThis feature enables profile management tools.") - fmt.Println("When enabled, the cli provides commands for managing profiles:") - fmt.Println(" - docker mcp profile ...") - fmt.Println("\nThis also enables the --profile flag for the docker mcp gateway run command.") case "tool-name-prefix": fmt.Println("\nThis feature enables automatic prefixing of tool names with server names.") fmt.Println("When enabled, all tools are automatically prefixed with their server name:") @@ -151,7 +145,7 @@ func featureListCommand(dockerCli command.Cli) *cobra.Command { fmt.Println() // Show all known features - knownFeatures := []string{"oauth-interceptor", "mcp-oauth-dcr", "dynamic-tools", "profiles", "tool-name-prefix"} + knownFeatures := []string{"oauth-interceptor", "mcp-oauth-dcr", "dynamic-tools", "tool-name-prefix"} for _, feature := range knownFeatures { status := "disabled" if isFeatureEnabledFromCli(dockerCli, feature) { @@ -168,8 +162,6 @@ func featureListCommand(dockerCli command.Cli) *cobra.Command { fmt.Printf(" %-20s %s\n", "", "Enable Dynamic Client Registration (DCR) for automatic OAuth client setup") case "dynamic-tools": fmt.Printf(" %-20s %s\n", "", "Enable internal MCP management tools (mcp-find, mcp-add, mcp-remove)") - case "profiles": - fmt.Printf(" %-20s %s\n", "", "Enable profile management tools (docker mcp profile )") case "tool-name-prefix": fmt.Printf(" %-20s %s\n", "", "Prefix all tool names with server name to avoid conflicts") } @@ -240,7 +232,6 @@ func isKnownFeature(feature string) bool { "oauth-interceptor", "mcp-oauth-dcr", "dynamic-tools", - "profiles", "tool-name-prefix", } diff --git a/cmd/docker-mcp/commands/gateway.go b/cmd/docker-mcp/commands/gateway.go index a7be957a..3ab33732 100644 --- a/cmd/docker-mcp/commands/gateway.go +++ b/cmd/docker-mcp/commands/gateway.go @@ -47,11 +47,7 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command } else { // On-host. options = gateway.Config{ - CatalogPath: []string{catalog.DockerCatalogFilename}, - RegistryPath: []string{"registry.yaml"}, - ConfigPath: []string{"config.yaml"}, - ToolsPath: []string{"tools.yaml"}, - SecretsPath: "docker-desktop", + SecretsPath: "docker-desktop", Options: gateway.Options{ Cpus: 1, Memory: "2Gb", @@ -68,6 +64,22 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command Short: "Run the gateway", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, _ []string) error { + if len(options.CatalogPath) == 0 && len(options.RegistryPath) == 0 && len(options.ConfigPath) == 0 && len(options.ToolsPath) == 0 { + // We're in working set mode, so use the default profile if no profile is specified + if options.WorkingSet == "" { + options.WorkingSet = "default" + } + } + + if options.WorkingSet != "" && + (len(options.ServerNames) > 0 || enableAllServers || + len(options.CatalogPath) > 0 || len(options.RegistryPath) > 0 || len(options.ConfigPath) > 0 || len(options.ToolsPath) > 0 || + len(additionalCatalogs) > 0 || len(additionalRegistries) > 0 || len(additionalConfigs) > 0 || len(additionalToolsConfig) > 0 || + len(mcpRegistryUrls) > 0 || len(options.OciRef) > 0 || + options.SecretsPath != "docker-desktop") { + 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") + } + // Check if OAuth interceptor feature is enabled options.OAuthInterceptorEnabled = isOAuthInterceptorFeatureEnabled(dockerCli) @@ -123,15 +135,6 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command options.MCPRegistryServers = mcpServers } - if options.WorkingSet != "" { - if len(options.ServerNames) > 0 { - return fmt.Errorf("cannot use --profile with --servers flag") - } - if enableAllServers { - return fmt.Errorf("cannot use --profile with --enable-all-servers flag") - } - } - // Handle --enable-all-servers flag if enableAllServers { if len(options.ServerNames) > 0 { @@ -169,9 +172,7 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command } runCmd.Flags().StringSliceVar(&options.ServerNames, "servers", nil, "Names of the servers to enable (if non empty, ignore --registry flag)") - if isWorkingSetsFeatureEnabled(dockerCli) { - runCmd.Flags().StringVar(&options.WorkingSet, "profile", "", "Profile ID to use (mutually exclusive with --servers and --enable-all-servers)") - } + 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)") runCmd.Flags().BoolVar(&enableAllServers, "enable-all-servers", false, "Enable all servers in the catalog (instead of using individual --servers options)") runCmd.Flags().StringSliceVar(&options.CatalogPath, "catalog", options.CatalogPath, "Paths to docker catalogs (absolute or relative to ~/.docker/mcp/catalogs/)") 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 { return value == "enabled" } - -// isWorkingSetsFeatureEnabled checks if the profiles feature is enabled -func isWorkingSetsFeatureEnabled(dockerCli command.Cli) bool { - configFile := dockerCli.ConfigFile() - if configFile == nil || configFile.Features == nil { - return false - } - - value, exists := configFile.Features["profiles"] - if !exists { - return false - } - return value == "enabled" -} diff --git a/cmd/docker-mcp/commands/root.go b/cmd/docker-mcp/commands/root.go index 032c59d6..c54cbd7b 100644 --- a/cmd/docker-mcp/commands/root.go +++ b/cmd/docker-mcp/commands/root.go @@ -70,11 +70,9 @@ func Root(ctx context.Context, cwd string, dockerCli command.Cli) *cobra.Command dockerClient := docker.NewClient(dockerCli) - if isWorkingSetsFeatureEnabled(dockerCli) { - cmd.AddCommand(workingSetCommand()) - cmd.AddCommand(catalogNextCommand()) - } - cmd.AddCommand(catalogCommand(dockerCli)) + cmd.AddCommand(workingSetCommand()) + cmd.AddCommand(catalogCommand()) + cmd.AddCommand(deprecatedCatalogCommand(dockerCli)) cmd.AddCommand(clientCommand(dockerCli, cwd)) cmd.AddCommand(configCommand(dockerClient)) cmd.AddCommand(featureCommand(dockerCli)) diff --git a/cmd/docker-mcp/commands/workingset.go b/cmd/docker-mcp/commands/workingset.go index f30576cf..ae69ae73 100644 --- a/cmd/docker-mcp/commands/workingset.go +++ b/cmd/docker-mcp/commands/workingset.go @@ -20,7 +20,7 @@ func workingSetCommand() *cobra.Command { cmd := &cobra.Command{ Use: "profile", - Short: "Manage profiles", + Short: "Manage MCP profiles", } cmd.AddCommand(exportWorkingSetCommand()) diff --git a/docs/catalog.md b/docs/catalog.md index 9cbaa7ff..ceb01383 100644 --- a/docs/catalog.md +++ b/docs/catalog.md @@ -1,5 +1,7 @@ # MCP Catalog Management +*Important note: This method of catalog management is deprecated. Please see [Profiles](profiles.md) for more information on how to use catalogs.* + Docker MCP Gateway provides comprehensive catalog management capabilities, allowing you to create, manage, and use custom MCP server catalogs alongside Docker's official catalog. ## Quick Start with Bootstrap @@ -8,7 +10,7 @@ The easiest way to get started with custom catalogs is to use the `bootstrap` co ```bash # Create a starter catalog with Docker Hub and Docker CLI server examples -docker mcp catalog bootstrap ./my-starter-catalog.yaml +docker mcp catalog-deprecated bootstrap ./my-starter-catalog.yaml # The file now contains properly formatted server definitions you can modify ``` @@ -25,17 +27,17 @@ This creates a YAML file with real server definitions that you can: ```bash # List all configured catalogs -docker mcp catalog ls +docker mcp catalog-deprecated ls # List in JSON format -docker mcp catalog ls --format=json +docker mcp catalog-deprecated ls --format=json ``` ### Creating Catalogs ```bash # Create a new empty catalog -docker mcp catalog create my-custom-catalog +docker mcp catalog-deprecated create my-custom-catalog # The catalog is now ready for adding servers ``` @@ -44,62 +46,62 @@ docker mcp catalog create my-custom-catalog ```bash # Show servers in the default Docker catalog -docker mcp catalog show +docker mcp catalog-deprecated show # Show servers in a specific catalog -docker mcp catalog show my-custom-catalog +docker mcp catalog-deprecated show my-custom-catalog # Show in different formats -docker mcp catalog show docker-mcp --format json -docker mcp catalog show docker-mcp --format yaml +docker mcp catalog-deprecated show docker-mcp --format json +docker mcp catalog-deprecated show docker-mcp --format yaml ``` ### Adding Servers to Catalogs ```bash # Add a server from another catalog file -docker mcp catalog add my-custom-catalog server-name ./source-catalog.yaml +docker mcp catalog-deprecated add my-custom-catalog server-name ./source-catalog.yaml # Force overwrite if server already exists -docker mcp catalog add my-custom-catalog server-name ./source-catalog.yaml --force +docker mcp catalog-deprecated add my-custom-catalog server-name ./source-catalog.yaml --force ``` ### Importing Servers from OSS MCP Community Registry ```bash # replace {id} in the url below -docker mcp catalog import my-custom-catalog --mcp-registry https://registry.modelcontextprotocol.io/v0/servers/{id} +docker mcp catalog-deprecated import my-custom-catalog --mcp-registry https://registry.modelcontextprotocol.io/v0/servers/{id} ``` ### Importing Other Catalogs ```bash # Import a catalog from a local file -docker mcp catalog import ./my-catalog.yaml +docker mcp catalog-deprecated import ./my-catalog.yaml # Import from a URL -docker mcp catalog import https://example.com/catalog.yaml +docker mcp catalog-deprecated import https://example.com/catalog.yaml # Import with an alias -docker mcp catalog import team-servers +docker mcp catalog-deprecated import team-servers ``` ### Exporting Catalogs ```bash # Export a custom catalog to a file -docker mcp catalog export my-custom-catalog ./backup.yaml +docker mcp catalog-deprecated export my-custom-catalog ./backup.yaml # Note: You cannot export Docker's official catalog -docker mcp catalog export docker-mcp ./docker-backup.yaml -# Error: Cannot export the Docker MCP catalog as it is managed by Docker +docker mcp catalog-deprecated export docker-mcp ./docker-backup.yaml +# Error: Cannot export the Docker MCP catalog-deprecated as it is managed by Docker ``` ### Forking Catalogs ```bash # Create a copy of an existing catalog -docker mcp catalog fork docker-mcp my-custom-version +docker mcp catalog-deprecated fork docker-mcp my-custom-version # Now you can modify my-custom-version independently ``` @@ -108,7 +110,7 @@ docker mcp catalog fork docker-mcp my-custom-version ```bash # Remove a custom catalog -docker mcp catalog rm my-custom-catalog +docker mcp catalog-deprecated rm my-custom-catalog # Note: You cannot remove Docker's official catalog ``` @@ -117,17 +119,17 @@ docker mcp catalog rm my-custom-catalog ```bash # Update all catalogs -docker mcp catalog update +docker mcp catalog-deprecated update # Update a specific catalog -docker mcp catalog update my-custom-catalog +docker mcp catalog-deprecated update my-custom-catalog ``` ### Resetting Catalogs ```bash # Remove all custom catalogs and reset to Docker defaults -docker mcp catalog reset +docker mcp catalog-deprecated reset ``` ## Catalog YAML Format @@ -255,13 +257,13 @@ registry: ```bash # 1. Create a starter catalog for reference -docker mcp catalog bootstrap ./starter-catalog.yaml +docker mcp catalog-deprecated bootstrap ./starter-catalog.yaml # 2. Create your own catalog -docker mcp catalog create dev-servers +docker mcp catalog-deprecated create dev-servers # 3. Add useful servers from the starter (optional) -docker mcp catalog add dev-servers dockerhub ./starter-catalog.yaml +docker mcp catalog-deprecated add dev-servers dockerhub ./starter-catalog.yaml # 4. Create a custom server definition file cat > my-server.yaml << EOF @@ -276,35 +278,35 @@ registry: EOF # 5. Add your custom server -docker mcp catalog add dev-servers my-dev-server ./my-server.yaml +docker mcp catalog-deprecated add dev-servers my-dev-server ./my-server.yaml ``` ### Importing from the OSS MCP Community Registry ```bash # 1. Create a destination catalog for your community servers -docker mcp catalog create community-catalog +docker mcp catalog-deprecated create community-catalog # 2. import the OSS MCP community server resource -docker mcp catalog import --mcp-registry http://registry.modelcontextprotocol.io/v0/servers/71de5a2a-6cfb-4250-a196-f93080ecc860 +docker mcp catalog-deprecated import --mcp-registry http://registry.modelcontextprotocol.io/v0/servers/71de5a2a-6cfb-4250-a196-f93080ecc860 # 3. show the imported server -docker mcp catalog show community-catalog --format=json | jq . +docker mcp catalog-deprecated show community-catalog --format=json | jq . ``` ### Team Sharing Workflow ```bash # Team lead: Create and export a team catalog -docker mcp catalog create team-servers -docker mcp catalog add team-servers shared-db ./shared-db-server.yaml -docker mcp catalog add team-servers api-helper ./api-helper-server.yaml -docker mcp catalog export team-servers ./team-catalog.yaml +docker mcp catalog-deprecated create team-servers +docker mcp catalog-deprecated add team-servers shared-db ./shared-db-server.yaml +docker mcp catalog-deprecated add team-servers api-helper ./api-helper-server.yaml +docker mcp catalog-deprecated export team-servers ./team-catalog.yaml # Share team-catalog.yaml with team members # Team members: Import the shared catalog -docker mcp catalog import ./team-catalog.yaml +docker mcp catalog-deprecated import ./team-catalog.yaml docker mcp gateway run ``` @@ -312,30 +314,30 @@ docker mcp gateway run ```bash # 1. Create a test catalog -docker mcp catalog create test-servers +docker mcp catalog-deprecated create test-servers # 2. Add your server for testing -docker mcp catalog add test-servers test-server ./test-server.yaml +docker mcp catalog-deprecated add test-servers test-server ./test-server.yaml # 3. Run gateway with test catalog docker mcp gateway run # 4. When done testing, clean up -docker mcp catalog rm test-servers +docker mcp catalog-deprecated rm test-servers ``` ### Production Deployment ```bash # 1. Create production catalog -docker mcp catalog create prod-servers +docker mcp catalog-deprecated create prod-servers # 2. Add only production-ready servers -docker mcp catalog add prod-servers monitoring ./monitoring-server.yaml -docker mcp catalog add prod-servers logging ./logging-server.yaml +docker mcp catalog-deprecated add prod-servers monitoring ./monitoring-server.yaml +docker mcp catalog-deprecated add prod-servers logging ./logging-server.yaml # 3. Export for backup and deployment -docker mcp catalog export prod-servers ./prod-catalog-backup.yaml +docker mcp catalog-deprecated export prod-servers ./prod-catalog-backup.yaml # 4. Deploy with production catalog docker mcp gateway run @@ -375,7 +377,7 @@ Error: server "server-name" not found in catalog "source.yaml" ### Cannot Export Docker Catalog ```bash -Error: cannot export the Docker MCP catalog as it is managed by Docker +Error: cannot export the Docker MCP catalog-deprecated as it is managed by Docker ``` **Solution**: This is intentional - Docker's catalog cannot be exported. Use `bootstrap` to get Docker server examples instead. diff --git a/docs/mcp-gateway.md b/docs/mcp-gateway.md index 8ea4ee22..9f7af02f 100644 --- a/docs/mcp-gateway.md +++ b/docs/mcp-gateway.md @@ -9,29 +9,23 @@ See [Why running MCP Servers in Container is more secure](security.md) Start up an MCP Gateway. This can be used for one client, or to service multiple clients if using either `sse` or `streaming` transports. ```bash -# Run the MCP gateway (stdio) +# Run with a profile (stdio) +docker mcp gateway run --profile my-profile + +# Run the MCP gateway (stdio) - uses the profile with ID "default" docker mcp gateway run # Run the MCP gateway (streaming) -docker mcp gateway run --port 8080 --transport streaming - -# Run with specific servers only, and select all tools from server1 and just tool2 from server2 -docker mcp gateway run --servers server1,server2 --tools server1:* --tools server2:tool2 - -# Run a fallback secret lookup - lookup desktop secret first and the fallback to a local .env file -docker mcp gateway run --secrets=docker-desktop:./.env +docker mcp gateway run --profile my-profile --port 8080 --transport streaming # Run with verbose logging -docker mcp gateway run --verbose --log-calls +docker mcp gateway run --profile my-profile --verbose --log-calls # Run in watch mode (auto-reload on config changes) -docker mcp gateway run --watch +docker mcp gateway run --profile my-profile --watch # Run a standalone dockerized MCP server (no catalog required) docker mcp gateway run --server docker.io/namespace/repository:latest - -# Run with a profile (requires profiles feature to be enabled) -docker mcp gateway run --profile my-working-set ``` See [Profiles](profiles.md) for more information about organizing servers into reusable collections. @@ -45,7 +39,7 @@ A typical usage looks like this Claude Desktop configuration: "mcpServers": { "MCP_DOCKER": { "command": "docker", - "args": ["mcp", "gateway", "run"] + "args": ["mcp", "gateway", "run", "--profile", "my-profile"] } } } @@ -53,6 +47,8 @@ A typical usage looks like this Claude Desktop configuration: ## How to run the MCP Gateway with Docker Compose? +*Note: This is using a deprecated method of working with the gateway. Profile support in compose is coming soon.* + The simplest way to tun the MCP Gateway with Docker Compose is with this kind of compose file: ``` @@ -61,8 +57,10 @@ services: image: docker/mcp-gateway command: - --servers=duckduckgo + - --catalog=/mcp/catalog.yaml volumes: - /var/run/docker.sock:/var/run/docker.sock + - ./catalog.yaml:/mcp/catalog.yaml ``` ### What does it do? @@ -90,6 +88,7 @@ Docker MCP Toolkit's CLI - Manage your MCP servers and clients. Usage: docker mcp gateway run Flags: + --profile string Profile ID to use (incompatible with --servers, --enable-all-servers, --catalog, --registry, --config, --tools-config, --secrets, --oci-ref, --mcp-registry) --block-network Block tools from accessing forbidden network resources --block-secrets Block secrets from being/received sent to/from tools (default true) --catalog string path to the docker-mcp.yaml catalog (absolute or relative to ~/.docker/mcp/catalogs/) (default "docker-mcp.yaml") @@ -109,11 +108,8 @@ Flags: --verbose Verbose output --verify-signatures Verify signatures of the server images --watch Watch for changes and reconfigure the gateway (default true) - --profile string Profile ID to use (requires working-sets feature, mutually exclusive with --servers and --enable-all-servers) ``` -**Note:** The `--profile` flag is only available when the `profiles` feature is enabled via `docker mcp feature enable profiles`. - ## Troubleshooting Look at our [Troubleshooting Guide](/docs/troubleshooting.md) diff --git a/docs/profiles.md b/docs/profiles.md index 8314c1c7..a8707f7e 100644 --- a/docs/profiles.md +++ b/docs/profiles.md @@ -615,11 +615,11 @@ docker mcp profile pull docker.io/myorg/my-tools:1.1 ```bash # 1. Import Docker's official catalog (or pull from OCI registry) -docker mcp catalog-next create docker-mcp-catalog \ +docker mcp catalog create docker-mcp-catalog \ --from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json # Or pull a team catalog from OCI registry -docker mcp catalog-next pull myorg/team-catalog:latest +docker mcp catalog pull myorg/team-catalog:latest # 2. Create an initial profile docker mcp profile create --name my-workflow @@ -801,7 +801,7 @@ Error: server 'nonexistent' not found in catalog ``` **Solution**: -- Use `docker mcp catalog-next show ` to see available servers in the catalog +- Use `docker mcp catalog show ` to see available servers in the catalog - Check that the server name is spelled correctly (names are case-sensitive) ### Cannot Remove Server @@ -868,36 +868,36 @@ Error: tool 'invalid_tool' not found in server 'github' ## Creating Catalogs from Profiles -The `catalog-next` command allows you to create and share catalogs: +The `catalog` command allows you to create and share catalogs: ```bash # Create a catalog from a working set -docker mcp catalog-next create my-catalog --from-profile my-profile +docker mcp catalog create my-catalog --from-profile my-profile # Create with a custom name -docker mcp catalog-next create my-catalog --from-profile my-profile --name "My Catalog" +docker mcp catalog create my-catalog --from-profile my-profile --name "My Catalog" # Create a catalog from a legacy catalog -docker mcp catalog-next create docker-mcp-catalog --from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json +docker mcp catalog create docker-mcp-catalog --from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json # List all catalogs -docker mcp catalog-next list +docker mcp catalog list # Show catalog details -docker mcp catalog-next show my-catalog +docker mcp catalog show my-catalog # Show a catalog, pulling it if missing (other options include 'never' and 'always') -docker mcp catalog-next show mcp/docker-mcp-catalog --pull missing +docker mcp catalog show mcp/docker-mcp-catalog --pull missing # Remove a catalog -docker mcp catalog-next remove my-catalog +docker mcp catalog remove my-catalog # Push catalog to OCI registry -docker mcp catalog-next tag my-catalog my-org/my-catalog:latest -docker mcp catalog-next push myorg/my-catalog:latest +docker mcp catalog tag my-catalog my-org/my-catalog:latest +docker mcp catalog push myorg/my-catalog:latest # Pull catalog from OCI registry -docker mcp catalog-next pull myorg/my-catalog:latest +docker mcp catalog pull myorg/my-catalog:latest ``` **Key points:** @@ -909,7 +909,7 @@ docker mcp catalog-next pull myorg/my-catalog:latest **💡 Tip:** You can import Docker's official MCP catalog as a starting point: ```bash -docker mcp catalog-next create docker-mcp-catalog \ +docker mcp catalog create docker-mcp-catalog \ --from-legacy-catalog https://desktop.docker.com/mcp/catalog/v3/catalog.json ``` 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/` flag diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 5672ef99..c4299cc8 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -8,7 +8,7 @@ What can you do to pinpoint where the problem comes from? The go to command to start a fresh Gateway, plugged into Docker Desltop's Toolkit is this one: ```console -docker mcp gateway run --verbose --dry-run +docker mcp gateway run --profile my-profile --verbose --dry-run ``` This will show you how the Gateway is reading the configuration, which servers are actually @@ -19,12 +19,6 @@ It'll show you how many tools you have, in aggregate. This is usually a good way to troubleshoot missing images, invalid server names, missing config or secrets... -You can also focus a one given server with: - -```console -docker mcp gateway run --verbose --dry-run --servers=duckduckgo -``` - ## Debug tool calls Full fledge MCP clients might sometimes hide the errors they encounter while calling tools diff --git a/pkg/catalog_next/list.go b/pkg/catalog_next/list.go index ceaba323..2c8d4227 100644 --- a/pkg/catalog_next/list.go +++ b/pkg/catalog_next/list.go @@ -19,7 +19,7 @@ func List(ctx context.Context, dao db.DAO, format workingset.OutputFormat) error } if len(dbCatalogs) == 0 && format == workingset.OutputFormatHumanReadable { - fmt.Println("No catalogs found. Use `docker mcp catalog-next create` or `docker mcp catalog-next pull ` to create a catalog.") + fmt.Println("No catalogs found. Use `docker mcp catalog create` or `docker mcp catalog pull ` to create a catalog.") return nil } diff --git a/pkg/catalog_next/list_test.go b/pkg/catalog_next/list_test.go index 935d8bbc..dbdcfbbd 100644 --- a/pkg/catalog_next/list_test.go +++ b/pkg/catalog_next/list_test.go @@ -41,7 +41,7 @@ func TestListEmpty(t *testing.T) { }) assert.Contains(t, output, "No catalogs found") - assert.Contains(t, output, "docker mcp catalog-next create") + assert.Contains(t, output, "docker mcp catalog create") } func TestListHumanReadable(t *testing.T) { diff --git a/pkg/client/config.go b/pkg/client/config.go index 3cf7833c..5b034be8 100644 --- a/pkg/client/config.go +++ b/pkg/client/config.go @@ -63,8 +63,8 @@ func FindGitProjectRoot(dir string) string { func GetSupportedMCPClients(cfg Config) []string { tmp := map[string]struct{}{ - VendorGordon: {}, - VendorCodex: {}, + // Gordon is not supported for profiles yet + VendorCodex: {}, } for k := range cfg.System { tmp[k] = struct{}{} diff --git a/pkg/client/connect.go b/pkg/client/connect.go index f82d1fc2..e8407679 100644 --- a/pkg/client/connect.go +++ b/pkg/client/connect.go @@ -9,22 +9,17 @@ import ( var ErrCodexOnlySupportsGlobalConfiguration = errors.New("codex only supports global configuration. Re-run with --global or -g") func Connect(ctx context.Context, cwd string, config Config, vendor string, global bool, workingSet string) error { - if vendor == VendorCodex { + switch vendor { + case VendorCodex: if !global { return ErrCodexOnlySupportsGlobalConfiguration } if err := ConnectCodex(ctx, workingSet); err != nil { return err } - } else if vendor == VendorGordon && global { - if workingSet != "" { - // Gordon doesn't support profiles yet - return fmt.Errorf("gordon cannot be connected to a profile") - } - if err := ConnectGordon(ctx); err != nil { - return err - } - } else { + case VendorGordon: + return fmt.Errorf("gordon support for profiles is not yet implemented") + default: updater, err := getUpdater(vendor, global, cwd, config) if err != nil { return err