Skip to content

fix: include poci servers in catalog-next legacy catalog import#446

Closed
jchangx wants to merge 1 commit intomainfrom
fix/poci-servers-in-catalog-next
Closed

fix: include poci servers in catalog-next legacy catalog import#446
jchangx wants to merge 1 commit intomainfrom
fix/poci-servers-in-catalog-next

Conversation

@jchangx
Copy link
Copy Markdown
Contributor

@jchangx jchangx commented Mar 17, 2026

Summary

  • Bug: When the MCPWorkingSets feature flag is enabled, Docker Desktop uses the catalog-next API path which calls createCatalogFromLegacyCatalog to convert the legacy Docker MCP catalog. This function only handled server (with image) and remote types, silently dropping poci servers like curl, ffmpeg, and docker.
  • Fix: Added poci as a first-class ServerType throughout the catalog-next pipeline: workingset types, catalog-next server struct, DB schema migration, and the legacy catalog import function.
  • Result: Poci servers now appear in the Docker Desktop MCP catalog regardless of whether MCPWorkingSets is enabled.

Changes

pkg/catalog_next/create.go

Added else if server.Type == "poci" branch in createCatalogFromLegacyCatalog:

} else if server.Type == "poci" {
    s := Server{
        Type: workingset.ServerTypePoci,
        Snapshot: &workingset.ServerSnapshot{
            Server: server,
        },
    }
    s.Snapshot.Server.Name = name
    servers = append(servers, s)
}

pkg/workingset/workingset.go

  • Added ServerTypePoci ServerType = "poci" constant
  • Updated Server.Type validation to include poci
  • Added poci handling in ResolveFile for servers without a top-level image

pkg/catalog_next/catalog.go

  • Updated Server.Type validation to accept poci

pkg/db/migrations/007_add_poci_support.up.sql

  • Added poci to the catalog_server.server_type CHECK constraint

Test plan

  • New test TestCreateFromLegacyCatalogWithPociServers verifies poci servers survive the legacy→catalog-next round trip
  • All existing catalog_next, workingset, db, and policy tests pass
  • Manual: enable MCPWorkingSets flag, verify curl/ffmpeg/docker appear in Docker Desktop catalog

How to verify locally

# Run the new test
go test ./pkg/catalog_next/... -run TestCreateFromLegacyCatalogWithPociServers -v

# Run all related tests
go test ./pkg/catalog_next/... ./pkg/workingset/... ./pkg/db/... ./pkg/policy/...

# Build and test with Docker Desktop
make build
# Replace the mcp-gateway binary and restart Docker Desktop
# Enable MCPWorkingSets feature flag
# Verify curl, ffmpeg, docker servers appear in the MCP catalog

🤖 Generated with Claude Code

When converting a legacy catalog to catalog-next format,
`createCatalogFromLegacyCatalog` only handled `server` and `remote`
types, silently dropping `poci` servers (e.g. curl, ffmpeg, docker).
This caused poci servers to disappear from the Docker Desktop catalog
when the MCPWorkingSets feature flag was enabled.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jchangx jchangx requested a review from a team as a code owner March 17, 2026 16:31
@jchangx jchangx closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant