fix the issue when configuring remote MCP servers, hint for naming#380
Merged
fix the issue when configuring remote MCP servers, hint for naming#380
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves remote MCP server handling in the local agent-gateway configuration and makes CLI/API client errors more human-readable by extracting meaningful messages from Huma-style JSON error responses.
Changes:
- Switch local agent-gateway config generation for remote MCP servers from
ssetargets tomcptargets (to avoid incorrect TLS-handshake behavior). - Add reverse-DNS “hint” messaging when remote URL hostnames don’t match an invalid/non-reverse-DNS namespace.
- Extract and display server-provided API error messages (instead of dumping raw JSON) and enhance HTTP status parsing.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/registry/validators/validators.go | Improves namespace/remote URL mismatch errors with a reverse-DNS hint helper. |
| internal/registry/platforms/local/deployment_adapter_local_platform.go | Builds remote MCP target URLs and emits mcp targets for remote servers. |
| internal/registry/platforms/local/deployment_adapter_local_platform_test.go | Adds unit tests for remote MCP URL building behavior. |
| internal/client/client.go | Extracts human-readable API error messages and broadens HTTP status detection. |
| internal/client/client_test.go | Adds tests for API error extraction and HTTP status parsing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/registry/platforms/local/deployment_adapter_local_platform.go
Outdated
Show resolved
Hide resolved
internal/registry/platforms/local/deployment_adapter_local_platform.go
Outdated
Show resolved
Hide resolved
internal/registry/platforms/local/deployment_adapter_local_platform_test.go
Outdated
Show resolved
Hide resolved
8e9b978 to
0c47464
Compare
inFocus7
reviewed
Mar 19, 2026
Collaborator
inFocus7
left a comment
There was a problem hiding this comment.
haven't verified locally but the changes code-wise lgtm, left a comment, but that's about it
1b0eb2c to
cdbf811
Compare
inFocus7
approved these changes
Mar 20, 2026
…xtract actual errors) Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
1cf420d to
2a5a8b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
fix the issue when configuring remote MCP servers (use the
mcpinstead ofsseas it tries to do a tls handshake), add a hint for incorrect naming of remote servers + extract the actual errors, instead of showing the JSON.e.g.:
Change Type
Changelog