Skip to main content
Glama
matracey

daisyui-mcp-server

by matracey

🌼 daisyui-mcp-server

MCP server for daisyUI React components β€” search docs, props, and code examples from any AI coding assistant

npm version License: MIT CI Node.js

Overview

daisyui-mcp-server is a Model Context Protocol (MCP) server that gives AI coding assistants instant access to daisyUI React component documentation. It enables tools like GitHub Copilot, Claude, Cursor, and others to search components, look up props, and retrieve code examples β€” all without leaving your editor.

daisyUI is the most popular component library for Tailwind CSS, providing beautiful, accessible UI components. This MCP server is built around the react-daisyui bindings.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AI Assistant    │────▢│ MCP Client │────▢│ daisyui-mcp-server  │────▢│ Knowledge Base β”‚
β”‚ (Copilot/Claude) │◀────│            │◀────│                     │◀────│ (56 components)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Related MCP server: aceternityui-mcp

Available Tools

Tool

Description

Parameters

daisyui_search

Search component documentation

query (required), category, limit

daisyui_get_component

Get full component docs with props & examples

name (required)

daisyui_get_examples

Get code examples for a component

name (required)

daisyui_list_components

List all components, optionally by category

category

daisyui_get_theme_info

Get daisyUI theme configuration guide

β€”

Categories

Components are organized into: actions, data-display, navigation, feedback, layout, data-input, mockup

Quick Start

npx daisyui-mcp-server

Configuration

VS Code (GitHub Copilot)

Add to .vscode/mcp.json:

{
  "servers": {
    "daisyui": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "daisyui-mcp-server"]
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "daisyui": {
      "command": "npx",
      "args": ["-y", "daisyui-mcp-server"]
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "daisyui": {
      "command": "npx",
      "args": ["-y", "daisyui-mcp-server"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "daisyui": {
      "command": "npx",
      "args": ["-y", "daisyui-mcp-server"]
    }
  }
}

Amazon Q Developer CLI

Add to ~/.aws/amazonq/mcp.json:

{
  "mcpServers": {
    "daisyui": {
      "command": "npx",
      "args": ["-y", "daisyui-mcp-server"]
    }
  }
}

Zed

Add to settings.json:

{
  "context_servers": {
    "daisyui": {
      "command": {
        "path": "npx",
        "args": ["-y", "daisyui-mcp-server"]
      }
    }
  }
}

JetBrains IDEs (IntelliJ, WebStorm, etc.)

  1. Go to Settings β†’ Tools β†’ AI Assistant β†’ MCP Servers

  2. Click Add

  3. Set command to npx with arguments ["-y", "daisyui-mcp-server"]

Cline

Add to cline_mcp_settings.json:

{
  "mcpServers": {
    "daisyui": {
      "command": "npx",
      "args": ["-y", "daisyui-mcp-server"]
    }
  }
}

Development

Prerequisites

  • Node.js >= 18

  • npm

Setup

git clone https://github.com/matracey/daisyui-mcp-server.git
cd daisyui-mcp-server
npm install

Build

npm run build

Test

npm test                # Run tests
npm run test:watch      # Watch mode
npm run test:coverage   # With coverage report

Run Locally

npm run dev    # Watch mode with tsx
npm start      # Run built version

Regenerate Knowledge Base

The knowledge base is generated from the react-daisyui source code and daisyUI documentation:

npm run generate

This clones the react-daisyui repo, parses component source files for props and types, scrapes daisyui.com for descriptions and examples, and outputs the result to src/data/generated/.

Adding New Components

  1. Add the component name and category to the CATEGORY_MAP in scripts/generate-knowledge-base.ts

  2. Run npm run generate to regenerate the knowledge base

  3. Run npm test to verify the new component is valid

How It Works

Architecture

The server uses the MCP SDK to expose 5 tools over stdio transport. When an AI assistant connects, it can call these tools to query a pre-built knowledge base of 56 daisyUI React components.

Knowledge Base Generation

The scripts/generate-knowledge-base.ts script:

  1. Clones the react-daisyui repository

  2. Parses each component's TypeScript source to extract props, types, and defaults

  3. Scrapes daisyui.com/components/<name>/ for descriptions, CSS classes, and examples

  4. Outputs a structured JSON file (src/data/generated/components.json)

Search Scoring

The search engine uses a token-based scoring system:

Match Type

Score

Exact name match

+100

Name contains query

+50

Name contains token

+30

Description contains token

+15

Prop name matches token

+10

CSS class matches token

+10

Example matches token

+5

Results are sorted by score and returned up to the specified limit (default 5, max 10).

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  • Open an issue for bugs or feature requests

  • Submit a pull request with your changes

License

MIT β€” see LICENSE for details.

Available Tools

5 tools
daisyui_get_componentA

Get full documentation for a specific daisyUI React component including all props, types, defaults, and usage examples.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesComponent name (e.g. "Button", "Modal")

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. The description implies a read-only operation (fetching documentation) without side effects. Could explicitly state it's non-destructive, but the intent is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that efficiently conveys the purpose and scope, with no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and no output schema, the description adequately explains what the tool returns. Could mention that it returns exhaustive documentation, but overall sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a single parameter 'name' described. The description adds value by providing examples ('e.g. "Button", "Modal"'), which clarifies expected input beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get full documentation' and the resource 'daisyUI React component', specifying what is included (props, types, defaults, usage examples). It differentiates from sibling tools that handle examples, themes, listing, or searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when full documentation of a component is needed, but does not explicitly state when to use or not use this tool over siblings or provide alternative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

daisyui_get_examplesA

Get code examples for a specific daisyUI React component. Returns TSX/JSX snippets showing common usage patterns.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesComponent name

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavioral traits. It states it 'Returns TSX/JSX snippets', which is a read operation. However, it doesn't mention error behavior (e.g., if component not found) or any side effects. Adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that conveys purpose and return type without redundancy. Every word is meaningful; no extraneous details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple getter tool with one parameter and no output schema, the description adequately states what it returns (TSX/JSX snippets). It is complete enough for an agent to understand the tool's purpose, though missing details on edge cases or availability of examples.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter 'name' (described as 'Component name'). The tool description adds that the component is a 'daisyUI React component' but doesn't clarify expected format or provide examples beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool retrieves code examples for a specific daisyUI React component, returning TSX/JSX snippets. This distinguishes it from siblings like daisyui_get_component (likely getting component info) and daisyui_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when wanting code snippets for a specific component, but lacks explicit guidance on when to prefer this tool over siblings like daisyui_search or daisyui_list_components. No when-not-to-use or alternative mentions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

daisyui_get_theme_infoA

Get information about daisyUI themes, including available theme names and how to configure them in React.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description implies read-only behavior but does not disclose any side effects, auth requirements, or rate limits. It is not misleading, but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with purpose, no unnecessary words. Ideal conciseness for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter info tool, the description covers what it does and what it returns. Could be more specific about output format or scope, but adequate given simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty (100% coverage implied), but the description adds meaning by specifying that the tool returns theme names and configuration info, going beyond the schema's silence.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves theme information, specifically available names and configuration in React, distinguishing it from component, examples, listing, and search tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus siblings, nor any prerequisites or exclusions provided. The description implicitly suggests it for theme inquiries, but lacks explicit usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

daisyui_list_componentsA

List all available daisyUI React components, optionally filtered by category.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter by component category

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description lacks any behavioral details such as pagination, rate limits, or data format. It only describes the basic action without transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no unnecessary words. It is front-loaded with the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool with one optional parameter, the description is minimally adequate but lacks details about returned data format or any additional context, which would be beneficial given no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description does not add extra meaning beyond what the schema already provides for the category parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all daisyUI React components with optional category filtering. It is distinct from sibling tools like daisyui_get_component (for details) and daisyui_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing components and allows optional filtering, but does not explicitly guide when to use this tool versus alternatives like daisyui_get_component or daisyui_search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv5.5.20
    • First observeddaisyui_get_component
    • First observeddaisyui_get_examples
    • First observeddaisyui_get_theme_info
    • First observeddaisyui_list_components
    • First observeddaisyui_search

TDQS

A4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: getting component details, examples, theme info, listing all components, and searching. No overlap.

Naming Consistency5/5

All tools follow a consistent 'daisyui_verb_noun' snake_case pattern, e.g., daisyui_list_components, daisyui_get_component.

Tool Count5/5

5 tools is well-scoped for a UI component library's documentation server, covering essential operations without being too many or too few.

Completeness4/5

Covers listing, details, examples, theme info, and search. Minor gap: no tool for getting all theme properties, but the core needs are met.

Maintenance

ActivityActive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Helps AI assistants access shadcn/ui component documentation and examples through a TypeScript-based MCP server that provides reference information for component details, usage examples, and search capabilities.
    4
    876 npm
    60
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server providing AI assistants with comprehensive documentation about @deay/ui components, including props, examples, best practices, and Figma design specifications.
    -