Skip to content

fix(ai-registry): correct search query for MCP "From registry" link#17740

Open
safisa wants to merge 1 commit into
eclipse-theia:masterfrom
safisa:safi-fix/mcp-from-registry-search
Open

fix(ai-registry): correct search query for MCP "From registry" link#17740
safisa wants to merge 1 commit into
eclipse-theia:masterfrom
safisa:safi-fix/mcp-from-registry-search

Conversation

@safisa

@safisa safisa commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What it does

Fixes #17739.

The MCP "From registry" link pre-filled the Extensions search with the raw registry serverId (e.g. io.github.ChromeDevTools/chrome-devtools-mcp). RegistrySearchFilter strips the reverse-DNS domain labels (io, github) from entry ids while still requiring every query term to match, so those stripped labels could never match and the linked server was filtered out — the search showed no results.

The bridge now sets the query via RegistrySearchFilter.meaningfulIdentifier(serverId), the same reduction the filter matches against, so the linked server is reliably surfaced.

How to test

  1. Add an MCP server from the AI registry (e.g. chrome-devtools).
  2. In AI Configuration → MCP Servers, click "From registry" next to the server.
  3. The Extensions view opens and shows the server (previously the search box was filled but empty).

Or run the added unit test:

npx mocha ./packages/ai-registry/lib/browser/mcp/mcp-registry-ui-bridge-impl.spec.js

Breaking changes

  • This PR introduces breaking changes and requires careful review.

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the review guidelines
  • User-facing text is internationalized using the nls service (no user-facing text changed)

@github-project-automation github-project-automation Bot moved this to Waiting on reviewers in PR Backlog Jun 30, 2026
@ndoschek ndoschek requested a review from sgraband June 30, 2026 11:24

@sgraband sgraband left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. While this improves the topic a bit it does not work all the time, e.g. for this mcp server https://ai.open-vsx.org/?server=io.github.upstash%2Fcontext7. This together with the resulting strings not looking that nice i would be much more in favor of fixing the search to be much more stable in this regard. WDYT? Would you be interested in looking into that?

Edit: Also if the user copies the id from the website it should be findable.

@safisa

safisa commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Reworked to fix RegistrySearchFilter instead of transforming the query in the bridge:

  • matches() now reduces an id-shaped query (reverse-DNS + / path) the same way it reduces entry ids, so the full id — copied from the website or set by the "From registry" link — is findable.
  • meaningfulIdentifier() keeps distinctive owner labels, dropping only the TLD and hosting namespaces (e.g. github), so com.cloudflare.mcp/mcpcloudflare mcp mcp pinpoints it instead of mcp mcp matching everything.
  • The bridge now just searches the raw serverId.

Verified against the live registry: all 27 MCP servers and all 102 skills are found by their raw id, the exact entry is pinpointed, and git still doesn't match every io.github.*. Tests added.

@safisa safisa requested a review from sgraband July 1, 2026 07:06

@sgraband sgraband left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you thats a nice change! Could you please squash your commits?

The MCP "From registry" link pre-filled the Extensions search with the raw
registry serverId (e.g. io.github.ChromeDevTools/chrome-devtools-mcp), but
RegistrySearchFilter strips the reverse-DNS domain labels (io, github) from
entry ids while still requiring every query term to match. Those stripped
labels could never match, so the linked server was filtered out and no
results were shown. The same problem hit anyone copying a full id from the
registry website.

Fix it in the search filter itself rather than pre-transforming the query:

- RegistrySearchFilter.matches reduces an id-shaped query (reverse-DNS domain
  with a / path) the same way it reduces entry ids, so the stripped boilerplate
  labels no longer disqualify the match.
- meaningfulIdentifier keeps distinctive owner labels, dropping only the leading
  TLD and hosting namespaces (e.g. github in io.github.<owner>), so
  com.cloudflare.mcp/mcp reduces to 'cloudflare mcp mcp' and pinpoints it
  instead of 'mcp mcp' matching every server.
- The MCP bridge now searches by the raw serverId - the clean string shown on
  the website.

Verified against the live registry: all MCP servers and skills are found by
their raw id, and 'git' still does not match every io.github.* entry.

Fixes eclipse-theia#17739
@safisa safisa force-pushed the safi-fix/mcp-from-registry-search branch from 3956507 to 0be5519 Compare July 3, 2026 18:32
@safisa safisa requested a review from sgraband July 3, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

MCP "From registry" link shows no results in Extensions search

2 participants