MCP Tailwind Gemini
Generates Angular components and projects with Tailwind CSS, including multi-framework component conversion.
Converts existing CSS/SCSS code into optimized Tailwind utility classes.
Supports design-to-code conversion through a Figma plugin for turning designs into Tailwind components.
Generates Next.js projects and components with Tailwind CSS through project and layout generation tools.
Generates Nuxt projects with Tailwind CSS through project generation.
Generates React components and projects with Tailwind CSS, including responsive and accessible variants.
Retrieves shadcn/ui components, optionally with demos and framework-specific output, for use in projects.
Generates Svelte components and projects with Tailwind CSS.
Provides Tailwind CSS tooling for component/layout generation, class optimization, theme creation, CSS conversion, design analysis, and preview generation.
Generates Vite-based projects with Tailwind CSS and selected components.
Generates Webpack-based projects with Tailwind CSS and selected components.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Tailwind Gemini generate a responsive React pricing card component with a dark theme"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π¨ MCP Tailwind Gemini
Advanced Model Context Protocol (MCP) server for Tailwind CSS with Gemini AI integration and cross-platform support for intelligent design assistance.
π 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
Related MCP server: TailwindCSS MCP Server
π¦ Installation
Prerequisites
Node.js 18 or higher
npm or yarn package manager
Gemini API key for AI features
Setup
Clone the repository:
git clone https://github.com/Tai-DT/mcp-tailwind-gemini.git cd mcp-tailwind-geminiInstall dependencies:
npm installBuild the project:
npm run buildSet up Gemini AI (optional):
export GEMINI_API_KEY="your-api-key-here"
π§ MCP Configuration
For Cursor IDE
Add to your ~/.cursor/mcp.json:
{
"mcpServers": {
"mcp-tailwind-gemini": {
"command": "node",
"args": ["/path/to/mcp-tailwind-gemini/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}For Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-tailwind-gemini": {
"command": "node",
"args": ["/path/to/mcp-tailwind-gemini/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}Config File Locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\\Claude\\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Alternative Configuration (using npm)
{
"mcpServers": {
"mcp-tailwind-gemini": {
"command": "npm",
"args": ["run", "start"],
"cwd": "/path/to/mcp-tailwind-gemini",
"env": {
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}π οΈ Available Tools
Component Generation
{
"tool": "generate_component",
"description": "Create a responsive button component",
"type": "button",
"variant": "primary",
"size": "lg",
"framework": "react",
"responsive": true,
"accessibility": true
}Class Optimization
{
"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
{
"tool": "create_theme",
"brandColor": "#3B82F6",
"style": "modern",
"colorCount": 9,
"includeConfig": true
}Design Analysis
{
"tool": "analyze_design",
"html": "<div>...</div>",
"checkAccessibility": true,
"checkResponsive": true,
"checkPerformance": true
}Preview Generation
{
"tool": "generate_preview",
"html": "<button class=\"bg-blue-500 text-white px-4 py-2 rounded\">Button</button>",
"width": 800,
"height": 600
}CSS Conversion
{
"tool": "convert_to_tailwind",
"code": ".button { padding: 1rem; background: #3B82F6; }",
"format": "css",
"optimize": true
}AI Suggestions
{
"tool": "suggest_improvements",
"html": "<div>...</div>",
"context": "E-commerce product card",
"focusAreas": ["accessibility", "performance", "ux"]
}Layout Generation
{
"tool": "create_layout",
"type": "dashboard",
"sections": ["header", "sidebar", "main", "footer"],
"complexity": "medium",
"framework": "react"
}Shadcn/ui Components
{
"tool": "get_shadcn_component",
"componentName": "button",
"includeDemo": true,
"framework": "react"
}Project Generation
{
"tool": "create_project",
"projectName": "My App",
"framework": "react",
"typescript": true,
"components": ["button", "card", "form"],
"template": "dashboard"
}π― 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
// 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
// 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"]
}π§ Development
Running Locally
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Start production server
npm startTesting MCP Server
Test with echo command:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node dist/index.jsTest with a simple tool call:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "generate_component", "arguments": {"description": "A simple button", "type": "button"}}}' | node dist/index.jsTest with environment variable:
GEMINI_API_KEY="your_key" node dist/index.jsEnvironment 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π§ Troubleshooting
Common Issues
MCP Server not starting:
Ensure you've run
npm run buildfirstCheck that
dist/index.jsexistsVerify Node.js version is 18+
Gemini API errors:
Set your
GEMINI_API_KEYenvironment variableVerify the API key is valid and has proper permissions
Check your internet connection
Claude Desktop not connecting:
Restart Claude Desktop after updating config
Check the config file path is correct
Verify JSON syntax is valid
Build errors:
# Clean and rebuild rm -rf dist/ node_modules/ npm install npm run build
Debug Mode
# Run with debug logging
DEBUG=mcp:* node dist/index.jsπ€ Contributing
We welcome contributions! Please see our contributing guidelines for details.
Development Setup
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
π License
MIT License - see LICENSE file for details.
πββοΈ Support
Issues: GitHub Issues
Documentation: Check the examples in this README
Discussions: GitHub Discussions
Built with β€οΈ for the Tailwind CSS and AI community
Available Tools
10 toolsanalyze_designC
Analyze design with AI for improvements and best practices
Inputs: html (required), css, context, checkResponsive, +2 more.
convert_to_tailwindC
Convert CSS/SCSS to Tailwind classes
Inputs: code (required), format (required), optimize, preserveCustom.
create_layoutC
Generate responsive layouts with Tailwind CSS
Inputs: type (required), sections (required), framework, complexity.
create_projectB
Create a complete project with Vite + Tailwind + shadcn/ui setup
Inputs: projectName (required), template, framework, components, +1 more.
create_themeB
Generate custom Tailwind theme with AI assistance
Inputs: brandColor (required), style, spacing, colorCount, +2 more.
generate_componentC
Generate Tailwind CSS components with AI assistance using Gemini
Inputs: type (required), description (required), size, theme, +5 more.
generate_previewC
Generate visual preview of Tailwind components
Inputs: html (required), width, height, darkMode, +1 more.
get_shadcn_componentB
Get shadcn/ui component source code and usage examples
Inputs: componentName (required), framework, includeDemo.
optimize_classesC
Optimize and clean up Tailwind CSS classes
Inputs: html (required), mergeConflicts, removeRedundant, suggestAlternatives.
suggest_improvementsC
Get AI-powered suggestions for design improvements
Inputs: html (required), context, focusAreas, targetAudience.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 10 tools
Most tools target distinct actions (generate, get, convert, optimize, preview), but analyze_design and suggest_improvements both read as 'AI-powered design feedback' with fuzzy boundaries, and generate_preview partially overlaps with generate_component. An agent could pick the wrong one for a feedback request, though descriptions give enough signal to recover.
All ten tools follow a clean snake_case verb_noun pattern (generate_component, get_shadcn_component, create_project, optimize_classes, convert_to_tailwind). Verb variety (generate/create/get/analyze) tracks meaning rather than breaking consistency.
Ten tools is well within the ideal 3-15 range and each maps to a recognizable step in the Tailwind/shadcn workflow (scaffold, fetch source, generate, convert, optimize, theme, preview, review). No obvious filler or redundancy beyond the noted feedback overlap.
The surface covers the lifecycle well: project scaffolding, component sourcing, generation, conversion, optimization, theming, and preview. Minor gaps existβno tool to list/browse available shadcn components, and no explicit write/install or config-editing operationβbut agents can work around these.
Maintenance
Related MCP Connectors
React + Tailwind UI components and recipes your AI coding tool can search and install.
React + Tailwind UI components and recipes your AI coding tool can search and install.
AI-powered design and management for Webflow Sites
Tailwind CSS palettes (50-950) from any color, the closest Tailwind color, and Tailwind's defaults
Related MCP Servers
- AlicenseBqualityDmaintenanceAn AI-powered Tailwind builder that helps developers create, inspire, and refactor UI components directly within their IDE, supporting popular frameworks like React, Next.js, Vue, and Svelte.633MIT
- AlicenseBqualityDmaintenanceProvides comprehensive tools for TailwindCSS development including utility class retrieval, CSS-to-Tailwind conversion, and color palette generation. It enables AI assistants to search documentation, generate component templates, and provide framework-specific installation guides.83,233 npm41MIT
- AlicenseNot gradedqualityDmaintenanceConverts design screenshots into reusable Tailwind HTML components via MCP protocol, enabling any AI to extract and export individual UI elements.8 npm2MIT
- FlicenseAqualityDmaintenanceCaptures webpage styles and HTML, converts CSS to Tailwind, and applies extracted designs to frontend frameworks like React.34-