-
Notifications
You must be signed in to change notification settings - Fork 144
Add registry format converters and support for the Official MCP Registry #2469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a80e60f to
42536b9
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2469 +/- ##
==========================================
- Coverage 55.80% 55.17% -0.64%
==========================================
Files 299 305 +6
Lines 28341 29218 +877
==========================================
+ Hits 15816 16120 +304
- Misses 11097 11667 +570
- Partials 1428 1431 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dmartinol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT, what else is missing to un-draft it?
I just added a change for setting the User Agent when we reach out a registry server but nothing else major I think, it was mostly the changes on the operator side (which we've agreed are out of scope). The things I'd like to get covered before merging are:
|
a34121c to
49b13a3
Compare
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
The API endpoints use v0.1 as the version path component. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
…converter
Support extracting environment variables from both sources in the MCP Registry API format:
1. The dedicated environmentVariables field (preferred way)
2. The -e/--env flags in runtimeArguments (Docker CLI pattern)
Many servers in the MCP registry (like github-mcp-server) use the Docker CLI pattern
of specifying environment variables as runtime arguments with -e flags, rather than
using the dedicated environmentVariables field. This is a valid approach according to
the MCP registry schema.
Changes:
- Add extractEnvironmentVariables() to handle both sources
- Add extractEnvFromRuntimeArgs() to parse -e/--env flags
- Add parseEnvVarFromValue() to extract variable metadata
- Parse variable references like {token} and extract metadata (isSecret, isRequired, etc.)
- Handle static values and complex values with multiple equals signs
- Add comprehensive test suite with 15+ test cases covering all scenarios
- Add integration test with realistic GitHub MCP server data
This ensures ToolHive can properly consume all servers from the official MCP registry,
regardless of which format they use for environment variables.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
The following PR:
toolhive-registryand nottoolhive.Notes:
converterspackage from https://github.com/stacklok/toolhive-registry/tree/main/pkg/registry/converters to here.To test it: