Token导航 LogoToken导航TokenDH.com
Stitch Pro MCP logo
AI代理stdio官方级别未说明来源级核验

Stitch Pro MCP

MCP Server

stitch-pro-mcp

stitch-pro-mcp是一款基于Google Stitch的智能MCP服务器,提供设计系统、无障碍访问、响应式布局、React/Vue/Svelte框架转换及自动编排功能,将生成的原始HTML转化为生产就绪的组件。

工具数

17

提示词数

0

GitHub Stars

5

资源数

0
TypeScriptClaude设计系统ClaudeCursorWindsurfVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

LuciferDono

提供方

LuciferDono

最后核验

2026/5/17 20:23

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx stitch-pro-mcp

详细介绍

stitch-pro-mcp

The intelligent MCP server for Google Stitch.

Design systems. Accessibility. Responsive. React/Vue/Svelte. Auto-orchestration.

18 tools. One prompt.

Quick Start · Tools · Examples · Architecture

______________________________________________________________________

问题

谷歌拼接 从文本提示中生成漂亮的UI。但它输出 原始HTML --没有设计系统,没有可访问性,没有响应断点,没有框架组件。

每个现有的Stitch MCP都是一个薄包装。生成屏幕,获取HTML,完成。

stitch pro mcp填补了从生成到生产的空白。

现有mcp缝合pro mcp
生成屏幕:white_check_mark::white_check_mark:
设计系统实施:x::white_check_mark:
WCAG 2.1 AA可访问性:x::white_check_mark:
响应断点:x::white_check_mark:
React/Next.js输出:x::white_check_mark:
Vue 3输出:x::white_check_mark:
SvelteKit输出:x::white_check_mark:
shadcn/radix/MUI映射:x::white_check_mark:
多屏幕流程:x::white_check_mark:
自动编排:x::white_check_mark:

快速开始

1.获取Stitch API密钥

访问 stitch.withgoogle.com 并创建API密钥。

2.安装

# Run directly (no install)
npx stitch-pro-mcp

# Or install globally
npm install -g stitch-pro-mcp

3.配置编辑器

Claude Code

推荐(CLI):

# Install globally first
npm install -g stitch-pro-mcp

# Add to Claude Code with API key
claude mcp add -e STITCH_API_KEY=your-api-key --transport stdio stitch-pro -- node $(npm root -g)/stitch-pro-mcp/dist/bin/cli.js

Windows用户: 使用已安装CLI的完整路径:

claude mcp add -e STITCH_API_KEY=your-api-key --transport stdio stitch-pro -- node "C:/Users/YOUR_USER/AppData/Roaming/npm/node_modules/stitch-pro-mcp/dist/bin/cli.js"
注: Claude Code中的MCP服务器配置在 ~/.claude.json (局部范围),不在 ~/.claude/settings.json.使用 claude mcp add 配置——它会自动处理正确的文件。

Cursor

添加 .cursor/mcp.json:

{
  "mcpServers": {
    "stitch-pro": {
      "command": "npx",
      "args": ["-y", "stitch-pro-mcp"],
      "env": { "STITCH_API_KEY": "your-api-key" }
    }
  }
}

VS Code (Copilot)

添加 .vscode/mcp.json:

{
  "servers": {
    "stitch-pro": {
      "command": "npx",
      "args": ["-y", "stitch-pro-mcp"],
      "env": { "STITCH_API_KEY": "your-api-key" }
    }
  }
}

Windsurf

添加 ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "stitch-pro": {
      "command": "npx",
      "args": ["-y", "stitch-pro-mcp"],
      "env": { "STITCH_API_KEY": "your-api-key" }
    }
  }
}

Gemini CLI

添加 ~/.gemini/settings.json:

{
  "mcpServers": {
    "stitch-pro": {
      "command": "npx",
      "args": ["-y", "stitch-pro-mcp"],
      "env": { "STITCH_API_KEY": "your-api-key" }
    }
  }
}

Codex (OpenAI)

添加 ~/.codex/config.json:

{
  "mcpServers": {
    "stitch-pro": {
      "command": "npx",
      "args": ["-y", "stitch-pro-mcp"],
      "env": { "STITCH_API_KEY": "your-api-key" }
    }
  }
}

Antigravity

{
  "mcpServers": {
    "stitch-pro": {
      "command": "npx",
      "args": ["-y", "stitch-pro-mcp"],
      "env": { "STITCH_API_KEY": "your-api-key" }
    }
  }
}

OpenCode

{
  "mcpServers": {
    "stitch-pro": {
      "command": "npx",
      "args": ["-y", "stitch-pro-mcp"],
      "env": { "STITCH_API_KEY": "your-api-key" }
    }
  }
}
提示:STITCH_API_KEY 作为系统环境变量,省略 env 完全封锁。

故障排除

Windows: "Connection closed" or server not connecting

在Windows上, npx 不能直接作为MCP命令工作。使用以下方法之一:

选项A:全局安装+使用 node 完整路径(推荐)

npm install -g stitch-pro-mcp
# Then configure with absolute path to the CLI:
# node C:/Users/YOUR_USER/AppData/Roaming/npm/node_modules/stitch-pro-mcp/dist/bin/cli.js

选项B:包裹 npx 随着 cmd /c

{
  "command": "cmd",
  "args": ["/c", "npx", "-y", "stitch-pro-mcp"]
}

Claude Code: MCP server not showing tools

  1. MCP服务器配置在 ~/.claude.json, ~/.claude/settings.json~/.claude/.mcp.json
  2. 使用 claude mcp add 要配置的CLI命令--它会写入正确的文件
  3. 添加后, 重新启动克劳德代码 让工具出现
  4. 通过以下方式进行验证: claude mcp list --应该显示 stitch-pro: ✓ Connected

Server starts but tools don't respond

检查双启动:如果你看到 "Starting stitch-pro" 记录两次,您使用的是v0.1.0,它有一个错误,服务器启动了两次。更新到v0.1.2+:

npm install -g stitch-pro-mcp@latest

______________________________________________________________________

工具

智能(自动编排)

工具它做什么
sp_auto神的工具。用简单的英语描述你想要什么——自动检测框架、库、主题、设备类型,并链接一切:设计系统→ 代→ a11y → 响应式→ 转换。一个电话。
sp_analyze给它输入任何HTML。返回可访问性问题、响应差距、组件映射潜力和优先工具链建议。
sp_smart_convert喜欢 sp_to_react/sp_to_vue/sp_to_svelte,但auto首先运行11y修复和响应式注射。没有手动链接。

生成

工具它做什么
sp_generate生成一个具有完整管道的UI页面——设计系统、11年、响应式、框架转换
sp_flow生成多屏幕流(登录→ 仪表盘→ 设置)在一次通话中

设计系统

工具它做什么
sp_design_create从品牌描述中生成一个完整的设计系统——颜色、排版、间距、规则
sp_design_apply将设计系统应用于现有的HTML——CSS变量注入、字体/颜色强制

质量

工具它做什么
sp_a11yWCAG 2.1 AA审计,具有自动修复功能——对比度、ARIA、语义、触摸目标、lang-attr
sp_responsive为移动设备、平板电脑、台式机注入Tailwind响应断点

框架转换

工具它做什么
sp_to_reactHTML→ Next.js/React.tsx useState、事件处理程序、组件提取
sp_to_vueHTML→ Vue 3 SFCs `, ref(), @event` 绑定
sp_to_svelteHTML→ 带Svelte 5的SvelteKit组件 $state 符文
sp_extract使用置信度评分将HTML元素映射到shadcn/radix/MUI组件

项目管理

工具它做什么
sp_create_project创建新的缝合项目。返回生成工具所需的项目ID。

列表

工具它做什么
sp_projects列出所有Stitch项目
sp_screens列出项目中的屏幕
sp_screen获取屏幕的HTML源代码和图像URL

______________________________________________________________________

示例

一个提示,完整输出

sp_auto("Dark SaaS pricing page in React with shadcn")

  Auto-detects: react, shadcn, dark theme, SaaS
  Auto-chains:
    1. Create dark design system
    2. Enrich prompt with brand tokens
    3. Generate page via Stitch API
    4. WCAG 2.1 AA audit + auto-fix
    5. Responsive breakpoint injection
    6. Convert to Next.js .tsx with shadcn

  → Returns: files[], dependencies{}, a11y report, timings

行动前分析

sp_analyze(html)

  → sp_a11y (HIGH): missing lang, no 
  → sp_responsive (HIGH): fixed widths
  → sp_extract (MEDIUM): buttons + cards → shadcn
  → Suggested chain: [sp_a11y, sp_responsive, sp_extract, sp_to_react]

智能转换

sp_smart_convert(html, "vue", "radix")

  Auto-runs: a11y → responsive → extract → Vue 3 emit
  → Returns: .vue SFCs, WCAG compliant, responsive

手动工具

sp_to_react(html, { componentLibrary: "shadcn" })
sp_a11y(html, { autoFix: true })
sp_design_create({ name: "Acme", primaryColor: "#6366F1" })

______________________________________________________________________

建筑

User prompt
    │
    ▼
┌──────────────────────────────────────────┐
│            stitch-pro-mcp                │
│                                          │
│  ┌─ sp_auto (intent parser) ───────────┐ │
│  │  Detects: framework, library, theme │ │
│  │  device type, dark mode, industry   │ │
│  └─────────────────────────────────────┘ │
│                                          │
│  Pre-Generate                            │
│  └─ Design System Enrichment             │
│                                          │
│  Stitch API Call                         │
│  └─ project.generate() → raw HTML       │
│                                          │
│  Post-Generate                           │
│  ├─ Design System Enforcement (CSS vars) │
│  ├─ Accessibility Audit + Auto-Fix       │
│  └─ Responsive Breakpoint Injection      │
│                                          │
│  Convert (if framework !== html)         │
│  ├─ HTML → ComponentTree (AST-based)     │
│  ├─ Component Library Mapping            │
│  └─ Framework Emitter (React/Vue/Svelte) │
│                                          │
│  Output: production-ready components     │
└──────────────────────────────────────────┘

流水线是线性的,处理器是无状态的,Stitch API调用被注入-完全可测试,而不会影响API。

______________________________________________________________________

支持的平台

平台状态
克劳德代码:white_check_mark:
光标:white_check_mark:
VS代码(副本):white_check_mark:
帆板运动:white_check_mark:
Gemini CLI:white_check_mark:
食品法典委员会(OpenAI):white_check_mark:
反重力:white_check_mark:
开源代码:white_check_mark:
任何与MCP兼容的客户端:white_check_mark:

______________________________________________________________________

发展

git clone https://github.com/LuciferDono/stitch-pro-mcp.git
cd stitch-pro-mcp
npm install
npm run typecheck    # Type checking
npm run build        # Build to dist/
npm run dev          # Run in dev mode
npm test             # Run tests

技术栈

依赖性目的
@modelcontextprotocol/sdkMCP服务器框架(stdio)
@google/stitch-sdkStitch API客户端
parse5HTML→ AST(无浏览器)
axe-core + jsdomWCAG可访问性审计
zod运行时输入验证(全部18个工具)
color设计系统的色彩数学
vitest11个测试套件中的81个测试
TypeScript完全类型安全,29个源文件,4700+行

统计

  • 18 MCP工具
  • 7 流水线处理器
  • 3 框架发射器(React、Vue、Svelte)
  • 81 通过测试
  • 104 KB 包装尺寸(压缩)
  • 8 支持的平台

路线图

  • \[x\] ~~ npm发布 npx stitch-pro-mcp~~
  • \[x\] ~~带有GitHub操作的CI/CD~~
  • \[x\] ~~ GitHub Pages文档网站~~
  • \[ \] sp_batch --一次调用中的完整应用程序前端(布局+导航+页面+路线)
  • \[\]代码管道截图(截图→ 史迪奇→ 框架输出)
  • \[\]通过缝合粘贴桥导入Figma
  • \[\]LLM动力设计系统生成(Claude API)
  • \[\]用于远程部署的可流式HTTP传输

贡献

PR欢迎。首先打开一个问题以进行重大更改。

许可证

麻省理工学院

目录标签

目录标签

TypeScriptClaude设计系统UI生成本地部署无障碍访问响应式布局框架转换自动编排

支持客户端

ClaudeCursorWindsurfVS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

stitch-pro-mcp

工具数量(toolCount,工具数)

17

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP