daisyui-mcp-server
Allows GitHub Copilot to search daisyUI component documentation, retrieve component props and examples, and list components by category.
Allows JetBrains IDEs to search daisyUI component documentation, retrieve component props and examples, and list components by category.
Allows WebStorm to search daisyUI component documentation, retrieve component props and examples, and list components by category.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@daisyui-mcp-server Get the Accordion component code example"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
πΌ daisyui-mcp-server
MCP server for daisyUI React components β search docs, props, and code examples from any AI coding assistant
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 |
| Search component documentation |
|
| Get full component docs with props & examples |
|
| Get code examples for a component |
|
| List all components, optionally by category |
|
| Get daisyUI theme configuration guide | β |
Categories
Components are organized into: actions, data-display, navigation, feedback, layout, data-input, mockup
Quick Start
npx daisyui-mcp-serverConfiguration
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.)
Go to Settings β Tools β AI Assistant β MCP Servers
Click Add
Set command to
npxwith 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 installBuild
npm run buildTest
npm test # Run tests
npm run test:watch # Watch mode
npm run test:coverage # With coverage reportRun Locally
npm run dev # Watch mode with tsx
npm start # Run built versionRegenerate Knowledge Base
The knowledge base is generated from the react-daisyui source code and daisyUI documentation:
npm run generateThis 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
Add the component name and category to the
CATEGORY_MAPinscripts/generate-knowledge-base.tsRun
npm run generateto regenerate the knowledge baseRun
npm testto 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:
Clones the
react-daisyuirepositoryParses each component's TypeScript source to extract props, types, and defaults
Scrapes
daisyui.com/components/<name>/for descriptions, CSS classes, and examplesOutputs 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 toolsdaisyui_get_componentA
Get full documentation for a specific daisyUI React component including all props, types, defaults, and usage examples.
Inputs: name (required).
daisyui_get_examplesA
Get code examples for a specific daisyUI React component. Returns TSX/JSX snippets showing common usage patterns.
Inputs: name (required).
daisyui_get_theme_infoA
Get information about daisyUI themes, including available theme names and how to configure them in React.
Inputs: no named parameters.
daisyui_list_componentsA
List all available daisyUI React components, optionally filtered by category.
Inputs: category.
daisyui_searchA
Search daisyUI React component documentation. Returns matching components with descriptions, props, and documentation links.
Inputs: query (required), limit, category.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: getting component details, examples, theme info, listing all components, and searching. No overlap.
All tools follow a consistent 'daisyui_verb_noun' snake_case pattern, e.g., daisyui_list_components, daisyui_get_component.
5 tools is well-scoped for a UI component library's documentation server, covering essential operations without being too many or too few.
Covers listing, details, examples, theme info, and search. Minor gap: no tool for getting all theme properties, but the core needs are met.
Maintenance
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
An MCP server that gives your AI access to the source code and docs of all public github repos
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
Related MCP Servers
- AlicenseAqualityDmaintenanceHelps 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.4739 npm60MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to search, discover, and install Aceternity UI components programmatically.5114 npm27MIT
- AlicenseNot gradedqualityFmaintenanceA token-efficient local MCP server that exposes DaisyUI component documentation via tools, enabling AI assistants to build UIs using DaisyUI components.78MIT
- FlicenseNot gradedqualityDmaintenanceMCP server providing AI assistants with comprehensive documentation about @deay/ui components, including props, examples, best practices, and Figma design specifications.-