optics-mcp
v0.2.6MCP Server for Optics Design System documentation and token usage.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_token
Get detailed information about a specific design token by name
| Parameter | Type | Description |
|---|---|---|
tokenName * | string | The name of the design token (e.g., "color-primary", "spacing-md") |
search_tokens
Search for design tokens by category or name pattern
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category (color, spacing, typography, border, shadow) |
namePattern | string | Search pattern for token names (case-insensitive) |
get_token_usage_stats
Get statistics about design token usage across the system
get_component_info
Get detailed information about a component including its design token dependencies
| Parameter | Type | Description |
|---|---|---|
componentName * | string | The name of the component (e.g., "Button", "Card", "Input") |
list_components
List all available components in the design system
get_component_tokens
Get all design tokens used by a specific component
| Parameter | Type | Description |
|---|---|---|
componentName * | string | The name of the component |
search_documentation
Search through Optics documentation
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query for documentation content |
generate_theme
Generate a custom Optics theme with CSS variable overrides. Includes installation instructions for @rolemodel/optics via npm or CDN (jsDelivr/unpkg). Output includes complete setup guide with actual Optics token names.
| Parameter | Type | Description |
|---|---|---|
brandName * | string | Name of the brand/theme (e.g., "Acme Corp") |
primary * | string | Primary brand color (hex, e.g., "#0066CC") |
secondary | string | Secondary color (hex, optional) |
validate_token_usage
Validate code for hard-coded values that should use design tokens
| Parameter | Type | Description |
|---|---|---|
code * | string | CSS or component code to validate |
replace_hard_coded_values
Replace hard-coded values with design tokens
| Parameter | Type | Description |
|---|---|---|
code * | string | Code containing hard-coded values |
autofix | boolean | Whether to automatically fix the code (default: false) |
check_contrast
Check WCAG contrast ratio between two color tokens
| Parameter | Type | Description |
|---|---|---|
backgroundToken * | string | Background color token name |
foregroundToken * | string | Foreground color token name |
suggest_token_migration
Suggest design tokens for a hard-coded value
| Parameter | Type | Description |
|---|---|---|
value * | string | Hard-coded value to find tokens for (e.g., "#0066CC", "16px") |
category | string | Optional category filter (color, spacing, typography) |
generate_component_scaffold
Generate a React component scaffold with proper token usage
| Parameter | Type | Description |
|---|---|---|
componentName * | string | Name of the component (e.g., "Alert", "Card") |
description * | string | Brief description of the component |
tokens * | array | List of token names the component should use |
generate_sticker_sheet
Generate a visual style guide with color swatches and component examples
| Parameter | Type | Description |
|---|---|---|
framework | string | Target framework: react, vue, svelte, or html (default: react) |
includeColors | boolean | Include color swatches (default: true) |
includeComponents | boolean | Include component examples (default: true) |
includeTypography | boolean | Include typography specimens (default: true) |