fix: handle invalid mcp urls#25019
Merged
Hona merged 1 commit intoanomalyco:devfrom Apr 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds validation for remote MCP server URLs so invalid configuration no longer throws during MCP startup or OAuth auth flows, and instead surfaces a clean “failed” MCP status/error.
Changes:
- Introduces a shared
remoteURL()helper that validates/parses remote MCP URLs before transport construction. - Updates remote MCP connection setup to return a
failedstatus when the URL is invalid (instead of throwing onnew URL(...)). - Updates OAuth start/auth transport creation to use the validated URL (and throws a clear “Invalid MCP URL…” error for auth flows).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Bojun-Vvibe
added a commit
to Bojun-Vvibe/oss-contributions
that referenced
this pull request
Apr 30, 2026
- anomalyco/opencode#25062 (merge-as-is) — defensive optional-chain on legacy session restore - anomalyco/opencode#25019 (merge-as-is) — per-server fail-soft on invalid MCP url - anomalyco/opencode#25032 (merge-as-is) — middleware-pair test + directory AGENTS.md - openai/codex#20278 (merge-after-nits) — workspace plugin sharing v2 RPCs
66 tasks
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.
Summary
Verification
bun typecheckfrompackages/opencodeInvalid MCP URL for "context7"