fragments-mcp
SKILL.md
Fragments MCP Tools
Reference for using the Fragments MCP server tools. These tools let AI agents discover components, generate UI, validate governance, and query the design system -- all without leaving the conversation.
Available tools
Discovery and exploration
fragments_discover -- Find components in the design system.
- No params: list all components
useCase: "file upload with drag and drop": AI-powered suggestions ranked by relevancecomponent: "Button": find alternatives to a specific componentcompact: true: token-efficient overview (just names + categories)category: "forms": filter by categorysearch: "date": text search across names, descriptions, tags
fragments_inspect -- Deep dive into a single component.
component: "Input": get full props, guidelines, code examples, accessibility infofields: ["props", "examples"]: request only specific data to save tokensverbosity: "compact": just meta + prop namesvariant: "Primary": filter examples to a specific variant
fragments_blocks -- Find composition patterns.
search: "login": find pre-built patterns like "Login Form", "Settings Page"category: "dashboard": browse by categorycomponent: "DataTable": find blocks that use a specific componentverbosity: "full": include complete code
Implementation
fragments_implement -- One-shot implementation helper.
useCase: "user profile card with avatar and stats": returns matched components, props, code examples, relevant blocks, and CSS tokens in a single call- Best for: starting a new feature -- saves multiple round-trips
fragments_generate_ui -- Generate a complete UI element tree from a description.
prompt: "a settings page with profile section and notification preferences": returns a structured element tree renderable with Fragments componentscurrentTree: <existing tree>: refine an existing UI instead of generating from scratch- Best for: rapid prototyping and AI-driven UI generation
Governance and validation
fragments_govern -- Validate a UI spec against policies.
spec: { nodes: [...] }: the UI spec to validate- Returns a verdict with score (0-100), violations, and fix suggestions
- Checks: safety (blocked props), component allowlists, design token compliance, brand conformance, WCAG accessibility
format: "summary": compact text output
Design system intelligence
fragments_tokens -- Query CSS design tokens.
category: "colors": browse tokens by category (colors, spacing, typography, surfaces, shadows, radius, borders)search: "accent": find tokens by keyword
fragments_graph -- Query the component relationship graph.
mode: "dependencies",component: "Card": what does Card depend on?mode: "dependents",component: "Button": what uses Button?mode: "impact",component: "Text": blast radius of changing Textmode: "composition",component: "Select": compound component treemode: "alternatives",component: "Input": similar componentsmode: "health": overall design system health metrics
fragments_perf -- Component performance data.
- No params: all component bundle sizes
component: "DataTable": specific componentfilter: "over-budget": find components exceeding size budgetssort: "budget": sort by most over-budget
Recommended workflows
Building a new page
fragments_implementwith the use case description -- get matched components + tokensfragments_blocksto find a composition pattern close to what you needfragments_inspecton specific components for detailed prop referencefragments_governto validate the result before shipping
Reviewing existing code
fragments_discoverwithcompact: trueto know what's availablefragments_tokensto verify token usage in custom stylesfragments_graphwithmode: "alternatives"to suggest better component choices
Prototyping with AI
fragments_generate_uiwith a natural language description- Iterate by passing the result back as
currentTreewith refinement prompts fragments_governto validate the generated UI
Understanding the design system
fragments_graphwithmode: "health"for an overviewfragments_discoverwith categories to explore what's availablefragments_perfto understand bundle size implications
Weekly Installs
1
Repository
fragments-sdk/skillsFirst Seen
13 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1