MCP server
Model Context Protocol server — component catalog & tokens for agents.
Model Context Protocol
list_components
Every @xngui/components/* entry with category and flat import path.
get_component_info
README and public exports for a single component entry.
list_design_tokens
Semantic roles, spacing, radius, motion, and z-index summary.
Build locally
terminalpnpm install
pnpm --filter @xngui/mcp build
Wire into Cursor
mcp.json{
"mcpServers": {
"xngui": {
"command": "node",
"args": ["tools/mcp-server/dist/index.js"],
"env": {
"XNGUI_ROOT": "/absolute/path/to/xngui"
}
}
}
}
Set XNGUI_ROOT to your monorepo root so list_components scans libs/components live.
Publish to npm
- Bump version in tools/mcp-server/package.json
- pnpm --filter @xngui/mcp build
- npm login · cd tools/mcp-server && npm publish --access public
consumer mcp.json{
"mcpServers": {
"xngui": {
"command": "npx",
"args": ["-y", "@xngui/mcp"]
}
}
}