Repository navigation
fix(market): allow installing remote (sse/streamable) servers from the market - #216
Merged
daodao97 merged 1 commit intoSep 7, 2026
Merged
Conversation
…e market The Install button ran isCommandAvailable(command) for every market entry. For remote servers the command field holds a URL, so 'which https://…' always fails and the user gets 'command not found' before reaching the edit dialog — even though the dialog itself already supports sse/streamable entries and loadMarketServers deliberately keeps http-command entries on mobile. Skip the PATH check when the entry is remote.
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
The market Install button runs
isCommandAvailable(serverConfig['command'])for every entry. For remote servers (type: sse/type: streamable) thecommandfield holds a URL, so this becomeswhich https://…(orwhere …on Windows), which can never succeed. The user gets the "command not found" dialog before the edit dialog opens — even though:_showEditDialogalready handlessse/streamableentries (isRemote/isValidUrlchecks at the save step), andloadMarketServersdeliberately keeps entries whosecommandstarts withhttpon mobile, whereProcess.run('which', …)cannot work at all.So today no remote entry in
mcp_server_market.jsoncan be installed from the market on any platform; it has to be re-typed by hand via "+".Change
lib/page/setting/mcp_server.dart— skip the PATH check when the entry is remote (typeissse/streamable, orcommandstarts withhttp). Stdio entries are unchanged.Validation
_buildServerCard→isCommandAvailableinlib/utils/process.dart→_showEditDialog) and of the remote-entry paths that already exist (initializeMcpServertype switch,loadMarketServersmobile filter).build.yml/format.yml(page_width: 150; the longest added line is 104 chars).Companion PR: chatmcpclient/mcp_server_market — the first remote (
streamable) entry in the market, which is what surfaced this.