Daisyui MCP
πΌ A token-friendly local MCP server for DaisyUI component documentation using their public llms.txt.
Installation
npx daisyui-mcpAsk AI about Daisyui MCP
Powered by Claude Β· Grounded in docs
I know everything about Daisyui MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
πΌ 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
β¨ 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
git clone https://github.com/birdseyevue/fastmcp.git
cd fastmcp
2. Create a virtual environment (recommended)
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
3. Install dependencies
pip install -r requirements.txt
π³ Docker
You can also run the MCP server using Docker.
Build and run with Docker
docker build -t daisyui-mcp .
docker run -i --rm daisyui-mcp
Using Docker Compose
docker 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
π Docker Configuration
{
"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:
python update_components.py
This fetches the latest llms.txt from DaisyUI and generates all the markdown files in /components.
Running the server
python mcp_server.py
Updating component docs
If DaisyUI releases new components or updates their docs, simply run:
python update_components.py
βοΈ Configuration
Add the MCP server to your AI assistant's configuration:
π Generic Configuration
{
"servers": {
"daisyui": {
"command": "<path-to-repo>/venv/Scripts/python.exe",
"args": ["<path-to-repo>/mcp_server.py"]
}
}
}
πͺ Windows Example
{
"servers": {
"daisyui": {
"command": "C:/Users/username/Downloads/fastmcp/venv/Scripts/python.exe",
"args": ["C:/Users/username/Downloads/fastmcp/mcp_server.py"]
}
}
}
π macOS/Linux Example
{
"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!
