Repository navigation
feat(docsite): MCP server v2 — hybrid search+get with alias resolution - #2513
Merged
Merged
Conversation
Two-tool MCP server for AI agents to discover and use XDS components:
- search(): curated brief results with semantic alias resolution
- get(): full component details with examples and compound awareness
Key features:
- Alias map bridges semantic gaps ("success message" → Toast, "dropdown" → Selector)
- Compound component awareness (Table → sorting/selection hooks via group members)
- Context budget control (~1.5K tokens per brief response)
- Showcase examples included in get() responses
- Hook example fallback (searches by directory/group when no direct match)
Vibe test results: 10/10 (100%) across all 7 prompts at ~36K tokens.
Co-authored-by: Navi <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
🚀 Vercel Preview Deployment
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
Remove pretty-printing (null, 2) from JSON.stringify calls. Agents parse structured JSON fine without indentation — saves ~9K tokens across the 7-prompt battery with zero quality impact. Co-authored-by: Navi <[email protected]>
cixzhang
commented
Jun 5, 2026
cixzhang
commented
Jun 5, 2026
cixzhang
added a commit
that referenced
this pull request
Jun 5, 2026
- Replace hardcoded ALIASES map with a keyword index built from each component's .doc.mjs `keywords` field at init time - Update all MCP-facing output to use "Astryx (XDS)" branding - Add MCP Server section to working-with-ai CLI docs with setup instructions for Claude Desktop, Cursor, and Windsurf Addresses PR #2513 review feedback.
cixzhang
marked this pull request as ready for review
June 5, 2026 01:02
cixzhang
requested review from
czarandy,
imdreamrunner and
josephfarina
as code owners
June 5, 2026 01:02
cixzhang
added a commit
that referenced
this pull request
Jun 5, 2026
- Replace hardcoded ALIASES map with a keyword index built from each component's .doc.mjs `keywords` field at init time - Update all MCP-facing output to use "Astryx (XDS)" branding - Add MCP Server section to working-with-ai CLI docs with setup instructions for Claude Desktop, Cursor, and Windsurf Addresses PR #2513 review feedback.
cixzhang
force-pushed
the
navi/feat/mcp-server-v2
branch
from
June 5, 2026 01:04
b573782 to
84b03e5
Compare
cixzhang
added a commit
that referenced
this pull request
Jun 5, 2026
- Replace hardcoded ALIASES map with a keyword index built from each component's .doc.mjs `keywords` field at init time - Update all MCP-facing output to use "Astryx (XDS)" branding - Add MCP Server section to working-with-ai CLI docs with setup instructions for Claude Desktop, Cursor, and Windsurf Addresses PR #2513 review feedback.
cixzhang
force-pushed
the
navi/feat/mcp-server-v2
branch
from
June 5, 2026 01:06
84b03e5 to
f3db310
Compare
- Replace hardcoded ALIASES map with a keyword index built from each component's .doc.mjs `keywords` field at init time - Update all MCP-facing output to use "Astryx (XDS)" branding - Add MCP Server section to working-with-ai CLI docs with setup instructions for Claude Desktop, Cursor, and Windsurf Addresses PR #2513 review feedback.
cixzhang
force-pushed
the
navi/feat/mcp-server-v2
branch
from
June 5, 2026 01:18
f3db310 to
b4da937
Compare
josephfarina
approved these changes
Jun 5, 2026
Merge main to pick up commit 726a159 which aligns the api component() list-view detail default with the CLI (brief for list views, full for single-component views). Without this, the API↔CLI parity smoke test fails with 81 mismatches: the API returns component.full while the CLI returns component.list for every category.
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
#2513) * feat(docsite): add MCP server v2 with hybrid search+get approach Two-tool MCP server for AI agents to discover and use XDS components: - search(): curated brief results with semantic alias resolution - get(): full component details with examples and compound awareness Key features: - Alias map bridges semantic gaps ("success message" → Toast, "dropdown" → Selector) - Compound component awareness (Table → sorting/selection hooks via group members) - Context budget control (~1.5K tokens per brief response) - Showcase examples included in get() responses - Hook example fallback (searches by directory/group when no direct match) Vibe test results: 10/10 (100%) across all 7 prompts at ~36K tokens. * perf(mcp): minify JSON responses (~25% token reduction) Remove pretty-printing (null, 2) from JSON.stringify calls. Agents parse structured JSON fine without indentation — saves ~9K tokens across the 7-prompt battery with zero quality impact. * fix(mcp): derive aliases from doc keywords, brand as Astryx (XDS) - Replace hardcoded ALIASES map with a keyword index built from each component's .doc.mjs `keywords` field at init time - Update all MCP-facing output to use "Astryx (XDS)" branding - Add MCP Server section to working-with-ai CLI docs with setup instructions for Claude Desktop, Cursor, and Windsurf Addresses PR #2513 review feedback. ---------
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
#2513) * feat(docsite): add MCP server v2 with hybrid search+get approach Two-tool MCP server for AI agents to discover and use XDS components: - search(): curated brief results with semantic alias resolution - get(): full component details with examples and compound awareness Key features: - Alias map bridges semantic gaps ("success message" → Toast, "dropdown" → Selector) - Compound component awareness (Table → sorting/selection hooks via group members) - Context budget control (~1.5K tokens per brief response) - Showcase examples included in get() responses - Hook example fallback (searches by directory/group when no direct match) Vibe test results: 10/10 (100%) across all 7 prompts at ~36K tokens. * perf(mcp): minify JSON responses (~25% token reduction) Remove pretty-printing (null, 2) from JSON.stringify calls. Agents parse structured JSON fine without indentation — saves ~9K tokens across the 7-prompt battery with zero quality impact. * fix(mcp): derive aliases from doc keywords, brand as Astryx (XDS) - Replace hardcoded ALIASES map with a keyword index built from each component's .doc.mjs `keywords` field at init time - Update all MCP-facing output to use "Astryx (XDS)" branding - Add MCP Server section to working-with-ai CLI docs with setup instructions for Claude Desktop, Cursor, and Windsurf Addresses PR #2513 review feedback. ---------
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
Brings back the winning hybrid MCP server approach (from
navi/feat/mcp-hybrid) with improvements for alias resolution, token budget control, and compound component awareness.Approach: 2-tool hybrid (search + get)
search(query)get(name)Key improvements over v1 hybrid
Semantic alias map — bridges natural language gaps:
Compound component awareness — requesting Table surfaces sorting/selection hooks via
groupMembersHook example fallback — hooks like
useXDSToastfind examples by searching the parent directory/group ("Toast")Context budget control — doc topics >4K chars get overview + section list with drill-down hint
Vibe test results
Token comparison
Files changed
apps/docsite/src/app/[transport]/route.ts— MCP server route handlerapps/docsite/scripts/vibe-test.mjs— Automated vibe test batteryapps/docsite/package.json— Added mcp-handler, zod, @modelcontextprotocol/sdk depsRunning the vibe test