Logo MCP Tailwind Gemini Server

MCP Tailwind Gemini Server

Cộng đồng
Tai-DT

MCP Tailwind Gemini - AI-powered CSS generation and framework integration tool

Nhà phát hànhTai-DT
Kho mãmcp-tailwind-gemini
Ngôn ngữTypeScript
Bản fork
4
Sao
11
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    MCP Tailwind Gemini Server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    11 sao và 4 bản fork từ kho mã được liên kết.

MCP Tailwind Gemini Server

GitHub License Node.js TypeScript Tailwind CSS

Advanced Model Context Protocol (MCP) server for Tailwind CSS with Gemini AI integration and cross-platform support for intelligent design assistance across all major development environments.

🌟 Features

🤖 AI-Powered Design

  • Intelligent Component Generation: Create sophisticated Tailwind components using Gemini AI
  • Smart Optimization: AI-driven class optimization and conflict resolution
  • Design Analysis: Comprehensive design quality assessment with improvement suggestions
  • Theme Creation: Generate cohesive design systems with AI assistance

🎨 Tailwind CSS Tools

  • Component Generator: Create buttons, cards, forms, navigation, modals, and custom components
  • Class Optimizer: Clean up redundant classes and resolve conflicts
  • CSS Converter: Transform existing CSS/SCSS to Tailwind classes
  • Layout Generator: Build responsive layouts for dashboards, landing pages, blogs, and more
  • Theme Creator: Generate custom color palettes, typography, and design tokens
  • Preview Generator: Visual component previews with screenshot capability

🌐 Cross-Platform Integration

  • Multi-Framework Support: React, Vue, Svelte, Angular with automatic component conversion
  • Build Tool Integration: Vite, Webpack, Next.js, Nuxt, SvelteKit project generation
  • IDE Extensions: VS Code, WebStorm plugins with live assistance
  • Design Tool Sync: Figma plugin for design-to-code conversion
  • Universal Deployment: CLI tools, browser extensions, and API integrations

🚀 Advanced Capabilities

  • Framework Adapters: Automatic component conversion between frameworks
  • Universal Project Generation: Create full-stack applications with any tech stack
  • Multi-Platform Deployment: Deploy to development environments, production, and design tools
  • External API Integration: Gemini, OpenAI, Claude, Figma for enhanced AI capabilities
  • Responsive Design: Mobile-first approach with breakpoint optimization
  • Accessibility: WCAG compliance checking and enhancement suggestions
  • Performance: Bundle size optimization and render performance analysis
  • Visual Preview: Screenshot generation for component visualization

📦 Installation

Prerequisites

  • Node.js 18 or higher
  • npm or yarn package manager
  • Docker (for containerized deployment)
  • (Optional) Gemini API key for AI features

Quick Start with Docker

  1. Clone the repository:
bash
git clone https://github.com/Tai-DT/mcp-tailwind-gemini.git
cd mcp-tailwind-gemini
  1. Set up environment:
bash
# Copy environment template
cp env.example .env

# Edit .env file with your API key
# GEMINI_API_KEY=your_actual_api_key_here
  1. Deploy with Docker:
bash
# Build and run production container
docker-compose -f docker-compose.prod.yml up -d

# Check status
docker ps | grep mcp-tailwind-server

Local Development Setup

  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build
  1. Set up environment:
bash
# Copy environment template
cp env.example .env

# Edit with your API key
# GEMINI_API_KEY=your_actual_api_key_here
  1. Run development server:
bash
npm run dev

Claude Desktop Configuration

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "tailwind-gemini": {
      "command": "npx",
      "args": ["mcp-gemini-cli", "--allow-npx"],
      "env": {
        "GEMINI_API_KEY": ""your-api-key-here"
      }
}

Config File Locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\\Claude\\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Alternative Configuration (using npm):

json
{
  "mcpServers": {
    "mcp-tailwind-gemini": {
      "command": "npm",
      "args": ["run", "start"],
      "cwd": "/path/to/your/mcp-tailwind-gemini",
      "env": {
        "GEMINI_API_KEY": "your_gemini_api_key_here"
      }
    }
  }
}

For Cursor IDE

Add to your ~/.cursor/mcp.json:

json
{
  "mcpServers": {
    "mcp-tailwind-gemini": {
      "command": "node",
      "args": ["/path/to/your/mcp-tailwind-gemini/dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your_gemini_api_key_here"
      }
    }
  }
}

🛠️ Available Tools

Component Generation

javascript
{
  "tool": "generate_component",
  "description": "Create a responsive button component",
  "type": "button",
  "variant": "primary",
  "size": "lg",
  "framework": "react",
  "responsive": true,
  "accessibility": true
}

Class Optimization

javascript
{
  "tool": "optimize_classes", 
  "html": "<div class=\"p-4 px-4 py-4 text-blue-500 text-blue-600\">Content</div>",
  "removeRedundant": true,
  "mergeConflicts": true
}

Theme Creation

javascript
{
  "tool": "create_theme",
  "brandColor": "#3B82F6",
  "style": "modern",
  "colorCount": 9,
  "includeConfig": true
}

Design Analysis

javascript
{
  "tool": "analyze_design",
  "html": "<div>...</div>",
  "checkAccessibility": true,
  "checkResponsive": true,
  "checkPerformance": true
}

Preview Generation

javascript
{
  "tool": "generate_preview",
  "html": "<button class=\"bg-blue-500 text-white px-4 py-2 rounded\">Button</button>",
  "width": 800,
  "height": 600
}

CSS Conversion

javascript
{
  "tool": "convert_to_tailwind",
  "code": ".button { padding: 1rem; background: #3B82F6; }",
  "format": "css",
  "optimize": true
}

AI Suggestions

javascript
{
  "tool": "suggest_improvements",
  "html": "<div>...</div>",
  "context": "E-commerce product card",
  "focusAreas": ["accessibility", "performance", "ux"]
}

Layout Generation

javascript
{
  "tool": "create_layout",
  "type": "dashboard",
  "sections": ["header", "sidebar", "main", "footer"],
  "complexity": "medium",
  "framework": "react"
}

🎯 Use Cases

Creating Components

Generate production-ready components with AI assistance:

  • Modern button variants with accessibility features
  • Responsive card layouts with proper spacing
  • Form components with validation styling
  • Navigation menus with mobile-first design

Design Optimization

Improve existing designs with intelligent analysis:

  • Remove redundant Tailwind classes
  • Resolve conflicting utility classes
  • Optimize for performance and maintainability
  • Enhance accessibility compliance

Theme Development

Build comprehensive design systems:

  • Generate cohesive color palettes
  • Create typography scales
  • Design spacing systems
  • Export Tailwind configuration files

🌐 Cross-Platform Usage

Multi-Framework Development

javascript
// Convert HTML component to any framework
{
  "tool": "generate_component",
  "description": "Modern button component",
  "framework": "react", // or "vue", "svelte", "angular"
  "typescript": true,
  "features": ["loading-state", "variant-support"]
}

Universal Project Generation

javascript
// Create full-stack project with any tech stack
{
  "tool": "create_project",
  "name": "My App",
  "framework": "react",
  "buildTool": "vite", // or "webpack", "nextjs", "nuxt"
  "features": ["typescript", "tailwind", "testing", "deployment"]
}

Platform Integration

bash
# VS Code Extension
code --install-extension tailwind-mcp-assistant

# WebStorm Plugin  
# Install from JetBrains Marketplace: "Tailwind MCP Assistant"

# Figma Plugin
# Search "Tailwind MCP" in Figma Community

# CLI Tool
npm install -g tailwind-mcp-cli
tmcp generate --framework react --description "Product card"

# Browser Extension
# Install from Chrome Web Store: "Tailwind MCP Assistant"

Cross-Platform Workflow

bash
# 1. Design in Figma → Extract with plugin
# 2. Convert to multiple frameworks  
tmcp convert --from figma --to react,vue,svelte

# 3. Generate optimized projects
tmcp create-project --framework react --build vite
tmcp create-project --framework vue --build nuxt

# 4. Deploy to multiple platforms
tmcp deploy --platforms vercel,netlify,aws

Code Migration

Convert existing CSS to Tailwind:

  • Transform legacy CSS to utility classes
  • Migrate from other frameworks
  • Optimize class usage patterns
  • Maintain visual consistency

🔧 Development

Running Locally

bash
# Development mode with hot reload
npm run dev

# Build for production
npm run build

# Start production server
npm start

Testing MCP Server

  1. Test with echo command:
bash
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node dist/index.js
  1. Test with a simple tool call:
bash
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "generate_component", "arguments": {"description": "A simple button", "type": "button"}}}' | node dist/index.js
  1. Test with environment variable:
bash
GEMINI_API_KEY="your_key" node dist/index.js

Environment Variables

  • GEMINI_API_KEY: Your Google Gemini API key (optional)
  • NODE_ENV: Environment mode (development/production)

Project Structure

src/
├── index.ts              # Main MCP server
├── tools/                # MCP tool implementations
│   ├── component-generator.ts
│   ├── class-optimizer.ts
│   ├── theme-creator.ts
│   ├── design-analyzer.ts
│   ├── preview-generator.ts
│   ├── css-converter.ts
│   ├── ai-suggestions.ts
│   └── layout-generator.ts
└── utils/
    └── gemini.ts          # Gemini AI integration

🤝 Contributing

We welcome contributions! Please see our contributing guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🐳 Docker Deployment

Quick Docker Setup

bash
# Build production image
docker build -f Dockerfile.runtime -t mcp-tailwind-runtime:latest .

# Run container
docker run -d \
  --name mcp-tailwind-server \
  --env-file .env \
  --restart unless-stopped \
  mcp-tailwind-runtime:latest

Docker Compose (Recommended)

bash
# Start production stack
docker-compose -f docker-compose.prod.yml up -d

# View logs
docker-compose -f docker-compose.prod.yml logs -f

# Stop services
docker-compose -f docker-compose.prod.yml down

Security Best Practices

  1. Environment Variables:

    bash
    # Use .env file (never commit to Git)
    cp env.example .env
    # Edit .env with your actual API key
  2. Container Security:

    bash
    # Run with resource limits
    docker run -d \
      --name mcp-tailwind-server \
      --env-file .env \
      --memory=512m \
      --cpus=1.0 \
      --restart unless-stopped \
      mcp-tailwind-runtime:latest
  3. Network Isolation:

    bash
    # Create isolated network
    docker network create mcp-network
    
    # Run with custom network
    docker run -d \
      --name mcp-tailwind-server \
      --network mcp-network \
      --env-file .env \
      --restart unless-stopped \
      mcp-tailwind-runtime:latest

For detailed Docker and security guide, see DOCKER-SECURITY-GUIDE.md.

🔧 Troubleshooting

Common Issues

  1. MCP Server not starting:

    • Ensure you've run npm run build first
    • Check that dist/index.js exists
    • Verify Node.js version is 18+
  2. Gemini API errors:

    • Set your GEMINI_API_KEY environment variable
    • Verify the API key is valid and has proper permissions
    • Check your internet connection
  3. Docker container issues:

    bash
    # Check container logs
    docker logs mcp-tailwind-server
    
    # Verify environment
    docker exec mcp-tailwind-server env | grep GEMINI
    
    # Restart container
    docker restart mcp-tailwind-server
  4. Claude Desktop not connecting:

    • Restart Claude Desktop after updating config
    • Check the config file path is correct
    • Verify JSON syntax is valid
  5. Build errors:

    bash
    # Clean and rebuild
    rm -rf dist/ node_modules/
    npm install
    npm run build

Debug Mode

bash
# Run with debug logging
DEBUG=mcp:* node dist/index.js

# Docker debug
docker run -it --rm \
  --env-file .env \
  mcp-tailwind-runtime:latest npm run dev

🙋‍♂️ Support


Built with ❤️ for the Tailwind CSS and AI community

Cài đặt

TypingMind
{
  "mcpServers": {
    "mcp-tailwind-gemini": {
      "command": "npm",
      "args": [
        "run",
        "start"
      ]
    }
  }
}

Dùng MCP MCP Tailwind Gemini Server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối MCP Tailwind Gemini Server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm MCP Tailwind Gemini Server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của MCP Tailwind Gemini Server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "mcp-tailwind-gemini": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-tailwind-gemini"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của MCP Tailwind Gemini Server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của MCP Tailwind Gemini Server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng MCP Tailwind Gemini Server giúp tôi làm việc này không?
MCP Tailwind Gemini Server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng MCP Tailwind Gemini Server.

Câu hỏi thường gặp

Máy chủ MCP MCP Tailwind Gemini Server dùng để làm gì?

MCP Tailwind Gemini Server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP MCP Tailwind Gemini Server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng MCP Tailwind Gemini Server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP MCP Tailwind Gemini Server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối MCP Tailwind Gemini Server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP MCP Tailwind Gemini Server với TypingMind?

MCP Tailwind Gemini Server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP MCP Tailwind Gemini Server cung cấp những công cụ nào trong TypingMind?

MCP Tailwind Gemini Server cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP MCP Tailwind Gemini Server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu MCP Tailwind Gemini Server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇