Skip to content

Support file:// schema when adding servers#326

Merged
cmrigney merged 4 commits intomainfrom
mcpt-328-support-file-schema
Jan 7, 2026
Merged

Support file:// schema when adding servers#326
cmrigney merged 4 commits intomainfrom
mcpt-328-support-file-schema

Conversation

@cmrigney
Copy link
Copy Markdown
Contributor

@cmrigney cmrigney commented Jan 6, 2026

What I did

Adds support for adding a server from a yaml/json file like so --server file://my-server.yaml. The format of this file can either be a full catalog yaml/json like the one output when you run task catalog -- my-server in mcp-registry, or the file can just be a single server entry directly.

Example

Create duckduckgo.yaml

name: duckduckgo
title: DuckDuckGo
type: server
image: mcp/duckduckgo@sha256:68eb20db6109f5c312a695fc5ec3386ad15d93ffb765a0b4eb1baf4328dec14f
description: A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
allowHosts:
  - html.duckduckgo.com:443

Then create the catalog:

docker mcp catalog-next create duckduckgo-catalog --title "DuckDuckGo Catalog" --server file:///duckduckgo.yaml

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

@cmrigney cmrigney requested a review from a team as a code owner January 6, 2026 21:38
Comment thread pkg/workingset/export.go

var data []byte
if strings.HasSuffix(strings.ToLower(filename), ".yaml") {
if strings.HasSuffix(strings.ToLower(filename), ".yaml") || strings.HasSuffix(strings.ToLower(filename), ".yml") {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just an incidental, but unrelated fix!

Copy link
Copy Markdown
Collaborator

@slimslenderslacks slimslenderslacks left a comment

Choose a reason for hiding this comment

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

this works for adding servers to existing catalogs too, right?

@cmrigney
Copy link
Copy Markdown
Contributor Author

cmrigney commented Jan 7, 2026

@slimslenderslacks yep it should! You just need to compose the right command I believe.

@cmrigney
Copy link
Copy Markdown
Contributor Author

cmrigney commented Jan 7, 2026

So to "add" one to an existing catalog, you'd basically select from the existing catalog on create and add more --servers to it:

docker mcp catalog-next create duckduckgo-catalog --title "DuckDuckGo Catalog" --server catalog://duckduckgo-catalog/duckduckgo --server file:///another-server.yaml

Which makes me think we need to be able to select all from a catalog, e.g. --server catalog://duckduckgo-catalog/*. But that's unrelated to this PR.

@cmrigney cmrigney merged commit 6a284c1 into main Jan 7, 2026
8 checks passed
@cmrigney cmrigney deleted the mcpt-328-support-file-schema branch January 7, 2026 20:16
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.

2 participants