# Docs MCP URL: /ai-integration/docs-mcp Source: https://github.com/daangn/seed-design/blob/dev/docs/content/ai-integration/(mcp)/docs-mcp.mdx Provides MCP server for AI Agents to directly access Crispy documentation. ## Overview [`@seed-design/docs-mcp`](https://github.com/daangn/seed-design/tree/dev/packages/docs-mcp) is the official MCP (Model Context Protocol) server for Crispy documentation. With this MCP server, AI Agents can directly access the following information: - **React Components**: Installation, props, usage examples - **Design Guidelines**: Component anatomy, properties, and usage guidelines - **Foundation**: Design tokens including colors, typography, and spacing - **Rootage**: Source JSON data for design tokens and component specifications - **Icons**: Icon search and usage instructions It runs independently without Figma integration, allowing AI tools in projects using Crispy to better understand documentation. ## Installation ```sh claude mcp add seed-docs -- npx -y @seed-design/docs-mcp ``` ```sh codex mcp add seed-docs -- npx -y @seed-design/docs-mcp ``` Add the following to your `~/.gemini/settings.json` file: ```json { "mcpServers": { "seed-docs": { "command": "npx", "args": ["-y", "@seed-design/docs-mcp"] } } } ``` ```json { "mcpServers": { "seed-docs": { "command": "npx", "args": ["-y", "@seed-design/docs-mcp"], "type": "stdio" } } } ``` [Learn more about Cursor MCP](https://docs.cursor.com/context/model-context-protocol) Add the following to your `~/Library/Application Support/Claude/claude_desktop_config.json` file: ```json { "mcpServers": { "seed-docs": { "command": "npx", "args": ["-y", "@seed-design/docs-mcp"] } } } ``` ## Available Tools ### Discovery #### `discover_tools` Discover all available tools and check the purpose of each. Useful when first connecting to the MCP server. **Parameters:** | Name | Type | Description | | ---------- | ----------------- | ----------------------------------------------------------------------------------------- | | `query` | string (optional) | Search term to filter tools (e.g., 'installation', 'component') | | `category` | string (optional) | Category filter (`discovery`, `react`, `breeze`, `design-guidelines`, `rootage`, `icons`) | **Example:** ``` discover_tools({ query: "component" }) ``` *** ### React Components #### `list_react_components` Returns a list of all available Crispy React components. **Parameters:** None **Example Response:** ``` Found 45 React components: - ActionButton (action-button) - AlertDialog (alert-dialog) - Avatar (avatar) - Badge (badge) ... ``` #### `get_react_component` Returns detailed documentation for a specific React component, including installation, props, and usage examples. **Parameters:** | Name | Type | Description | | --------------- | ------ | ---------------------------------------------------------------- | | `componentName` | string | Component name (kebab-case, e.g., `action-button`, `text-field`) | **Example:** ``` get_react_component({ componentName: "action-button" }) ``` #### `get_react_changelog` Returns the changelog for the Crispy React package. Useful for checking what changed during version upgrades. **Parameters:** None *** ### React Section-specific Tools Tools for accessing each section of React documentation. Both `list_*` and `get_*` tools are provided for each section. | Section | list Tool | get Tool | Description | | --------------- | ---------------------------- | --------------------------- | -------------------------------- | | Getting Started | `list_react_getting_started` | `get_react_getting_started` | Installation, CLI, styling setup | | Stackflow | `list_react_stackflow` | `get_react_stackflow` | Stackflow integration guide | | Developer Tools | `list_react_developer_tools` | `get_react_developer_tools` | Codemod, Figma integration | | Migration | `list_react_migration` | `get_react_migration` | Migration guide | | AI Integration | `list_react_ai_integration` | `get_react_ai_integration` | AI tool integration | | Updates | `list_react_updates` | `get_react_updates` | Version update information | #### Usage Example First, use the `list_*` tool to check available documentation: ``` list_react_getting_started() ``` Response: ``` # Crispy React - Getting Started Topics - Installation - Vite (path: installation/vite) - Installation - Manual (path: installation/manual) - CLI - Commands (path: cli/commands) - CLI - Configuration (path: cli/configuration) - Styling - Theming (path: styling/theming) - Styling - Tailwind CSS (path: styling/tailwind-css) ``` Use the `path` from the desired documentation to get detailed content: ``` get_react_getting_started({ path: "installation/vite" }) ``` *** ### Breeze Breeze is a collection of utility UI components ready to use in projects. #### `list_breeze_components` Returns a list of available Breeze components. **Parameters:** None **Example Response:** ``` Found 1 Breeze components: - AnimateNumber (animate-number) ``` #### `get_breeze_component` Returns detailed documentation for a specific Breeze component. **Parameters:** | Name | Type | Description | | --------------- | ------ | --------------------------------------------------- | | `componentName` | string | Component name (kebab-case, e.g., `animate-number`) | **Example:** ``` get_breeze_component({ componentName: "animate-number" }) ``` *** ### Design Guidelines Access component design guideline documentation, including anatomy, properties, and usage recommendations. #### `list_docs_components` Returns a list of components that have design guidelines. **Parameters:** None **Example Response:** ``` Found 25 component design guidelines: - ActionButton (action-button) - Avatar (avatar) - BottomSheet (bottom-sheet) ... ``` #### `get_docs_component` Returns design guidelines for a specific component. **Parameters:** | Name | Type | Description | | --------------- | ------ | -------------------------------------------------- | | `componentName` | string | Component name (kebab-case, e.g., `action-button`) | **Example:** ``` get_docs_component({ componentName: "action-button" }) ``` *** ### Rootage Access Crispy's Rootage specification (source JSON data for design tokens and component specifications). #### `get_rootage` Returns Rootage resources. When called without a path, returns a list of all available resources. **Parameters:** | Name | Type | Description | | ------ | ----------------- | --------------------------------------------------------------------- | | `path` | string (optional) | Resource path (e.g., `/color.json`, `/components/action-button.json`) | **Examples:** Query resource list: ``` get_rootage() ``` Query specific resource: ``` get_rootage({ path: "/components/action-button.json" }) ``` *** ### Icons Search Crispy icons and check their usage. #### `list_icons` Returns a list of icons. Can be filtered by type, variant, and service. **Parameters:** | Name | Type | Description | | --------- | ----------------- | -------------------------------------------------------------------- | | `type` | string (optional) | Icon type (`monochrome`, `multicolor`) | | `variant` | string (optional) | Monochrome icon variant (`line`, `fill`) | | `service` | string (optional) | Multicolor icon service category (e.g., `secondhand`, `real-estate`) | | `limit` | number (optional) | Maximum number to return (default: 50, max: 200) | **Example:** ``` list_icons({ type: "monochrome", variant: "line", limit: 20 }) ``` #### `search_icons` Search icons by keyword. Supports both English and Korean search. **Parameters:** | Name | Type | Description | | ------- | ----------------- | ------------------------------------------------ | | `query` | string | Search term (e.g., `arrow`, `back`, `shopping`) | | `type` | string (optional) | Icon type filter | | `limit` | number (optional) | Maximum number to return (default: 20, max: 100) | **Example:** ``` search_icons({ query: "arrow" }) ``` **Example Response:** ``` Found 15 icons matching "arrow": View in browser: https://crispy.carrot-soft.tech/foundations/iconography/library?search=arrow - icon_arrow_left_line [monochrome] (line) Matched: arrow, left - icon_arrow_right_line [monochrome] (line) Matched: arrow, right ... ``` #### `get_icon_details` Returns detailed information and React component import statement for a specific icon. **Parameters:** | Name | Type | Description | | ---------- | ------ | ---------------------------------------- | | `iconName` | string | Icon name (e.g., `icon_arrow_left_line`) | **Example:** ``` get_icon_details({ iconName: "icon_arrow_left_line" }) ``` **Example Response:** ```markdown # icon_arrow_left_line **Type:** monochrome **Variant:** line **Keywords:** arrow, left, back ## Usage ### React \`\`\`tsx import { IconArrowLeftLine } from "@karrotmarket/react-monochrome-icon" \`\`\` ## Documentation View this icon: https://crispy.carrot-soft.tech/foundations/iconography/library?icon=icon_arrow_left_line ``` *** ## Programmatic Usage `@seed-design/docs-mcp` can be installed as an npm package and integrated into custom MCP servers. ### Installation Since `server` is an `McpServer` instance from MCP TypeScript SDK v2, install `@modelcontextprotocol/server` as well to connect transport directly. ```bash npm install @seed-design/docs-mcp @modelcontextprotocol/server # or bun add @seed-design/docs-mcp @modelcontextprotocol/server ``` ### Usage Example ```javascript import { StdioServerTransport } from "@modelcontextprotocol/server/stdio"; import { server } from "@seed-design/docs-mcp/server"; import { initializeTools } from "@seed-design/docs-mcp/tools"; // Initialize tools await initializeTools(server); // Use with desired transport (stdio, Streamable HTTP, etc.) await server.connect(new StdioServerTransport()); ``` *** ## Development Commands for local development and testing. ```bash # Install dependencies bun install # Run in development mode (stdio) bun run dev # Build bun run build # Lint bun run lint # Type check bun run typecheck ``` ### Testing with MCP Inspector Use [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to test tools in the browser: ```bash npx @modelcontextprotocol/inspector bun ./dist/stdio.js ```