daisyui-mcp
Health Gecti
- License รขโฌโ License: MIT
- Description รขโฌโ Repository has a description
- Active repo รขโฌโ Last push 0 days ago
- Community trust รขโฌโ 58 GitHub stars
Code Gecti
- Code scan รขโฌโ Scanned 3 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions รขโฌโ No dangerous permissions requested
This MCP server provides AI assistants with local access to DaisyUI component documentation. It fetches data from a public llms.txt file and exposes two tools: listing available components and retrieving detailed documentation for a specific one.
Security Assessment
The tool poses a low security risk. The code scan of 3 files found no dangerous patterns and detected no hardcoded secrets. The server does make network requests, but they are limited to fetching a public, static text file from daisyui.com. It does not request dangerous system permissions or execute arbitrary shell commands. The server runs locally, keeping your development environment isolated.
Quality Assessment
The project demonstrates strong health and maintenance metrics. It is licensed under the permissive MIT license, actively maintained (last updated today), and has garnered 58 GitHub stars, indicating a baseline of community trust. It uses Python 3.10+ and can be easily deployed via virtual environments or Docker.
Verdict
Safe to use.
๐ผ A token-friendly local MCP server for DaisyUI component documentation using their public llms.txt.
๐ผ 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!
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi
