Use this guide to connect @annondeveloper/ui-kit to Cursor through MCP so Cursor can browse the component registry and generate code against the real API surface instead of guessing.
Once the MCP server is connected, Cursor can:
- list available components
- inspect component props and examples
- search the registry by use case
- generate snippets with the correct imports
- inspect theme tokens and icon metadata
Make sure you have:
- Node.js installed
- Cursor installed
- a local checkout of the
ui-kitrepository
From the ui-kit repo root:
npm install
npm run build:mcpThis creates the compiled MCP server at:
dist/mcp/index.js
Create this file in the project where you want Cursor to use the server:
.cursor/mcp.json
Add the following config:
{
"mcpServers": {
"ui-kit": {
"command": "node",
"args": ["/absolute/path/to/ui-kit/dist/mcp/index.js"]
}
}
}Replace /absolute/path/to/ui-kit/dist/mcp/index.js with the real path on your machine.
Close and reopen Cursor after saving .cursor/mcp.json. Cursor should pick up the new MCP server configuration on startup.
Open Cursor in the project and try prompts like:
List the ui-kit form input components.
Show me the props for the DataTable component from ui-kit.
Generate a date range filter UI using ui-kit components.
If the server is connected correctly, Cursor should answer using ui-kit component names, real imports, and actual props from the registry.
Check:
.cursor/mcp.jsonis valid JSON- the
dist/mcp/index.jspath is correct - you ran
npm run build:mcp - Cursor was restarted after the config change
Rebuild the MCP artifacts:
npm run build:mcpThat rebuilds the MCP bundle and registry output.
For a shared remote setup, use the SSE flow described in the MCP docs and point Cursor to the /sse endpoint instead of running the local stdio server.
The MCP demo page references:
npx @annondeveloper/ui-kit mcpBut the current CLI source in this repository does not yet expose a public mcp command. Until that lands, Cursor setup is still manual through .cursor/mcp.json plus the built dist/mcp/index.js server path.
mcp_readme.mddemo/src/pages/McpPage.tsxpackage.json