Skip to main content
Glama
CarbonoDev

TailwindCSS MCP Server

by CarbonoDev

get_tailwind_colors

Retrieve TailwindCSS color palette details including shades and hex values for design consistency and development workflows.

Instructions

Get TailwindCSS color palette information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNameNoSpecific color name (e.g., 'blue', 'red')
includeShadesNoInclude all color shades (default: true)

Implementation Reference

  • The handler for the get_tailwind_colors tool, which delegates to the utilityMapper service.
    private async handleGetTailwindColors(args: any): Promise<any> {
      try {
        const params = this.validateGetColorsParams(args);
        const colors = await this.utilityMapper.getColors(params);
        return this.createSuccessResponse(colors);
      } catch (error) {
        this.handleServiceError(error, "Failed to get TailwindCSS colors");
      }
    }
  • The actual implementation logic that retrieves color information and filters shades if required.
    async getColors(params: GetColorsParams): Promise<ColorInfo[]> {
      let colors = this.getColorInfo(params.colorName);
      
      if (!params.includeShades) {
        // Filter out shade details if requested
        colors = colors.map(color => ({
          ...color,
          shades: {},
        }));
      }
    
      return colors;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CarbonoDev/tailwindcss-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server