đŒ DaisyUI MCP Server
A token-friendly local MCP server for DaisyUI component documentation
Give your AI assistant the power to build beautiful UIs with DaisyUI đ
Features âą Installation âą Docker âą Usage âą Configuration
đŒ Heads up
This repo has been a fun little project, and it's pretty cool seeing it hit 70+ stars and 15+ forks, thank you! But I wanted to let anyone new know that DaisyUI has finally released official "Skills" over at daisyui.com/docs/skill/. I now recommend using that one since it's official and, honestly, just better for modern AI models. This repo will still work if you're already using it, but for new projects I'd go with the official skill. I'd at least recommend you check it out and see if it fits your needs better. Thanks again for the support, and happy coding! đŒ
âš Features
- đŻ Token-Efficient â Only exposes relevant context via MCP tools, saving precious tokens
- đ 60+ Components â Full coverage of DaisyUI's component library
- đ Auto-Updatable â Fetch the latest docs anytime with one command
- âïž Customizable â Edit or add your own component docs to fit your project
- ⥠Fast & Lightweight â Built with FastMCP for optimal performance
đ ïž MCP Tools
This server exposes two tools that AI assistants can use:
| Tool | Description |
|---|---|
list_components | đ Lists all available DaisyUI components with short descriptions |
get_component | đ Gets the full documentation for a specific component (classes, syntax, examples) |
đĄ The component docs are pulled from daisyui.com/llms.txt and stored locally as markdown files. This way you can also add your own custom components or edit existing ones to your liking or project needs.
đŹ Example Prompts
Try asking your AI assistant:
"What DaisyUI components are available?"
"Implement a responsive card grid using DaisyUI"
"How does the modal component work? Show me an example"
đŠ Installation
1. Clone the repository
bashgit clone https://github.com/birdseyevue/fastmcp.git cd fastmcp
2. Create a virtual environment (recommended)
bashpython -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
3. Install dependencies
bashpip install -r requirements.txt
đł Docker
You can also run the MCP server using Docker.
Build and run with Docker
bashdocker build -t daisyui-mcp . docker run -i --rm daisyui-mcp
Using Docker Compose
bashdocker compose up --build
The docker-compose.yml mounts the local components/ directory as a volume, so any changes you make to component docs on the host are reflected inside the container.
Docker configuration for AI assistants
json{ "servers": { "daisyui": { "command": "docker", "args": ["run", "-i", "--rm", "daisyui-mcp"] } } }
đ Usage
First-time setup
Upon first run, the MCP server will not have any component docs. Fetch them by running:
bashpython update_components.py
This fetches the latest llms.txt from DaisyUI and generates all the markdown files in /components.
Running the server
bashpython mcp_server.py
Updating component docs
If DaisyUI releases new components or updates their docs, simply run:
bashpython update_components.py
âïž Configuration
Add the MCP server to your AI assistant's configuration:
json{ "servers": { "daisyui": { "command": "<path-to-repo>/venv/Scripts/python.exe", "args": ["<path-to-repo>/mcp_server.py"] } } }
json{ "servers": { "daisyui": { "command": "C:/Users/username/Downloads/fastmcp/venv/Scripts/python.exe", "args": ["C:/Users/username/Downloads/fastmcp/mcp_server.py"] } } }
json{ "servers": { "daisyui": { "command": "/home/username/fastmcp/venv/bin/python", "args": ["/home/username/fastmcp/mcp_server.py"] } } }
đ Project Structure
fastmcp/ âââ đ mcp_server.py # The MCP server âââ đ update_components.py # Script to fetch/update component docs âââ đ requirements.txt # Dependencies (just fastmcp) âââ đł Dockerfile # Docker image definition âââ đł docker-compose.yml # Docker Compose configuration âââ đ components/ # Markdown files for each component âââ button.md âââ card.md âââ modal.md âââ table.md âââ ... (60+ components)
đ€ Contributing
Contributions are welcome! Feel free to:
- đ Report bugs
- đĄ Suggest new features
- đ Improve documentation
- đ§ Submit pull requests
đ License
This project is licensed under the MIT License â see the LICENSE file for details.
Free to use, modify, and distribute! Have fun! đ
Made with â€ïž for the DaisyUI community
â Star this repo if you find it useful!




