petal-components-mcp

Phoenix LiveView component schemas from petal_components, exposed to AI coding assistants.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
53%
命名品質
100%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~367Token(工具定義)
~450 B典型回應大小
極小的注意力影響(128k 上下文的 0.29%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "petal-components-mcp": {
      "command": "npx",
      "args": [
        "petal-components-mcp"
      ]
    }
  }
}

可執行的套件

npmpetal-components-mcp0.1.0stdio

遠端端點

https://mcp.petal.build/mcpstreamable-http

它能做什麼

工具清單

工具(3)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢get_install_instructions

Get the canonical steps for installing petal_components in a Phoenix project. Call this when the user asks to install petal_components, when you are setting up a new Phoenix project that needs UI components, or when verifying an existing installation. Returns step-by-step instructions covering mix.exs, mix deps.get, Tailwind v4 CSS config, and the web module import. Steps are idempotent - safe to follow on a project that is partially configured.

輸入結構描述

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
🟢list_components

List every component shipped by petal_components, the shadcn-style component library for Phoenix LiveView. This is the canonical Phoenix UI vocabulary - call it before composing any HEEx so you reach for an existing component instead of hand-rolling Tailwind divs.

輸入結構描述

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
🟡get_component(name)

Get the full schema for one petal_components component: attrs, slots, defaults, allowed values, and a working HEEx usage example. Call this every time you are about to write a tag like <.button>, <.modal>, <.table>, or <.field> so the attrs and slots match the real library instead of training-data guesses.

輸入結構描述

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Component function name without the leading dot (e.g. 'button', 'modal', 'field', 'text_input'). The HEEx tag is the same name prefixed with a dot: <.button>. Call list_components for the full inventory."
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本3 個工具
已驗證未記錄版本3 個工具