diff --git a/README.md b/README.md index aa9084be9..3a9875b6a 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,8 @@ docker mcp catalog ls docker mcp catalog show docker-mcp ``` -More about [the MCP Catalog](docs/catalog.md). +* more about [the MCP Catalog](docs/catalog.md). +* more about [importing from the OSS MCP Community Registry](docs/catalog.md#importing-from-the-oss-mcp-community-registry). ### MCP Gateway Operations @@ -106,7 +107,7 @@ Enable and disable the set of MCP servers that will be available for default cli ```bash # List enabled servers -docker mcp server list +docker mcp server ls # Enable one or more servers docker mcp server enable [server-name...] @@ -166,10 +167,10 @@ docker mcp --help docker mcp tools count # List all available MCP tools -docker mcp tools list +docker mcp tools ls # List all available MCP tools in JSON format -docker mcp tools list --format=json +docker mcp tools ls --format=json # Inspect a specific tool docker mcp tools inspect diff --git a/cmd/docker-mcp/catalog/ls.go b/cmd/docker-mcp/catalog/ls.go index c40a0a06e..e9f2b2f5b 100644 --- a/cmd/docker-mcp/catalog/ls.go +++ b/cmd/docker-mcp/catalog/ls.go @@ -9,7 +9,7 @@ import ( "github.com/docker/mcp-gateway/cmd/docker-mcp/internal/telemetry" ) -func Ls(ctx context.Context, outputJSON bool) error { +func Ls(ctx context.Context, format Format) error { // Initialize telemetry telemetry.Init() @@ -25,7 +25,7 @@ func Ls(ctx context.Context, outputJSON bool) error { // Record successful operation telemetry.RecordCatalogOperation(ctx, "ls", "all", float64(duration.Milliseconds()), true) - if outputJSON { + if format == JSON { data, err := json.Marshal(cfg) if err != nil { return err diff --git a/cmd/docker-mcp/commands/catalog.go b/cmd/docker-mcp/commands/catalog.go index 6cfb2b453..f8a7c57ba 100644 --- a/cmd/docker-mcp/commands/catalog.go +++ b/cmd/docker-mcp/commands/catalog.go @@ -58,7 +58,7 @@ command will import servers from the MCP registry URL into that catalog.`, // If mcp-registry flag is provided, import to existing catalog if mcpRegistry != "" { if dryRun { - return runOfficialregistryImport(cmd.Context(), mcpRegistry, nil) + return runMcpregistryImport(cmd.Context(), mcpRegistry, nil) } return importMCPRegistryToCatalog(cmd.Context(), args[0], mcpRegistry) } @@ -87,7 +87,7 @@ cannot be exported as it is managed by Docker.`, func lsCatalogCommand() *cobra.Command { var opts struct { - JSON bool + Format catalog.Format } cmd := &cobra.Command{ Use: "ls", @@ -96,15 +96,15 @@ func lsCatalogCommand() *cobra.Command { Args: cobra.NoArgs, Example: ` # List all catalogs docker mcp catalog ls - + # List catalogs in JSON format - docker mcp catalog ls --json`, + docker mcp catalog ls --format=json`, RunE: func(cmd *cobra.Command, _ []string) error { - return catalog.Ls(cmd.Context(), opts.JSON) + return catalog.Ls(cmd.Context(), opts.Format) }, } flags := cmd.Flags() - flags.BoolVar(&opts.JSON, "json", false, "Print as JSON.") + flags.Var(&opts.Format, "format", fmt.Sprintf("Output format. Supported: %s.", catalog.SupportedFormats())) return cmd } @@ -281,7 +281,7 @@ func importMCPRegistryToCatalog(ctx context.Context, catalogName, mcpRegistryURL // Fetch server from MCP registry var servers []catalogTypes.Server - if err := runOfficialregistryImport(ctx, mcpRegistryURL, &servers); err != nil { + if err := runMcpregistryImport(ctx, mcpRegistryURL, &servers); err != nil { return fmt.Errorf("failed to fetch server from MCP registry: %w", err) } diff --git a/cmd/docker-mcp/commands/feature.go b/cmd/docker-mcp/commands/feature.go index 3f7041073..d049fc294 100644 --- a/cmd/docker-mcp/commands/feature.go +++ b/cmd/docker-mcp/commands/feature.go @@ -118,9 +118,10 @@ func featureDisableCommand(dockerCli command.Cli) *cobra.Command { // featureListCommand creates the `feature list` command func featureListCommand(dockerCli command.Cli) *cobra.Command { return &cobra.Command{ - Use: "list", - Short: "List all available features and their status", - Long: "List all available experimental features and show whether they are enabled or disabled.", + Use: "ls", + Aliases: []string{"list"}, + Short: "List all available features and their status", + Long: "List all available experimental features and show whether they are enabled or disabled.", RunE: func(_ *cobra.Command, _ []string) error { configFile := dockerCli.ConfigFile() diff --git a/cmd/docker-mcp/commands/gateway.go b/cmd/docker-mcp/commands/gateway.go index 706a94631..6f380395d 100644 --- a/cmd/docker-mcp/commands/gateway.go +++ b/cmd/docker-mcp/commands/gateway.go @@ -110,7 +110,7 @@ func gatewayCommand(docker docker.Client, dockerCli command.Cli) *cobra.Command if len(mcpRegistryUrls) > 0 { var mcpServers []catalogTypes.Server for _, registryURL := range mcpRegistryUrls { - if err := runOfficialregistryImport(cmd.Context(), registryURL, &mcpServers); err != nil { + if err := runMcpregistryImport(cmd.Context(), registryURL, &mcpServers); err != nil { return fmt.Errorf("failed to fetch server from MCP registry %s: %w", registryURL, err) } } diff --git a/cmd/docker-mcp/commands/import.go b/cmd/docker-mcp/commands/import.go index 22c963a08..d7f57e840 100644 --- a/cmd/docker-mcp/commands/import.go +++ b/cmd/docker-mcp/commands/import.go @@ -11,7 +11,7 @@ import ( "github.com/docker/mcp-gateway/cmd/docker-mcp/internal/oci" ) -func runOfficialregistryImport(ctx context.Context, serverURL string, servers *[]catalog.Server) error { +func runMcpregistryImport(ctx context.Context, serverURL string, servers *[]catalog.Server) error { // Validate URL parsedURL, err := url.Parse(serverURL) if err != nil { diff --git a/cmd/docker-mcp/commands/officialregistry_test.go b/cmd/docker-mcp/commands/mcpregistry_test.go similarity index 84% rename from cmd/docker-mcp/commands/officialregistry_test.go rename to cmd/docker-mcp/commands/mcpregistry_test.go index 2cf12fbb8..99efe8167 100644 --- a/cmd/docker-mcp/commands/officialregistry_test.go +++ b/cmd/docker-mcp/commands/mcpregistry_test.go @@ -7,7 +7,7 @@ import ( "testing" ) -func TestOfficialregistryImportCommand(t *testing.T) { +func TestMcpregistryImportCommand(t *testing.T) { // Test server that serves the Garmin MCP example JSON testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodGet { @@ -69,29 +69,29 @@ func TestOfficialregistryImportCommand(t *testing.T) { // Test the import function ctx := context.Background() - err := runOfficialregistryImport(ctx, testServer.URL, nil) + err := runMcpregistryImport(ctx, testServer.URL, nil) if err != nil { t.Errorf("Expected no error, got: %v", err) } } -func TestOfficialregistryImportCommand_InvalidURL(t *testing.T) { +func TestMcpregistryImportCommand_InvalidURL(t *testing.T) { ctx := context.Background() // Test invalid URL - err := runOfficialregistryImport(ctx, "not-a-url", nil) + err := runMcpregistryImport(ctx, "not-a-url", nil) if err == nil { t.Error("Expected error for invalid URL, got none") } // Test unsupported scheme - err = runOfficialregistryImport(ctx, "ftp://example.com", nil) + err = runMcpregistryImport(ctx, "ftp://example.com", nil) if err == nil { t.Error("Expected error for unsupported scheme, got none") } } -func TestOfficialregistryImportCommand_HTTPError(t *testing.T) { +func TestMcpregistryImportCommand_HTTPError(t *testing.T) { // Test server that returns 404 testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusNotFound) @@ -99,13 +99,13 @@ func TestOfficialregistryImportCommand_HTTPError(t *testing.T) { defer testServer.Close() ctx := context.Background() - err := runOfficialregistryImport(ctx, testServer.URL, nil) + err := runMcpregistryImport(ctx, testServer.URL, nil) if err == nil { t.Error("Expected error for 404 response, got none") } } -func TestOfficialregistryImportCommand_InvalidJSON(t *testing.T) { +func TestMcpregistryImportCommand_InvalidJSON(t *testing.T) { // Test server that returns invalid JSON testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "application/json") @@ -118,7 +118,7 @@ func TestOfficialregistryImportCommand_InvalidJSON(t *testing.T) { defer testServer.Close() ctx := context.Background() - err := runOfficialregistryImport(ctx, testServer.URL, nil) + err := runMcpregistryImport(ctx, testServer.URL, nil) if err == nil { t.Error("Expected error for invalid JSON, got none") } diff --git a/cmd/docker-mcp/commands/server.go b/cmd/docker-mcp/commands/server.go index 8085db5d6..66a26fed0 100644 --- a/cmd/docker-mcp/commands/server.go +++ b/cmd/docker-mcp/commands/server.go @@ -21,8 +21,8 @@ func serverCommand(docker docker.Client) *cobra.Command { var outputJSON bool lsCommand := &cobra.Command{ - Use: "list", - Aliases: []string{"ls"}, + Use: "ls", + Aliases: []string{"list"}, Short: "List enabled servers", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, _ []string) error { diff --git a/cmd/docker-mcp/commands/tools.go b/cmd/docker-mcp/commands/tools.go index d4f7e4005..e012bc2b3 100644 --- a/cmd/docker-mcp/commands/tools.go +++ b/cmd/docker-mcp/commands/tools.go @@ -25,8 +25,8 @@ func toolsCommand(docker docker.Client) *cobra.Command { cmd.PersistentFlags().StringSliceVar(&gatewayArgs, "gateway-arg", nil, "Additional arguments passed to the gateway") cmd.AddCommand(&cobra.Command{ - Use: "list", - Aliases: []string{"ls"}, + Use: "ls", + Aliases: []string{"list"}, Short: "List tools", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, _ []string) error { diff --git a/cmd/docker-mcp/internal/gateway/dynamic_mcps.go b/cmd/docker-mcp/internal/gateway/dynamic_mcps.go index e3bbd6d6f..117927952 100644 --- a/cmd/docker-mcp/internal/gateway/dynamic_mcps.go +++ b/cmd/docker-mcp/internal/gateway/dynamic_mcps.go @@ -363,17 +363,16 @@ func (g *Gateway) createMcpRemoveTool(_ Configuration, clientConfig *clientConfi } } -// mcpOfficialRegistryImportTool implements a tool for importing servers from official registry URLs -func (g *Gateway) createMcpOfficialRegistryImportTool(configuration Configuration, _ *clientConfig) *ToolRegistration { +func (g *Gateway) createMcpRegistryImportTool(configuration Configuration, _ *clientConfig) *ToolRegistration { tool := &mcp.Tool{ - Name: "mcp-official-registry-import", - Description: "Import MCP servers from an official registry URL. Fetches server definitions via HTTP GET and adds them to the local catalog.", + Name: "mcp-registry-import", + Description: "Import MCP servers from an MCP registry URL. Fetches server definitions via HTTP GET and adds them to the local catalog.", InputSchema: &jsonschema.Schema{ Type: "object", Properties: map[string]*jsonschema.Schema{ "url": { Type: "string", - Description: "URL to fetch the official registry JSON from (must be a valid HTTP/HTTPS URL)", + Description: "URL to fetch the server details JSON (must be a valid HTTP/HTTPS URL)", }, }, Required: []string{"url"}, diff --git a/cmd/docker-mcp/internal/gateway/run.go b/cmd/docker-mcp/internal/gateway/run.go index 333124bb1..1f5bf99e6 100644 --- a/cmd/docker-mcp/internal/gateway/run.go +++ b/cmd/docker-mcp/internal/gateway/run.go @@ -332,10 +332,10 @@ func (g *Gateway) reloadConfiguration(ctx context.Context, configuration Configu g.mcpServer.AddTool(mcpRemoveTool.Tool, mcpRemoveTool.Handler) g.registeredToolNames = append(g.registeredToolNames, mcpRemoveTool.Tool.Name) - // Add mcp-official-registry-import tool - mcpOfficialRegistryImportTool := g.createMcpOfficialRegistryImportTool(configuration, clientConfig) - g.mcpServer.AddTool(mcpOfficialRegistryImportTool.Tool, mcpOfficialRegistryImportTool.Handler) - g.registeredToolNames = append(g.registeredToolNames, mcpOfficialRegistryImportTool.Tool.Name) + // Add mcp-registry-import tool + mcpRegistryImportTool := g.createMcpRegistryImportTool(configuration, clientConfig) + g.mcpServer.AddTool(mcpRegistryImportTool.Tool, mcpRegistryImportTool.Handler) + g.registeredToolNames = append(g.registeredToolNames, mcpRegistryImportTool.Tool.Name) // Add mcp-config-set tool mcpConfigSetTool := g.createMcpConfigSetTool(configuration, clientConfig) @@ -345,7 +345,7 @@ func (g *Gateway) reloadConfiguration(ctx context.Context, configuration Configu log(" > mcp-find: tool for finding MCP servers in the catalog") log(" > mcp-add: tool for adding MCP servers to the registry") log(" > mcp-remove: tool for removing MCP servers from the registry") - log(" > mcp-official-registry-import: tool for importing servers from official registry URLs") + log(" > mcp-registry-import: tool for importing servers from MCP registry URLs") log(" > mcp-config-set: tool for setting configuration values for MCP servers") } diff --git a/cmd/docker-mcp/internal/oci/types_test.go b/cmd/docker-mcp/internal/oci/types_test.go index feadd091d..ff7469260 100644 --- a/cmd/docker-mcp/internal/oci/types_test.go +++ b/cmd/docker-mcp/internal/oci/types_test.go @@ -11,7 +11,7 @@ import ( func TestServerDetailParsing(t *testing.T) { // Read test data from external JSON file - testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "officialregistry", "server_garmin_mcp.json") + testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "mcpregistry", "server_garmin_mcp.json") jsonData, err := os.ReadFile(testDataPath) if err != nil { t.Fatalf("Failed to read test data file %s: %v", testDataPath, err) @@ -109,7 +109,7 @@ func TestServerDetailParsing(t *testing.T) { func TestServerDetailToCatalogServer(t *testing.T) { // Read test data from external JSON file - testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "officialregistry", "server_garmin_mcp.json") + testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "mcpregistry", "server_garmin_mcp.json") jsonData, err := os.ReadFile(testDataPath) if err != nil { t.Fatalf("Failed to read test data file %s: %v", testDataPath, err) @@ -159,7 +159,7 @@ func TestServerDetailToCatalogServer(t *testing.T) { func TestConversionForFileSystem(t *testing.T) { // Read test data from external JSON file - testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "officialregistry", "server_filesystem.json") + testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "mcpregistry", "server_filesystem.json") jsonData, err := os.ReadFile(testDataPath) if err != nil { t.Fatalf("Failed to read test data file %s: %v", testDataPath, err) @@ -343,7 +343,7 @@ func TestConversionForFileSystem(t *testing.T) { func TestBasicServerConversion(t *testing.T) { // Read test data from the basic test JSON file - testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "officialregistry", "server.test.json") + testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "mcpregistry", "server.test.json") jsonData, err := os.ReadFile(testDataPath) if err != nil { t.Fatalf("Failed to read test data file %s: %v", testDataPath, err) @@ -431,7 +431,7 @@ func TestBasicServerConversion(t *testing.T) { func TestRemoteServerConversion(t *testing.T) { // Read test data from remote server JSON file - testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "officialregistry", "server.remote.json") + testDataPath := filepath.Join("..", "..", "..", "..", "test", "testdata", "mcpregistry", "server.remote.json") jsonData, err := os.ReadFile(testDataPath) if err != nil { t.Fatalf("Failed to read test data file %s: %v", testDataPath, err) diff --git a/docs/catalog.md b/docs/catalog.md index 9640a22fc..9cbaa7fff 100644 --- a/docs/catalog.md +++ b/docs/catalog.md @@ -28,7 +28,7 @@ This creates a YAML file with real server definitions that you can: docker mcp catalog ls # List in JSON format -docker mcp catalog ls --json +docker mcp catalog ls --format=json ``` ### Creating Catalogs @@ -64,7 +64,14 @@ docker mcp catalog add my-custom-catalog server-name ./source-catalog.yaml docker mcp catalog add my-custom-catalog server-name ./source-catalog.yaml --force ``` -### Importing Catalogs +### 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} +``` + +### Importing Other Catalogs ```bash # Import a catalog from a local file @@ -272,6 +279,19 @@ EOF docker mcp catalog 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 + +# 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 + +# 3. show the imported server +docker mcp catalog show community-catalog --format=json | jq . +``` + ### Team Sharing Workflow ```bash @@ -285,7 +305,6 @@ docker mcp catalog export team-servers ./team-catalog.yaml # Team members: Import the shared catalog docker mcp catalog import ./team-catalog.yaml -docker mcp feature enable configured-catalogs docker mcp gateway run ``` @@ -319,8 +338,7 @@ docker mcp catalog add prod-servers logging ./logging-server.yaml docker mcp catalog export prod-servers ./prod-catalog-backup.yaml # 4. Deploy with production catalog -docker mcp feature enable configured-catalogs -docker mcp gateway run --use-configured-catalogs +docker mcp gateway run ``` ## Catalog Precedence diff --git a/docs/feature-specs/officialregistry/README.md b/docs/feature-specs/officialregistry/README.md deleted file mode 100644 index d431636f9..000000000 --- a/docs/feature-specs/officialregistry/README.md +++ /dev/null @@ -1,125 +0,0 @@ -# Official Registry Integration - -## Architecture Overview - -This diagram shows the interactions between the core components of the MCP Gateway system: - -```mermaid -graph TB - Client[AI Client] --> Gateway[MCP Gateway] - - subgraph "Gateway Core" - Gateway --> ClientPool[ClientPool] - Gateway --> Config[Configurations] - Gateway --> Interceptor[Interceptors] - Gateway --> Remotes[Remotes] - end - - subgraph "Local MCP Server" - LocalServer[MCP Server
Docker Container] - end - - subgraph "Remote MCP Server" - RemoteServer[Remote MCP Server
HTTP/SSE] - end - - ClientPool --> LocalServer - Remotes --> RemoteServer - - Config --> ClientPool - Config --> Interceptor - Config --> Remotes - - Interceptor --> ClientPool - Interceptor --> Remotes - Interceptor -.->|logs/monitors| LocalServer - Interceptor -.->|logs/monitors| RemoteServer - - Gateway -.->|manages lifecycle| LocalServer - Gateway -.->|manages connections| RemoteServer - - classDef client fill:#e1f5fe - classDef gateway fill:#f3e5f5 - classDef server fill:#e8f5e8 - classDef remote fill:#fff3e0 - - class Client client - class Gateway,ClientPool,Config,Interceptor,Remotes gateway - class LocalServer server - class RemoteServer remote -``` - -## Component Interactions - -### Gateway -- Central orchestrator that receives requests from AI clients -- Manages the lifecycle of MCP servers running in Docker containers -- Routes messages between clients and appropriate servers - -### ClientPool -- Manages connections to multiple MCP servers -- Handles connection pooling and load balancing -- Maintains persistent connections to containerized servers - -### Configurations -- Provides configuration data to ClientPool and Interceptors -- Manages server definitions, transport modes, and security settings -- Loads from catalog files and runtime configuration - -### Interceptors -- Intercept and monitor communication between clients and servers -- Handle logging, security validation, and call inspection -- Can modify or block requests based on policies - -### Remotes -- Manages connections to remote MCP servers via HTTP/SSE -- Handles authentication and custom headers for remote endpoints -- Provides unified interface for both local and remote MCP servers -- Supports load balancing across multiple remote instances - -### MCP Servers -- Run as isolated Docker containers -- Each server provides specific tools and capabilities -- Communicate with the gateway via stdio, SSE, or streaming protocols - -### Remote MCP Servers -- External MCP servers accessible via HTTP/SSE protocols -- Can be hosted anywhere with network connectivity -- Support custom authentication and header configurations -- Integrated seamlessly alongside containerized servers - -# Importing Servers from the Official Registry - -The official registry provides data that can now be imported into a gateway `Configuration`. Previously the entire Configuration was read from files (`FileBasedConfiguration`), but as part of this work, we are also supporting pulling catalogs from oci artifacts. A catalog in an oci artifact becomes just another source of servers for a Gateway `Configuration`. The Configuration Object itself is unchanged. We are providing new ways to populate it. The current gateway Configuration is a set of available servers, and their config. - -* **Configuration.servers** - map of available `catalog.Server`s -* **Configuration.config** - current configuration map - -Since the ways to import servers is increasing, we have started by providing a command to import an Official MCP registry server into an OCI artifact. - -```mermaid -graph LR - Registry[Official MCP Registry] --> Catalog[Catalog OCI artifact] - Catalog --> Gateway[Docker MCP Gateway] -``` - -```bash -docker mcp server import \ - http://registry.modelcontextprotocol.io/v0/servers/50f96447-f833-4bc0-bb47-645c99caa27d \ - jimclark106/mcpservers \ - --push=true -``` - -This will give us an oci artifact reference for our server ( `index.docker.io/jimclark106/mcpservers@sha256:84e31bb356a80731f97cad0addcd53c649bc2f42916854a74884616f90376124`). If you import the same server, you will always get the same digest. this reference can be used to create new working sets out or just passed directly to a gateway for testing. - -``` -docker mcp gateway run --oci-ref index.docker.io/jimclark106/mcpservers@sha256:84e31bb356a80731f97cad0addcd53c649bc2f42916854a74884616f90376124 -``` - -These two steps can be combined. - -``` -docker mcp gateway run --oci-ref $(docker mcp server import http://registry.modelcontextprotocol.io/v0/servers/50f96447-f833-4bc0-bb47-645c99caa27d) -``` - -We think this is probably only useful during testing because gateway will most often see this content as part of larger catalogs that have been created for particular use cases. diff --git a/docs/generator/reference/docker_mcp_catalog_ls.yaml b/docs/generator/reference/docker_mcp_catalog_ls.yaml index 2966b1ca3..19d88c99c 100644 --- a/docs/generator/reference/docker_mcp_catalog_ls.yaml +++ b/docs/generator/reference/docker_mcp_catalog_ls.yaml @@ -6,17 +6,21 @@ usage: docker mcp catalog ls pname: docker mcp catalog plink: docker_mcp_catalog.yaml options: - - option: json - value_type: bool - default_value: "false" - description: Print as JSON. + - option: format + value_type: format + description: 'Output format. Supported: "json", "yaml".' deprecated: false hidden: false experimental: false experimentalcli: false kubernetes: false swarm: false -examples: " # List all catalogs\n docker mcp catalog ls\n \n # List catalogs in JSON format\n docker mcp catalog ls --json" +examples: |4- + # List all catalogs + docker mcp catalog ls + + # List catalogs in JSON format + docker mcp catalog ls --format=json deprecated: false hidden: false experimental: false diff --git a/docs/generator/reference/docker_mcp_feature.yaml b/docs/generator/reference/docker_mcp_feature.yaml index 44f900f1f..5c554f287 100644 --- a/docs/generator/reference/docker_mcp_feature.yaml +++ b/docs/generator/reference/docker_mcp_feature.yaml @@ -10,11 +10,11 @@ plink: docker_mcp.yaml cname: - docker mcp feature disable - docker mcp feature enable - - docker mcp feature list + - docker mcp feature ls clink: - docker_mcp_feature_disable.yaml - docker_mcp_feature_enable.yaml - - docker_mcp_feature_list.yaml + - docker_mcp_feature_ls.yaml deprecated: false hidden: false experimental: false diff --git a/docs/generator/reference/docker_mcp_feature_ls.yaml b/docs/generator/reference/docker_mcp_feature_ls.yaml new file mode 100644 index 000000000..6901df268 --- /dev/null +++ b/docs/generator/reference/docker_mcp_feature_ls.yaml @@ -0,0 +1,15 @@ +command: docker mcp feature ls +aliases: docker mcp feature ls, docker mcp feature list +short: List all available features and their status +long: | + List all available experimental features and show whether they are enabled or disabled. +usage: docker mcp feature ls +pname: docker mcp feature +plink: docker_mcp_feature.yaml +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false + diff --git a/docs/generator/reference/docker_mcp_officialregistry.yaml b/docs/generator/reference/docker_mcp_officialregistry.yaml deleted file mode 100644 index 1cff63112..000000000 --- a/docs/generator/reference/docker_mcp_officialregistry.yaml +++ /dev/null @@ -1,16 +0,0 @@ -command: docker mcp officialregistry -short: Manage official MCP registry operations -long: Commands for importing and managing servers from official MCP registries -pname: docker mcp -plink: docker_mcp.yaml -cname: - - docker mcp officialregistry import -clink: - - docker_mcp_officialregistry_import.yaml -deprecated: false -hidden: true -experimental: false -experimentalcli: false -kubernetes: false -swarm: false - diff --git a/docs/generator/reference/docker_mcp_officialregistry_import.yaml b/docs/generator/reference/docker_mcp_officialregistry_import.yaml deleted file mode 100644 index 6081f3d4f..000000000 --- a/docs/generator/reference/docker_mcp_officialregistry_import.yaml +++ /dev/null @@ -1,20 +0,0 @@ -command: docker mcp officialregistry import -short: Import a server from an official registry URL -long: |- - Import and parse a server definition from an official MCP registry URL. - - This command fetches the server definition from the provided URL, parses it as a ServerDetail, - converts it to the internal Server format, and displays the results. - - Example: - docker mcp officialregistry import https://registry.example.com/servers/my-server -usage: docker mcp officialregistry import -pname: docker mcp officialregistry -plink: docker_mcp_officialregistry.yaml -deprecated: false -hidden: true -experimental: false -experimentalcli: false -kubernetes: false -swarm: false - diff --git a/docs/generator/reference/docker_mcp_server.yaml b/docs/generator/reference/docker_mcp_server.yaml index 075d75349..aa0911ebf 100644 --- a/docs/generator/reference/docker_mcp_server.yaml +++ b/docs/generator/reference/docker_mcp_server.yaml @@ -7,13 +7,13 @@ cname: - docker mcp server disable - docker mcp server enable - docker mcp server inspect - - docker mcp server list + - docker mcp server ls - docker mcp server reset clink: - docker_mcp_server_disable.yaml - docker_mcp_server_enable.yaml - docker_mcp_server_inspect.yaml - - docker_mcp_server_list.yaml + - docker_mcp_server_ls.yaml - docker_mcp_server_reset.yaml deprecated: false hidden: false diff --git a/docs/generator/reference/docker_mcp_server_ls.yaml b/docs/generator/reference/docker_mcp_server_ls.yaml new file mode 100644 index 000000000..52e6c85c2 --- /dev/null +++ b/docs/generator/reference/docker_mcp_server_ls.yaml @@ -0,0 +1,25 @@ +command: docker mcp server ls +aliases: docker mcp server ls, docker mcp server list +short: List enabled servers +long: List enabled servers +usage: docker mcp server ls +pname: docker mcp server +plink: docker_mcp_server.yaml +options: + - option: json + value_type: bool + default_value: "false" + description: Output in JSON format + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false + diff --git a/docs/generator/reference/docker_mcp_tools.yaml b/docs/generator/reference/docker_mcp_tools.yaml index b95ab869a..6696a010c 100644 --- a/docs/generator/reference/docker_mcp_tools.yaml +++ b/docs/generator/reference/docker_mcp_tools.yaml @@ -9,14 +9,14 @@ cname: - docker mcp tools disable - docker mcp tools enable - docker mcp tools inspect - - docker mcp tools list + - docker mcp tools ls clink: - docker_mcp_tools_call.yaml - docker_mcp_tools_count.yaml - docker_mcp_tools_disable.yaml - docker_mcp_tools_enable.yaml - docker_mcp_tools_inspect.yaml - - docker_mcp_tools_list.yaml + - docker_mcp_tools_ls.yaml options: - option: format value_type: string diff --git a/docs/generator/reference/docker_mcp_tools_ls.yaml b/docs/generator/reference/docker_mcp_tools_ls.yaml new file mode 100644 index 000000000..b349ae2b4 --- /dev/null +++ b/docs/generator/reference/docker_mcp_tools_ls.yaml @@ -0,0 +1,55 @@ +command: docker mcp tools ls +aliases: docker mcp tools ls, docker mcp tools list +short: List tools +long: List tools +usage: docker mcp tools ls +pname: docker mcp tools +plink: docker_mcp_tools.yaml +inherited_options: + - option: format + value_type: string + default_value: list + description: Output format (json|list) + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: gateway-arg + value_type: stringSlice + default_value: '[]' + description: Additional arguments passed to the gateway + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: verbose + value_type: bool + default_value: "false" + description: Verbose output + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: version + value_type: string + default_value: "2" + description: Version of the gateway + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false + diff --git a/docs/generator/reference/mcp_catalog_ls.md b/docs/generator/reference/mcp_catalog_ls.md index b134035a4..bfaa5e2a0 100644 --- a/docs/generator/reference/mcp_catalog_ls.md +++ b/docs/generator/reference/mcp_catalog_ls.md @@ -5,9 +5,9 @@ List all configured catalogs including Docker's official catalog and any locally ### Options -| Name | Type | Default | Description | -|:---------|:-------|:--------|:---------------| -| `--json` | `bool` | | Print as JSON. | +| Name | Type | Default | Description | +|:-----------|:---------|:--------|:------------------------------------------| +| `--format` | `format` | | Output format. Supported: "json", "yaml". | diff --git a/docs/generator/reference/mcp_feature.md b/docs/generator/reference/mcp_feature.md index f2c193f79..47ed39e08 100644 --- a/docs/generator/reference/mcp_feature.md +++ b/docs/generator/reference/mcp_feature.md @@ -12,7 +12,7 @@ and control optional functionality that may change in future versions. |:------------------------------------|:---------------------------------------------| | [`disable`](mcp_feature_disable.md) | Disable an experimental feature | | [`enable`](mcp_feature_enable.md) | Enable an experimental feature | -| [`list`](mcp_feature_list.md) | List all available features and their status | +| [`ls`](mcp_feature_ls.md) | List all available features and their status | diff --git a/docs/generator/reference/mcp_feature_ls.md b/docs/generator/reference/mcp_feature_ls.md new file mode 100644 index 000000000..ca26f8d3f --- /dev/null +++ b/docs/generator/reference/mcp_feature_ls.md @@ -0,0 +1,12 @@ +# docker mcp feature ls + + +List all available experimental features and show whether they are enabled or disabled. + +### Aliases + +`docker mcp feature ls`, `docker mcp feature list` + + + + diff --git a/docs/generator/reference/mcp_server.md b/docs/generator/reference/mcp_server.md index 650a995c8..e06050dc7 100644 --- a/docs/generator/reference/mcp_server.md +++ b/docs/generator/reference/mcp_server.md @@ -10,7 +10,7 @@ Manage servers | [`disable`](mcp_server_disable.md) | Disable a server or multiple servers | | [`enable`](mcp_server_enable.md) | Enable a server or multiple servers | | [`inspect`](mcp_server_inspect.md) | Get information about a server or inspect an OCI artifact | -| [`list`](mcp_server_list.md) | List enabled servers | +| [`ls`](mcp_server_ls.md) | List enabled servers | | [`reset`](mcp_server_reset.md) | Disable all the servers | diff --git a/docs/generator/reference/mcp_server_ls.md b/docs/generator/reference/mcp_server_ls.md new file mode 100644 index 000000000..56a0d1210 --- /dev/null +++ b/docs/generator/reference/mcp_server_ls.md @@ -0,0 +1,18 @@ +# docker mcp server ls + + +List enabled servers + +### Aliases + +`docker mcp server ls`, `docker mcp server list` + +### Options + +| Name | Type | Default | Description | +|:---------|:-------|:--------|:----------------------| +| `--json` | `bool` | | Output in JSON format | + + + + diff --git a/docs/generator/reference/mcp_tools.md b/docs/generator/reference/mcp_tools.md index bda97672e..8f1afd8a0 100644 --- a/docs/generator/reference/mcp_tools.md +++ b/docs/generator/reference/mcp_tools.md @@ -12,7 +12,7 @@ Manage tools | [`disable`](mcp_tools_disable.md) | disable one or more tools | | [`enable`](mcp_tools_enable.md) | enable one or more tools | | [`inspect`](mcp_tools_inspect.md) | Inspect a tool | -| [`list`](mcp_tools_list.md) | List tools | +| [`ls`](mcp_tools_ls.md) | List tools | ### Options diff --git a/docs/generator/reference/mcp_tools_ls.md b/docs/generator/reference/mcp_tools_ls.md new file mode 100644 index 000000000..358b11512 --- /dev/null +++ b/docs/generator/reference/mcp_tools_ls.md @@ -0,0 +1,21 @@ +# docker mcp tools ls + + +List tools + +### Aliases + +`docker mcp tools ls`, `docker mcp tools list` + +### Options + +| Name | Type | Default | Description | +|:----------------|:--------------|:--------|:-------------------------------------------| +| `--format` | `string` | `list` | Output format (json\|list) | +| `--gateway-arg` | `stringSlice` | | Additional arguments passed to the gateway | +| `--verbose` | `bool` | | Verbose output | +| `--version` | `string` | `2` | Version of the gateway | + + + + diff --git a/test/testdata/officialregistry/server.remote.json b/test/testdata/mcpregistry/server.remote.json similarity index 100% rename from test/testdata/officialregistry/server.remote.json rename to test/testdata/mcpregistry/server.remote.json diff --git a/test/testdata/officialregistry/server.test.json b/test/testdata/mcpregistry/server.test.json similarity index 100% rename from test/testdata/officialregistry/server.test.json rename to test/testdata/mcpregistry/server.test.json diff --git a/test/testdata/officialregistry/server_cockroach.json b/test/testdata/mcpregistry/server_cockroach.json similarity index 100% rename from test/testdata/officialregistry/server_cockroach.json rename to test/testdata/mcpregistry/server_cockroach.json diff --git a/test/testdata/officialregistry/server_filesystem.json b/test/testdata/mcpregistry/server_filesystem.json similarity index 100% rename from test/testdata/officialregistry/server_filesystem.json rename to test/testdata/mcpregistry/server_filesystem.json diff --git a/test/testdata/officialregistry/server_gadget.json b/test/testdata/mcpregistry/server_gadget.json similarity index 100% rename from test/testdata/officialregistry/server_gadget.json rename to test/testdata/mcpregistry/server_gadget.json diff --git a/test/testdata/officialregistry/server_garmin_mcp.json b/test/testdata/mcpregistry/server_garmin_mcp.json similarity index 100% rename from test/testdata/officialregistry/server_garmin_mcp.json rename to test/testdata/mcpregistry/server_garmin_mcp.json