MCP Integration
Enable AI assistants like Claude to understand and correctly use the Classic Theme design system
Quick Start
1 Install the MCP Package
npm install @classic-homes/theme-mcp Or use directly with npx:
npx @classic-homes/theme-mcp2 Configure Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"classic-theme": {
"command": "npx",
"args": ["@classic-homes/theme-mcp"]
}
}
}3 Alternative: Local Installation
If you have the package installed locally in your project
{
"mcpServers": {
"classic-theme": {
"command": "node",
"args": ["./node_modules/@classic-homes/theme-mcp/dist/cli.js"]
}
}
} Restart Claude Code after updating the configuration.
Available Resources
Resources the AI can read to understand the design system
components://catalog Full component catalog with props and examplescomponents://list Component names and categoriescomponents://{name} Individual component detailscomponents://category/{category} Components filtered by categorytokens://all All token definitionstokens://colors Brand and semantic color tokenstokens://spacing Spacing scaletokens://typography Typography scale and familiesstyles://all Complete styles catalogstyles://integration Style integration guide and layeringstyles://base Base style rulesstyles://accessibility Accessibility style detailsstyles://utilities Utility class referencepatterns://all All layout/form/auth/notification patternspatterns://layouts Layout patternspatterns://forms Form patternspatterns://auth Authentication flow patternspatterns://notifications Notification patternspatterns://{id} Pattern details by IDschemas://all All schema exports grouped by sectionschemas://auth Auth schema groupsschemas://common Common schema groupsauth://all Complete auth package catalogauth://core Auth core modulesauth://svelte Auth Svelte integration modulesauth://testing Auth testing helpersauth://types Auth type referenceauth://api Auth API function referenceauth://core/{module} Auth core module detailsauth://svelte/{module} Auth Svelte module detailsauth://quick-reference Auth quick reference cheatsheetnotifications://all Complete notifications package catalognotifications://core Notifications core modulesnotifications://svelte Notifications Svelte modulesnotifications://types Notifications type referencenotifications://api Notifications API function referencenotifications://utils Notifications utility helpersnotifications://core/{module} Notifications core module detailsnotifications://quick-reference Notifications quick referencedocs://all Complete docs package catalogdocs://components Docs component referencedocs://utilities Docs parser/highlighter utilitiesdocs://types Docs package exported typesdocs://extensions Markdown extension referencedocs://styles Docs markdown styles referencedocs://quick-reference Docs package quick referencecharts://all Complete charts catalogcharts://theme Chart theme configurationcharts://types Chart types referencecharts://utils Chart utility functionscharts://quick-reference Chart quick referencecharts://props Chart component prop typescharts://data Chart data model typescharts://events Chart event typescharts://reporting Report charts, stat cards, sparklines and data helpers (Svelte only)maps://all Complete maps catalogmaps://theme Map theme and style systemsmaps://types Map type definitionsmaps://utils Map utility helpersmaps://route Multi-stop route planning and maps deep linksmaps://geocoding Forward geocoding adaptersmaps://components Map component referencemaps://quick-reference Map quick referencemaps://props Map props type referencemaps://data Map data typesmaps://events Map event typesmaps://hooks React map hooks referencemaps://best-practices Map implementation best practicesmaps://theme-types Map theme type referencemaps://overlay-layers Map overlay layer guidesmaps://migration Map migration guidancemaps://positioning Map control positioning coordinatornative://all Complete native package catalognative://react React native hooks referencenative://svelte Svelte native composables referencenative://core Native core API surfacenative://features Native feature matrix by platformnative://types Native type definitionsnative://quick-reference Native package quick referenceAvailable Tools
Tools the AI can use to search and validate components
search_components
Search for components by name, category, or functionality
Example: "Find all form components"
Returns: FormField, Input, Select, Checkbox, RadioGroup, etc.
get_component_props
Get detailed prop definitions for a specific component
Example: "Get props for DashboardLayout"
Returns: Full prop list with types, defaults, and descriptions
suggest_pattern
Get recommended patterns for common use cases
Example: "Suggest pattern for login page"
Returns: AuthLayout + form pattern with code example
validate_component_usage
Validate if component usage follows design system guidelines
Example: "Validate Button with variant="primary""
Returns: Error - "primary" is not valid, use "default"
Available Prompts
Pre-built prompts for common tasks
build_form
Generate a form following Classic Theme patterns
Arguments:
- -
formType: login, registration, contact, settings - -
fields: email, password, name (comma-separated) - -
includeValidation: true/false
layout_page
Generate a page layout using Classic Theme components
Arguments:
- -
pageType: dashboard, public, auth, error, form - -
features: sidebar, search, user-menu (comma-separated)
component_usage
Generate correct usage for a specific component
Arguments:
- -
componentName: Button, Card, DashboardLayout, etc. - -
variant: default, secondary, destructive, etc. - -
useCase: Brief description
Usage Examples
Example prompts to try with Claude
Create a Dashboard
"Create a dashboard page with sidebar navigation, user menu, and a data table showing recent orders"
Claude will use the MCP server to look up DashboardLayout props, get DataTable component details, and generate correct code with proper types.
Build a Form
"Create a contact form with name, email, subject, and message fields with validation"
Claude will use the build_form prompt, include proper FormField components, add Zod validation schema, and handle submission with loading state.
Ask About Components
"What variants does the Button component have?"
Claude will query the MCP server and return: default, secondary, destructive, outline, ghost, link
Troubleshooting
Common issues and solutions
MCP Server Not Connecting
- Check Claude Code settings are correct
- Ensure the path to the MCP server is valid
- Try running manually:
npx @classic-homes/theme-mcp - Check for error messages in Claude Code logs
Outdated Component Information
The catalog is generated at build time. If you've updated components:
npm update @classic-homes/theme-mcpAI Generating Incorrect Code
The AI uses the MCP server as a reference but may still make mistakes. Always review
generated code and test it. Use the validate_component_usage tool to verify component usage.