🛡️ N2 Stitch MCP — Resilient Proxy Skill
Never lose a screen generation again. The only Stitch MCP proxy with TCP drop recovery.
The Problem
Google Stitch's generate_screen_from_text takes 2–10 minutes, but the API drops TCP after ~60 seconds.
CODEBLOCK0
Why This One?
| Feature | Others | N2 Stitch MCP |
|---|
| TCP Drop Recovery | ❌ | ✅ Auto-polling |
| Generation Tracking |
❌ | ✅
generation_status |
| Exponential Backoff | ❌ | ✅ 3x retry + jitter |
| Auto Token Refresh | ⚠️ | ✅ Background refresh |
| Test Suite | ❌ | ✅ 35 tests |
Quick Setup
1. Authenticate (one-time)
CODEBLOCK1
2. Add to MCP Config
CODEBLOCK2
Available Tools
Stitch API (auto-discovered)
- - createproject — Create a Stitch project
- listprojects — List all projects
- getproject — Get project details
- listscreens — List screens in a project
- getscreen — Get screen HTML/CSS
- generatescreenfromtext — ✨ Generate UI from text (Resilient!)
- editscreens — Edit existing screens
- generatevariants — Generate design variants
Virtual Tools (N2 Exclusive)
- - generationstatus — Check generation progress in real-time
- listgenerations — List all tracked generations
Links
- - NPM: https://www.npmjs.com/package/n2-stitch-mcp
- GitHub: https://github.com/choihyunsus/n2-stitch-mcp
- Website: https://nton2.com
Part of the N2 AI Body series — Building the Body for AI
🛡️ N2 Stitch MCP — 弹性代理技能
再也不会丢失屏幕生成。唯一具备 TCP 断线恢复 的 Stitch MCP 代理。
问题
Google Stitch 的 generatescreenfrom_text 需要 2–10 分钟,但 API 在 约 60 秒后 会断开 TCP。
其他 MCP 服务器:请求 → 60 秒 → TCP 断开 → ❌ 丢失!
N2 Stitch MCP:请求 → 60 秒 → TCP 断开 → 🛡️ 自动恢复 → ✅ 交付!
为什么选择这个?
| 功能 | 其他 | N2 Stitch MCP |
|---|
| TCP 断线恢复 | ❌ | ✅ 自动轮询 |
| 生成跟踪 |
❌ | ✅ generation_status |
| 指数退避 | ❌ | ✅ 3 次重试 + 抖动 |
| 自动令牌刷新 | ⚠️ | ✅ 后台刷新 |
| 测试套件 | ❌ | ✅ 35 个测试 |
快速设置
1. 身份验证(一次性)
bash
选项 A:gcloud(推荐)
gcloud auth application-default login
选项 B:API 密钥
export STITCH
APIKEY=your-key
2. 添加到 MCP 配置
json
{
mcpServers: {
n2-stitch: {
command: npx,
args: [-y, n2-stitch-mcp]
}
}
}
可用工具
Stitch API(自动发现)
- - createproject — 创建 Stitch 项目
- listprojects — 列出所有项目
- getproject — 获取项目详情
- listscreens — 列出项目中的屏幕
- getscreen — 获取屏幕 HTML/CSS
- generatescreenfromtext — ✨ 从文本生成 UI(弹性!)
- editscreens — 编辑现有屏幕
- generatevariants — 生成设计变体
虚拟工具(N2 独有)
- - generationstatus — 实时检查生成进度
- listgenerations — 列出所有跟踪的生成任务
链接
- - NPM:https://www.npmjs.com/package/n2-stitch-mcp
- GitHub:https://github.com/choihyunsus/n2-stitch-mcp
- 网站:https://nton2.com
N2 AI Body 系列的一部分 — 为 AI 构建身体