Using Fragments MCP in Cursor for Design System-Aware UI Generation
By Conan McNichollA Cursor MCP design system workflow works best when Cursor can inspect your real component metadata before it writes code. Fragments gives Cursor that query layer through MCP so the assistant can discover components, inspect props, and implement screens using your actual API surface.
This guide shows the minimum setup and a repeatable prompting workflow.
Configure Cursor for a Design System MCP Workflow
Add the Fragments MCP server to your project config:
{
"mcpServers": {
"fragments": {
"command": "npx",
"args": ["-y", "@fragments-sdk/mcp@latest"]
}
}
}Before Cursor can use the server, build your compiled Fragments data with the CLI Reference:
fragments buildPrompting Pattern That Produces Better Output
Use a staged workflow instead of asking Cursor to build everything at once:
- Ask Cursor to discover candidate components for the feature.
- Ask it to inspect the selected components for props and usage guidance.
- Ask it to implement the UI using the discovered components and token conventions.
This keeps the assistant grounded in the components docs and reduces made-up props.
Example Cursor Prompt
Use the Fragments MCP tools to build a settings form.
First discover candidate components, then inspect the chosen components for props/examples,
and finally implement the form using our design system components only.FAQ
Why not just paste the component docs into the prompt?
Because the docs change. MCP lets Cursor query the latest metadata directly, which scales better than manually copying docs into prompts.
Can Cursor use both MCP and normal code search?
Yes. That combination is ideal. MCP provides structured design system data while normal code search gives local implementation context.
CTA
Start with the MCP Tools docs, verify your data build in the CLI Reference, and use the components docs as the human-readable review layer.