Skip to main content
Glama

Stitch-MCP

一个 MCP (Model Context Protocol) 服务器,通过将请求转发到远程 Stitch MCP 端点,将 Google Stitch 的功能作为本地工具公开。

功能说明

此服务器:

  • 使用 mcp.server.fastmcp.FastMCP 运行本地 MCP 工具服务器 (stdio)

  • 将工具调用转发至 https://stitch.googleapis.com/mcp

  • 需要通过 STITCH_API_KEY 环境变量提供 Stitch API 密钥

Related MCP server: stitch-pro-mcp

要求

  • Python 3.11+

  • Stitch API 密钥 (STITCH_API_KEY)

安装

创建并激活虚拟环境,然后安装该包:

python -m venv .venv
source .venv/bin/activate
pip install -e .

配置

如果存在本地 .env 文件(通过 python-dotenv),服务器会从中加载环境变量。

创建一个 .env 文件:

STITCH_API_KEY=your_api_key_here

运行服务器

你可以通过已安装的脚本运行它:

stitch-mcp

或者直接运行:

python server.py

在你的 MCP 客户端中,注册一个运行 stitch-mcp(或 python server.py)的 stdio 服务器,并确保该进程环境中包含 STITCH_API_KEY

可用工具

项目管理:

  • list_projects(filter: Optional[str] = None)

  • create_project(title: str)

  • get_project(name: str)

屏幕管理:

  • list_screens(projectId: str)

  • get_screen(name: str, projectId: str, screenId: str)

AI 生成:

  • generate_screen_from_text(projectId: str, prompt: str, deviceType: str = "MOBILE", modelId: str = "GEMINI_3_FLASH")

  • edit_screens(projectId: str, selectedScreenIds: list[str], prompt: str, deviceType: str = "DEVICE_TYPE_UNSPECIFIED", modelId: str = "GEMINI_3_FLASH")

  • generate_variants(projectId: str, selectedScreenIds: list[str], prompt: str, variantCount: int = 3, creativeRange: str = "EXPLORE", aspects: Optional[list[str]] = None, deviceType: str = "DEVICE_TYPE_UNSPECIFIED", modelId: str = "GEMINI_3_FLASH")

设计系统:

  • list_design_systems(projectId: Optional[str] = None)

  • create_design_system(...)

  • update_design_system(...)

  • apply_design_system(projectId: str, assetId: str, screen_instance_ids: list[str], screen_source_names: list[str])

注意事项与故障排除

  • 如果看到 STITCH_API_KEY environment variable not set,请检查你的 .env/环境变量并重启 MCP 客户端进程。

  • 某些生成操作可能需要几分钟。如果请求超时,请稍后再调用 get_screen(在这种情况下,服务器会返回超时消息)。

开发

agent.py 是一个小型辅助脚本,用于在没有 MCP 客户端的情况下手动测试工具。更新占位符 ID 并运行:

python agent.py

贡献

  • 如果你对本项目或脚本有任何建议,请随时告知我。如果你喜欢它,欢迎随意使用。(附:也请给它点个星标!!😬)

  • 非常欢迎你的贡献!

    Fork 本项目

    编译你的工作

    发起 Pull Request

致谢:Samuel Jayasingh

最后编辑于:2026年4月16日

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A universal MCP server for Google Stitch that enables AI-powered UI/UX design generation by extracting design context and metadata from existing screens. It allows users to fetch screen code and images to create consistent, styled UI components across multiple projects.
    625
    121
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    An intelligent MCP server for Google Stitch that generates production-ready UI from text prompts, with auto-orchestration of design systems, WCAG accessibility, responsive breakpoints, and framework conversion (React, Vue, Svelte).
    17
    11
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Comprehensive MCP server for Google Stitch with 36 tools covering design-to-code workflows, including screen generation, code extraction, design analysis, and project management.
    86
    5
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    MCP server that gives AI coding agents the ability to design UIs through Google Stitch. It generates production-ready HTML and screenshots from natural language prompts.
    9

View all related MCP servers

Related MCP Connectors

  • MCP server for generating rough-draft project plans from natural-language prompts.

  • The Figma MCP server brings Figma design context directly into your AI workflow.

  • MCP server for interacting with the Supabase platform

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/samueljayasingh/StitchMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server