跳到正文
TakoAPI
返回技能列表

n2-stitch-mcp

由 choihyunsus 提供

AI & LLMs
559下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Resilient MCP proxy for Google Stitch — 3-layer safety (auto-retry, token refresh, TCP drop recovery).

描述

该技能的功能

Google Stitch's screen generation calls take 2-10 minutes, but the API drops TCP connections after ~60 seconds, causing most MCP proxies to silently lose the result. N2 Stitch MCP recovers by switching to auto-polling after a drop, tracks each generation's state, and delivers results when complete. Token refresh runs in the background and failed requests retry with exponential backoff.

Unlike other Stitch MCP servers that fail silently when TCP drops during generation, this proxy polls for completion and returns the result regardless of connection interruptions.

何时使用

  • Generating UI screens from text without losing long-running Stitch jobs
  • Checking screen generation progress during a 2-10 minute Stitch call
  • Managing Stitch projects and screens through Claude
  • Editing existing Stitch screens and generating design variants
  • Running Stitch API calls that would normally fail at the 60-second TCP limit

示例工作流

输入

User asks: Generate a dashboard screen with a sidebar navigation and data charts

智能体
  1. 1

    Calls generate_screen_from_text with the description

  2. 2

    TCP connection drops after ~60 seconds as expected

  3. 3

    Switches to polling via generation_status tool

  4. 4

    Detects generation completion and fetches the result

  5. 5

    Returns the generated HTML/CSS to the user

输出

Full HTML/CSS for the dashboard screen delivered despite the TCP drop

前置要求

  • Google Cloud account with Stitch API access (via gcloud auth application-default login), or a Stitch API key set as the STITCH_API_KEY environment variable

安装

clawhub install choihyunsus/n2-stitch-mcp

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接