{
 "$schema": "https://static.modelcontextprotocol.io/schemas/mcp-server-card/v1.json",
 "name": "com.clawhard/swatch",
 "title": "Swatch",
 "version": "1.0.0",
 "description": "Swatch checks text and background color contrast against WCAG, shows the closest colors that pass, and builds a full 50-950 palette from any color. Runs in your browser, no account.",
 "websiteUrl": "https://swatch.clawhard.com",
 "documentationUrl": "https://swatch.clawhard.com/llms.txt",
 "iconUrl": "https://clawhard.com/icon-512.png",
 "serverInfo": {
  "name": "com.clawhard/swatch",
  "title": "Swatch",
  "version": "1.0.0"
 },
 "protocolVersion": "2025-06-18",
 "transport": "streamable-http",
 "endpoint": "https://swatch.clawhard.com/mcp",
 "remotes": [
  {
   "type": "streamable-http",
   "url": "https://swatch.clawhard.com/mcp"
  }
 ],
 "authentication": {
  "required": false
 },
 "capabilities": {
  "tools": {
   "listChanged": false
  },
  "prompts": {
   "listChanged": false
  },
  "resources": {
   "subscribe": false,
   "listChanged": false
  }
 },
 "tools": [
  {
   "name": "swatch_check_contrast",
   "title": "Check the WCAG contrast of a text and background color",
   "description": "Use when the user asks whether a color combination is readable or accessible, passes WCAG AA or AAA, or has enough contrast (text on a background, button, badge, link color). Returns the exact contrast ratio, pass or fail for normal text, large text and UI components at AA and AAA, the APCA lightness contrast and a plain note. Colors can be hex, rgb(), hsl() or CSS names. Example: {\"foreground\": \"#777777\", \"background\": \"#ffffff\"}. Language models cannot compute this reliably, so call it instead of guessing."
  },
  {
   "name": "swatch_fix_contrast",
   "title": "Find the nearest accessible color that passes contrast",
   "description": "Use when a color pair fails contrast and the user wants the smallest change that makes it pass, such as \"make this gray text accessible without changing the look\". Returns the closest text color on that background that reaches the target (AA, AAA, AA-large or ui), and separately the closest background, keeping the hue. Example: {\"foreground\": \"#777777\", \"background\": \"#ffffff\", \"target\": \"AA\"}. Returns already_passes if nothing needs to change."
  },
  {
   "name": "swatch_pick_text_color",
   "title": "Pick black or white text for a background",
   "description": "Use when the user asks what text color (black or white) to put on a given background, button or brand color so it is readable. Returns the better of black or white with both contrast ratios, the WCAG grade and a softer near-black option. Example: {\"background\": \"#ff5a1f\"}."
  },
  {
   "name": "swatch_make_scale",
   "title": "Build a 50-950 color palette from one color",
   "description": "Use when the user asks for a palette, shades, tints, a design-token scale or a Tailwind-style 50 to 950 ramp from a brand color. Returns 11 steps that keep the hue, with the hex, contrast on white and on black, and the best text color for each step. Example: {\"color\": \"#ff5a1f\", \"name\": \"brand\"}."
  },
  {
   "name": "swatch_convert_color",
   "title": "Convert a color between hex, rgb, hsl and oklch",
   "description": "Use when the user asks to convert a color between hex, RGB, HSL and OKLCH, or asks what a color is called or how light it is. Returns all formats, the relative luminance and the nearest CSS color name. Example: {\"color\": \"#ff5a1f\"}. Exact math, so prefer it to converting by hand."
  },
  {
   "name": "swatch_check_pairs",
   "title": "Check contrast for many color pairs at once",
   "description": "Use when the user has a whole design system, theme or stylesheet and wants every text and background pair checked for accessibility in one go. Takes up to 50 pairs and returns the ratio and AA and AAA results for each, with a count of failures. Example: {\"pairs\": [{\"foreground\": \"#777\", \"background\": \"#fff\", \"label\": \"muted text\"}, {\"foreground\": \"#fff\", \"background\": \"#ff5a1f\", \"label\": \"button\"}]}."
  }
 ],
 "prompts": [
  {
   "name": "swatch_audit_my_colors",
   "title": "Check my colors for contrast",
   "description": "Check text and background pairs against WCAG and fix the ones that fail."
  }
 ],
 "publisher": {
  "name": "Clawhard Studio",
  "url": "https://clawhard.com",
  "contact": "support@clawhard.com"
 }
}