Skip to content

fix(market): allow installing remote (sse/streamable) servers from the market - #216

Merged
daodao97 merged 1 commit into
daodao97:mainfrom
kwenhwang:fix/market-install-remote-servers
Sep 7, 2026
Merged

daodao97 merged 1 commit into
daodao97:mainfrom
kwenhwang:fix/market-install-remote-servers

Conversation

@kwenhwang

Copy link
Copy Markdown

Summary

The market Install button runs isCommandAvailable(serverConfig['command']) for every entry. For remote servers (type: sse / type: streamable) the command field holds a URL, so this becomes which https://… (or where … on Windows), which can never succeed. The user gets the "command not found" dialog before the edit dialog opens — even though:

  • _showEditDialog already handles sse/streamable entries (isRemote / isValidUrl checks at the save step), and
  • loadMarketServers deliberately keeps entries whose command starts with http on mobile, where Process.run('which', …) cannot work at all.

So today no remote entry in mcp_server_market.json can 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 (type is sse/streamable, or command starts with http). Stdio entries are unchanged.

Validation

  • Read-through of the install path (_buildServerCard → isCommandAvailable in lib/utils/process.dart → _showEditDialog) and of the remote-entry paths that already exist (initializeMcpServer type switch, loadMarketServers mobile filter).
  • Not compiled locally (no Flutter toolchain on this machine) — relying on CI 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.

…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.
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.

2 participants