Glue Code Generator

io.github.Maverick7由 GitHub 帳號 Maverick7 發布v1.0.6更新於 Oct 24, 2026

Maps API JSON to Vue/React components with Zod schemas and live UI previews

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

把範例 API JSON 對應成 Vue 或 React 設計系統元件的 Zod schema,並在對話中呈現即時 UI 預覽。

可以做什麼
  • 依範例 API JSON 與設計系統 Vue 元件產生 Zod schema 對應
  • 同時回傳對應後的資料預覽與產生的 schema 程式碼
  • 透過 mcp-ui 在對話中呈現即時 HTML 卡片預覽
  • 採兩階段運作:先產生 schema,再於執行階段呈現預覽
適用情境
適合在前端串接後端 API 時使用:讓助理草擬 API 回應與既有設計系統元件之間的 schema 對應,並在撰寫整合程式碼前先看到對應後的卡片樣貌。
執行需求
以本機 Node.js 程序執行;README 說明需安裝相依套件、建置並啟動伺服器,並在用戶端設定中指向建置後的進入點檔案。README 另提到本機 3000 埠的健康檢查與 MCP 連線位址。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
此工具會把 API 回應範例與元件原始碼當作輸入,請勿在提示中貼上真實客戶資料或密鑰。README 的用戶端設定範例使用寫死的本機檔案路徑,需替換成你自己的建置位置。產生的 schema 程式碼與預覽在使用前應人工檢視。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MCP UI Glue Code Generator

🎯 The Grand Slam Demo: Maps messy API JSON to Vue OR React Design System components using Zod schemas, with live UI previews via MCP-UI.

✨ What is this?

This is a Two-Stage System for automating frontend integration:

  1. Stage 1 (Factory): Takes "Messy API JSON" + "Design System Component" (Vue or React) → Generates Zod Schema mapping
  2. Stage 2 (Runtime): Renders a live preview using mcp-ui directly in your chat

🚀 Quick Start

bash
# Install dependenciesnpm install
# Build the servernpm run build
# Start the servernpm start

Server will be running at:

🔧 VS Code Integration

Option 1: Roo Code / Cline Extension

Add to your VS Code settings (settings.json):

json
{  "roo-cline.mcpServers": {    "glue-code-generator": {      "command": "node",      "args": ["d:/MCPUIPlugin/build/index.js"]    }  }}

Option 2: Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "glue-code-generator": {      "command": "node",      "args": ["d:/MCPUIPlugin/build/index.js"]    }  }}

🎮 Demo Walkthrough

The "Magic Moment"

  1. Open your AI chat (VS Code with Roo Code, or Claude Desktop)
  2. Paste this prompt:
Map this API response to this Vue component:
API Response:{  "cust_id": "USR-12345",  "tx_timestamp": "2025-12-06T10:30:00Z",  "stat_cd": "STATUS_OK",  "amt_val": 1250.50,  "desc_txt": "Monthly subscription payment"}
Vue Component:<template>  <div class="ds-card" :class="variant">    <h3>{{ title }}</h3>    <p class="subtitle">{{ subtitle }}</p>    <span class="amount">{{ formattedAmount }}</span>    <span class="badge" :class="variant">{{ status }}</span>  </div></template>
  1. Result: The tool generates the Zod schema AND renders the actual card live in chat!

🧪 Testing with MCP Inspector

bash
# Quick CLI testnpx @modelcontextprotocol/inspector --cli http://localhost:3000/mcp --method tools/list
# Or use the GUInpx @modelcontextprotocol/inspector# Then connect to http://localhost:3000/mcp with Streamable HTTP

📦 Tool Reference

generate_ui_schema

Maps API JSON to Vue component props.

Inputs:

ParameterTypeDescription
api_json_samplestringJSON response from backend API
vue_component_codestringVue component from Design System

Outputs:

  • Generated Zod schema code
  • Mapped data preview
  • Live HTML card rendered via mcp-ui

🏗️ Architecture

┌─────────────────────────────────────────────────────────┐│                    MCP Client                           ││         (VS Code / Claude Desktop / Goose)              │└────────────────────────┬────────────────────────────────┘                         │ MCP Protocol                         ▼┌─────────────────────────────────────────────────────────┐│             glue-code-generator Server                  ││  ┌─────────────────────────────────────────────────┐   ││  │         generate_ui_schema Tool                  │   ││  │  ┌───────────┐  ┌─────────────┐  ┌───────────┐  │   ││  │  │  Analyze  │→ │  Generate   │→ │  Render   │  │   ││  │  │  API JSON │  │ Zod Schema  │  │ UIResource│  │   ││  │  └───────────┘  └─────────────┘  └───────────┘  │   ││  └─────────────────────────────────────────────────┘   │└─────────────────────────────────────────────────────────┘

🚀 Publishing & Distribution

Option 1: Smithery (MCP Marketplace)

The official way for users to discover and install MCP servers:

  1. Create account at smithery.ai
  2. Submit your server with metadata
  3. Users can browse and add via: smithery install glue-code-generator

Option 2: npm Package

Publish to npm for npx usage:

bash
npm publish# Users run: npx @yourname/glue-code-generator

Option 3: GitHub

Users clone/download and configure manually in their MCP client settings.

Note: VS Code doesn't have a built-in MCP browser yet. Users configure MCP servers in their settings or use extensions like Roo Code/Cline.

📄 License

MIT

來源:README.md,提交 a754dfb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.6最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。