Skip to content

Conversation

@cmrigney
Copy link
Contributor

@cmrigney cmrigney commented Nov 21, 2025

What I did

Implemented a migration path from the existing default registry.yaml, config.yaml, tools.yaml to a default profile.

Migrates when the profiles feature flag is on, only once ever (unless the db is deleted), either when:

  • The gateway is ran with the --profile flag
  • A catalog-next command is run
  • A profile command is run

Once the migration is successful, it moves the legacy files to ~/.docker/mcp/.backup.

Follow up needed: We'll need to migrate remote servers as well once we've implemented remote support in profiles.

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@cmrigney cmrigney requested a review from bobbyhouse November 21, 2025 17:17
@cmrigney cmrigney requested a review from a team as a code owner November 21, 2025 17:17
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

// Only create a default profile if there are existing installed servers
if len(registry.ServerNames()) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question
I think I have been benefiting from a happy accident where I've been able to add/remove Atlassian for example, and then my config just pops back up and keeps working, but I suppose with profiles, since the config is scoped at the server we can't add the config to a server that doesn't exist?

Copy link
Contributor Author

@cmrigney cmrigney Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. That will be one tradeoff with the profiles model. If that becomes a desired "feature" we could brainstorm some ideas.

return &registry, cfg, &tools, &mcpCatalog, nil
}

func deleteLegacyFiles() error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought
Would it be better to archive these in a folder? If we somehow got this wrong and people complained we might be able to recover if we have the original files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I will update this.

_ = os.Remove(catalogIndexPath)
_ = os.Remove(oldCatalogPath)

// We use os.Remove to remove the directory, so only it's only removed if empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit typo in comment "only it's only"

@bobbyhouse
Copy link
Contributor

Question How do we handle client connections that have docker mcp gateway run that are now in the profile/catalog world?

bobbyhouse
bobbyhouse previously approved these changes Nov 21, 2025
@cmrigney
Copy link
Contributor Author

@bobbyhouse Good callout. That is handled here.

docker mcp gateway run will now default to attempting to run the profile with id default

@cmrigney cmrigney merged commit 21f589c into main Nov 21, 2025
8 checks passed
@cmrigney cmrigney deleted the migrate-profiles branch November 21, 2025 22:17
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.

3 participants