Skip to content

Conversation

@bobbyhouse
Copy link
Contributor

@bobbyhouse bobbyhouse commented Oct 30, 2025

What I did
Add ability to search across all working sets to return a list of servers grouped by working set id.

For example
docker mcp workingset servers --filter test --workingset test-set

Would return

{
"id": 'test-set',
"servers":[{
    "type": "image"
    "image": "roberthouse224/test-set
  }]
}
Screenshot 2025-10-30 at 2 21 36 PM

Add ability to search across all working sets to return a list of
servers grouped by working set id.
@bobbyhouse bobbyhouse requested a review from a team as a code owner October 30, 2025 20:31
Copy link
Contributor

@cmrigney cmrigney left a comment

Choose a reason for hiding this comment

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

lgtm. One minor nit, but not a blocker.

Comment on lines +143 to +149
WHERE ($1 = '' OR id = $1)
AND ($2 = '' OR EXISTS (
SELECT 1
FROM json_each(servers)
WHERE LOWER(json_extract(value, '$.image')) LIKE '%' || LOWER($2) || '%'
OR LOWER(json_extract(value, '$.source')) LIKE '%' || LOWER($2) || '%'
))
Copy link
Contributor

Choose a reason for hiding this comment

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

SQL ninja! 🥷

Servers []Server `json:"servers" yaml:"servers"`
}

func Search(ctx context.Context, dao db.DAO, query string, workingSetID string, format OutputFormat) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: In case we ever add a docker mcp workingset search, maybe we should rename this to SearchServers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think me naming it Search here breaks convention of keeping it the same name as the command. I'll rename to Servers and will free up Search

}
}

formatting.PrettyPrintTable(rows, []int{40, 10, 120})
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I should use this on the other human readable prints. Didn't realize we had it!

Copy link
Contributor Author

@bobbyhouse bobbyhouse Nov 1, 2025

Choose a reason for hiding this comment

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

We should probably factor it out. It is coming from
github.com/docker/mcp-gateway/cmd/docker-mcp/secret-management/formatting

@bobbyhouse bobbyhouse merged commit e007143 into main Nov 1, 2025
8 checks passed
@bobbyhouse bobbyhouse deleted the add-mcp-workingset-servers branch November 1, 2025 15:41
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