daisyui-mcp

mcp
Guvenlik Denetimi
Gecti
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
Purpose
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.
SUMMARY

๐ŸŒผ A token-friendly local MCP server for DaisyUI component documentation using their public llms.txt.

README.md

MseeP.ai Security Assessment Badge

๐ŸŒผ DaisyUI MCP Server

Python
MCP
Docker
License

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)

Sonuc bulunamadi