KS

kargatharaakash/stitch-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

121 stars 27 forks 质量 67 趋势 16Apache-2.0

Kargatharaakash/stitch-mcp 是从 https://github.com/kargatharaakash/stitch-mcp. 导入的 MCP 服务器候选人。

概览

Kargatharaakash/stitch-mcp 是从 https://github.com/kargatharaakash/stitch-mcp. 导入的 MCP 服务器候选人。

概述(AI 翻译)

Google Stitch通用MCP服务器

用AI即时打造令人惊叹的UI/UX设计。与光标、Claude、Antigravity以及任何兼容MCP的编辑器无缝配合。

由Aakash Kargathara创作。


🚀 工作原理

✨ 为什么这很酷

  • 零配置:只需登录一次,所有地方都能使用。
  • 通用版:支持Windows、Mac和Linux。
  • 免费:Google Stitch API 免费使用。

️ 快速布置(2分钟)

1.先决条件:Google Cloud

你需要一个启用 Stitch API 的 Google Cloud 项目。

2.安装凭证

这赋予stitch-mcp代表你与谷歌对话的权限。

3.添加到你的AI编辑器

把这个复制粘贴到你的MCP配置文件里:

针对Claude桌面版: ~/Library/Application Support/Claude/claude_desktop_config.json

光标方面: 设置 MCP > 添加新服务器>

🛠️ 可用工具

工具名称 功能
extract_design_context 🧠扫描屏幕以提取“设计DNA”(字体、颜色、布局)。利用此方法保持样式一致性。
fetch_screen_code 💾下载屏幕的原始HTML/前端代码。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Stitch MCP

Build amazing UI/UX designs instantly with AI. Works seamlessly with Cursor, Claude, Antigravity, and any MCP-compatible editor.

Created by Aakash Kargathara.


🚀 How It Works

✨ Why this is cool

  • Zero Config: Just login once and it works everywhere.
  • Universal: Works on Windows, Mac, and Linux.
  • Free: Google Stitch API is free to use.

�️ Quick Setup (2 Minutes)

1. Prerequisite: Google Cloud

You need a Google Cloud project with the Stitch API enabled.

# Login to your Google Cloud
gcloud auth login

# Set your project (replace with your actual project ID)
gcloud config set project YOUR_PROJECT_ID
gcloud auth application-default set-quota-project YOUR_PROJECT_ID

# Enable the magic
gcloud beta services mcp enable stitch.googleapis.com

2. Install the Credentials

This gives stitch-mcp permission to talk to Google on your behalf.

gcloud auth application-default login

3. Add to Your AI Editor

Copy and paste this into your MCP config file:

For Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json

For Cursor: Settings > MCP > Add New Server

{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["-y", "stitch-mcp"],
      "env": {
         "GOOGLE_CLOUD_PROJECT": "YOUR_PROJECT_ID"
      }
    }
  }
}

🛠️ Available Tools

Tool Name What it does
extract_design_context 🧠 Scans a screen to extract “Design DNA” (Fonts, Colors, Layouts). Use this to keep style consistent.
fetch_screen_code 💾 Downloads the raw HTML/Frontend code of a screen.
fetch_screen_image 🖼️ Downloads the high-res screenshot of a screen.
generate_screen_from_text ✨ Generates a NEW screen based on your prompt (and context).
create_project 📁 Creates a new workspace/project folder.
list_projects 📋 Lists all your available Stitch projects.
在 GitHub 查看完整 README

安装

npx -y stitch-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "stitch": { "command": "npx", "args": ["-y", "stitch-mcp"], "env": { "GOOGLE_CLOUD_PROJECT": "YOUR_PROJECT_ID" } } } }