Skip to main content
Glama
hanzochang

Color Palette Generator MCP App

by hanzochang

Color Palette Generator MCP App

AIチャット内にインタラクティブなカラーパレット生成UIを埋め込むMCP Appです。

セットアップ

pnpm install

Related MCP server: MCP Color Picker

起動方法

# UIビルド + サーバー起動
pnpm start

サーバーが http://localhost:3001/mcp で起動します。

開発モード(ホットリロード)

pnpm dev

Claude Desktopへの接続

~/Library/Application Support/Claude/claude_desktop_config.json に以下を追加します。

{
  "mcpServers": {
    "color-palette": {
      "command": "/opt/homebrew/bin/npx",
      "args": ["tsx", "/path/to/mcp-apps/main.ts", "--stdio"]
    }
  }
}

設定後、Claude Desktopを再起動してください。

HTTP経由で接続する場合

pnpm serve

で起動後、http://localhost:3001/mcp に接続します。

動作確認(curl)

# initializeリクエスト
curl -X POST http://localhost:3001/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}'

# パレット生成
curl -X POST http://localhost:3001/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"generate-palette","arguments":{"baseColor":"#3498db","paletteType":"analogous"}}}'

ツール

ツール名

説明

generate-palette

ベースカラーからパレットを生成(complementary, analogous, triadic, monochromatic, split-complementary)

check-contrast

2色間のWCAGコントラスト比を計算

新しいMCP Appプロジェクトを作る

このプロジェクトの構成をベースに、新しいMCP Appをスキャフォールドするスキルを用意しています。

Claude Code上で以下を実行してください。

/skill dev_init-mcp-app my-new-app

サーバー・クライアント・Viteバンドル・デュアルトランスポート(stdio + HTTP)の雛形が一括生成されます。

技術スタック

  • @modelcontextprotocol/ext-apps 1.0.1

  • @modelcontextprotocol/sdk 1.26.0

  • zod 4.x

  • Vite + vite-plugin-singlefile

  • TypeScript

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A comprehensive toolkit for color conversion, manipulation, and accessibility analysis supporting formats like OkLCH and WCAG compliance. It enables AI agents to manage design systems by generating harmonious palettes, transforming color spaces, and performing contrast checks.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An interactive color picker that renders as a UI inside MCP-compatible hosts like VS Code GitHub Copilot and Claude.
    1
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    Enables color conversion between HEX/RGB/HSL/HSV/CMYK, palette generation, WCAG contrast checking, color mixing/adjustment, and CSS gradient creation for AI agents.
    5
    24 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides WCAG 2.1 color contrast checking tools, including contrast ratio computation, compliance evaluation, and accessible color suggestions for AI assistants.
    3
    19 npm
    Apache 2.0