StyleKit

io.github.AnxForever由 GitHub 帳號 AnxForever 發布v0.5.0更新於 Oct 24, 2026

MCP server for StyleKit styles, tokens, recipes, lint and repair over stdio or HTTP.

已驗證Streamable HTTP可網頁執行開發者工具媒體與設計

概覽

AI 產生的概覽

StyleKit 為助理提供 UI 設計風格目錄、設計權杖、元件配方以及程式碼檢查與修復,讓產生的前端程式碼符合所選風格。

可以做什麼
  • 搜尋與讀取風格:依關鍵字或分類尋找風格,取得風格的理念、配色、該做與不該做的規則以及設計權杖
  • 產生元件:取得按鈕、卡片、輸入框等可直接使用的 Tailwind className 與 JSX 配方,以及該風格的 shadcn 主題安裝指令
  • 瀏覽素材:列出並取得公開範本、元件樣式與體驗包,附帶授權與來源中繼資料
  • 檢查與修復程式碼:依風格規則檢查產生的 UI 程式碼,並用風格自身的權杖改寫偏離的類別名稱
  • 取得實作說明:一次回傳規則、CSS、範本、配方與權杖的大份量內容,也可只取指定部分
適用情境
適合助理撰寫或修改前端 UI 程式碼、且希望遵循一致明確的設計風格而非自行發揮時使用,並可在產生後驗證結果。也適合取得參考範本與 shadcn 主題安裝指令。
執行需求
可透過 npx(需 Node.js)以本機 stdio 程序執行,也可使用遠端 HTTP 端點。未宣告需要帳號、API 金鑰或環境變數。即時目錄資料與遠端素材需要網路存取;即時資料不可用時會改用內建快照。
安裝前請注意
所有工具皆為唯讀,不會代你寫入或刪除資料。檢查與修復僅為靜態檢查,不保證視覺品質或無障礙性,執行時運算式可能被判定為無法確定。即時資料可能退回內建快照,需要時請查看 origin 與 fallbackReason。為便於重現,建議固定具體的套件版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 StyleKit,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.AnxForever%2Fstylekit-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "stylekit": {
      "type": "http",
      "url": "https://www.stylekit.top/mcp"
    }
  }
}

README

stylekit-mcp

MCP server for StyleKit — search design styles and retrieve templates, assets, tokens, recipes, and lint checks from Claude, Cursor, or Windsurf.

The server runs locally over stdio using the official MCP SDK. It bundles stylekit-core; the published process depends on @modelcontextprotocol/sdk and zod, and needs network access only for live catalogue data and remote assets. It is MIT-licensed.

Tools

All tools are read-only.

ToolWhat it does
stylekit_search_stylesSearch styles by keyword and/or category
stylekit_list_assetsBrowse public templates and design assets by kind or query, with pagination and source provenance
stylekit_get_assetRetrieve a namespaced public asset detail and any source files the license permits
stylekit_get_implementation_briefComplete AI guidance, CSS, templates, recipes, tokens, readiness, merged lint rules and provenance (0.3.0)
stylekit_get_styleFull style profile: philosophy, palette, do/don't rules, quality/capability signals
stylekit_get_style_tokensTyped design tokens: border, shadow, typography, spacing, colors
stylekit_get_component_recipeRendered component className + JSX (button/card/input)
stylekit_get_shadcn_installThe npx shadcn add command for a style's theme
stylekit_lint_codeCheck generated UI code against a style's rules, with a reason and a fix per violation

stylekit_lint_code is the one worth building into your loop: call it after the agent writes UI code, so a style's constraints are verified rather than assumed. It resolves variant prefixes (dark:, md:, hover:) before matching, and understands JSX/HTML class attributes, cn()/clsx() calls, and template literals.

Setup

Add this configuration once to your MCP client:

json
{  "mcpServers": {    "stylekit": {      "command": "npx",      "args": ["-y", "--prefer-online", "stylekit-mcp@latest"]    }  }}
  • Claude Desktop / Claude Code: claude_desktop_config.json or .mcp.json
  • Cursor: .cursor/mcp.json
  • Windsurf: the Windsurf MCP config

When the client starts the MCP process, npx checks npm for the current latest release, including when the package is already cached. A running MCP process does not replace itself; restart the server or client to load an update. For a reproducible setup, replace stylekit-mcp@latest with an exact published version such as [email protected]. The npm caching options describe how --prefer-online handles cached packages.

To run a locally built copy instead, point your client at the absolute path:

json
{  "mcpServers": {    "stylekit": { "command": "node", "args": ["/abs/path/to/packages/mcp/dist/index.js"] }  }}

Public assets

stylekit_list_assets accepts optional kind and query filters plus offset/limit. It returns a structured page with the namespace, content level, availability, license and attribution metadata, and whether the page came from the live API or bundled snapshot. An offset beyond the last result is an empty successful page.

stylekit_get_asset returns the complete asset detail as structured data and JSON text. contentLevel tells you what is actually available: source and remote assets can include source files; metadata and restricted entries do not. availability distinguishes bundled, remote, external and restricted content. External and restricted entries provide metadata or source links only; they are not represented as downloadable full source. Remote templates require the live API to return their actual file set; if that source is unavailable, the tool reports an error instead of returning a placeholder as code.

Example

In your editor's AI chat:

"Search StyleKit for a frosted glass style, then give me its button recipe and the shadcn install command."

The agent calls stylekit_search_styles → stylekit_get_component_recipe → stylekit_get_shadcn_install and hands back ready-to-use code.

Development

bash
pnpm --filter stylekit-mcp build # compile to dist/node scripts/smoke.mjs  # smoke-test all tools over stdio

License

MIT

Release contents

The published MCP package includes the public asset tools, source provenance, and discovery reliability fixes described above. It bundles stylekit-core; the runtime npm dependencies remain the MCP SDK and Zod.

Call the brief tool before generation and save its stylekit-brief-v1 payload for later validation. provenance.source identifies the data origin; contentHash detects drift.

Lint returns status: pass | fail | inconclusive. ok is true only for a conclusive static pass. Runtime expressions are reported as inconclusive unless known literals already contain a violation. Missing requirements are advisory; pass strict: true and checkRequired: ["button"] to fail them in a static component snippet. Required checks cover the entire input, not each element. These checks do not certify visual quality or accessibility.

來源:packages/mcp/README.md,提交 3d40e73

工具

10

stylekit_search_styles

Search StyleKit styles

Search StyleKit design styles by keyword and/or category, with pagination. Exact slug or name matches are ranked first. Args: - query (string, optional): matches slug, name, description, tags, keywords (case-insensitive). - category ('modern'|'retro'|'minimal'|'expressive', optional): restrict to one category. - limit (number 1-50, default 15): page size. - offset (number >=0, default 0): results to skip (for paging). Returns structured JSON with total, count, offset, hasMore, next_offset (null on the last page), has_more as a deprecated alias, source, optional fallbackReason, and results. A valid query with no matches returns an empty results array, not a tool error. Examples: - "find a glassy frosted style" -> query: "glass" - "next page of retro styles" -> category: "retro", offset: 15 - For full tokens of one style, use stylekit_get_style_tokens instead.

輸入參數limitqueryoffsetcategory

stylekit_list_assets

List public StyleKit assets

Browse StyleKit's public asset catalogue by namespace and query. Use the returned kind/id pair with stylekit_get_asset. Args: - kind (optional): one public namespace such as animation, component-pattern, template, or experience-pack. - query (optional): search public names, descriptions and tags. - offset (number >=0, default 0): results to skip. - limit (number 1-100, default 20): page size. Returns the full JSON page, including count, hasMore, next_offset, availability, contentLevel, license, attribution, source provenance, and kind counts. An empty page is a successful result. Private user kits and unpublished submissions are not listed. Examples: - "show me a pricing template" -> query: "pricing", then stylekit_get_asset with the returned kind/id. - Templates that include source files can be large; list first and fetch only the asset you need.

輸入參數kindlimitqueryoffset

stylekit_get_asset

Get a public StyleKit asset

Retrieve one public asset by its exact kind and id. Source is returned only where the asset's contentLevel and license permit it. Remote templates include their actual file set only when the live source is available; if it is down, the tool returns a structured unavailable error with safe metadata and does not treat a download URL as source code. External and restricted assets expose metadata, license, attribution and source links only. Args: - kind: the namespace returned by stylekit_list_assets. - id: the exact identifier within that namespace. - includeSource (boolean, default true): include permitted source files/code; false returns metadata and links only. - files (array, optional): exact source file paths to include (templates); omit for all files. Unmatched paths are reported as missingFiles. Returns complete structured JSON and JSON text, preserving the namespace and provenance. Examples: - "show me the pricing template" -> kind: "template", id from stylekit_list_assets. - "just the page and styles" -> kind: "template", files: ["app/page.tsx", "app/globals.css"]. - A full template can return tens of thousands of characters; use includeSource: false or files to keep it small.

輸入參數id必填kind必填filesincludeSource

stylekit_get_style

Get StyleKit style detail

Get one style's full profile: philosophy, palette, do/don't rules, keywords, and what's available (tokens, recipes, shadcn install). Style data is read from the live catalogue with a five-minute cache; when live data is unavailable, a bundled snapshot may be returned and marked with origin and fallbackReason. Args: - slug (string): style identifier, e.g. "glassmorphism", "neo-brutalist". Returns JSON: { slug, name, nameEn, category, tags, description, philosophy, colors, doList, dontList, keywords, hasTokens, hasRecipes, recipeIds, shadcnInstall, url, quality, origin, fallbackReason? }. The content provenance is separate from origin when returned by the implementation brief. Examples: - "how should I use neo-brutalist?" -> slug: "neo-brutalist" - Returns an error with a hint if the slug is unknown.

輸入參數slug必填

stylekit_get_style_tokens

Get StyleKit style design tokens

Get a style's design tokens (Tailwind class mappings): border, shadow, typography, spacing, semantic colors, and forbidden/required classes. Style data is read from the live catalogue with a five-minute cache; when live data is unavailable, a bundled snapshot may be returned and marked with origin and fallbackReason. Args: - slug (string): style identifier. Returns JSON: the full StyleTokens object plus origin (live or bundled) and optional fallbackReason. Content provenance is distinct from transport origin. Examples: - "give me the spacing and border tokens for bento-grid" -> slug: "bento-grid" - Returns an error if the style has no tokens registered.

輸入參數slug必填

stylekit_get_component_recipe

Get StyleKit component recipe

Render a ready-to-use component for a style: the full Tailwind className and JSX code. Components are usually "button", "card", "input" (check recipeIds via stylekit_get_style). Recipe data is read from the live catalogue with a five-minute cache; a bundled snapshot may be returned during an outage and is marked with origin and fallbackReason. Args: - slug (string): style identifier. - component (string): recipe id, e.g. "button", "card", "input". Returns JSON: { slug, component, className, code, origin, fallbackReason? }. Examples: - "give me a glassmorphism button" -> slug: "glassmorphism", component: "button" - Returns an error listing available recipes if the component isn't found.

輸入參數slug必填component必填

stylekit_get_shadcn_install

Get StyleKit shadcn install command

Get the one-line shadcn CLI command that installs a style's color theme (light + dark) into a shadcn project. Args: - slug (string): style identifier. Returns JSON: { slug, command, registryUrl, prerequisite, lookupOrigin, fallbackReason? }. The command is derived from the style slug; lookupOrigin reports how StyleKit confirmed that slug. Examples: - "how do I install the synthwave theme?" -> slug: "synthwave" - The target project must have a tsconfig.json or the shadcn CLI errors out.

輸入參數slug必填

stylekit_lint_code

Lint code against a StyleKit style

Check whether code actually follows a style's rules. Use this AFTER generating or editing UI code to verify it matches the style, instead of assuming it does. Reports forbidden classes with the reason they are banned and a concrete replacement. Understands JSX/HTML class attributes, cn()/clsx() calls, and template literals; variant prefixes (dark:, md:, hover:) are resolved before matching. Args: - slug (string): style identifier, e.g. "glassmorphism". - code (string): the source to check. JSX/TSX, HTML, or a bare class string. - checkRequired (array of 'button'|'card'|'input', optional): also report required classes the code is missing. Only pass components the code is supposed to contain. Returns JSON: { slug, ok, violations: [{ className, baseClassName, line, severity, source, rule, reason, fix }], missingRequired, checkedClasses, ruleSources, origin, contentSource, fallbackReason? }. Lint rules come from the same live implementation brief used for generation; its five-minute cache and any bundled fallback are reported separately from content provenance. Examples: - "does this button match neo-brutalist?" -> slug: "neo-brutalist", code: "<button className=...>", checkRequired: ["button"] - strict (boolean, default false): fail missing required classes in a static component snippet. Required checks cover the whole input, not each element. - status is pass, fail, or inconclusive. Runtime class expressions cannot be fully verified. ok is true only for a conclusive static pass; visual quality still needs review.

輸入參數code必填slug必填strictcheckRequired

stylekit_repair_code

Repair code so it follows a StyleKit style

Rewrite code that drifts from a style, using the style's own tokens as replacements. Use this instead of hand-editing class names after stylekit_lint_code reports violations. Every applied rewrite comes from the style's tokens, never from a guess: variants (dark:, md:, hover:) are preserved, multi-class replacements are deduplicated, and string literals inside cn()/clsx() expressions are rewritten while variable references and interpolation spans are left untouched. JSX/HTML class attributes, template literals, and a bare class string are all handled. Spacing, layout and structure are never changed. Args: - slug (string): style identifier. - code (string, 1-100000 chars): source to repair. Returns JSON: { slug, code, edits: [{ from, to, line }], unfixed: [{ className, line, reason }], before, report, origin, contentSource, fallbackReason? }. Apply the returned code as-is, then review any entries in unfixed yourself — the rules flagged them but no concrete replacement exists. Examples: - "make this hero match neo-brutalist" -> slug: "neo-brutalist", code: "<section className=\"rounded-2xl shadow-2xl\">" - If edits is empty and before.status is "pass", the code already matched. Do not invent further changes.

輸入參數code必填slug必填

stylekit_get_implementation_brief

Get complete StyleKit implementation brief

Fetch one complete implementation contract before generating UI. Use this when you need the full rules, CSS, templates, recipes and tokens in one call; the full payload is large (often 30k-60k characters). Pass sections to return only identity/provenance plus the parts you need. Args: - slug (string): style identifier. - sections (array, optional): philosophy, aiRules, doList, dontList, colors, globalCss, components, variants, tokens, recipes, readiness, lintRules. Returns JSON: { schemaVersion: "stylekit-brief-v1", slug, name, nameEn, category, styleType, description, tags, keywords, provenance, origin, fallbackReason?, sections?, plus the selected sections }. provenance.source records the content publisher (bundled, static, or community) and is distinct from transport origin. Coverage guidance does not certify visual quality or accessibility. Examples: - "build a landing page in glassmorphism" -> slug: "glassmorphism"; keep the returned stylekit-brief-v1 payload for later validation. - "just give me the rules and tokens" -> slug: "glassmorphism", sections: ["aiRules", "tokens", "lintRules"].

輸入參數slug必填sections

版本歷史

4
  1. v0.5.0最新Oct 21, 2026
  2. v0.4.1Oct 2, 2026
  3. v0.4.0Oct 2, 2026
  4. v0.2.5Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分