N2 Stitch MCP for Openclaw

A resilient MCP proxy for Google Stitch that prevents lost UI generations using a 3-layer safety system including TCP drop recovery.

choihyunsus
v1.0.0
Feb 13, 2026
0
1.9k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install n2-stitch-mcp

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install n2-stitch-mcp using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is N2 Stitch MCP?

N2 Stitch MCP is a robust proxy designed to stabilize the connection between AI agents and the Google Stitch API. A common pain point in UI generation is that while the Stitch API can take up to 10 minutes to generate a screen, standard TCP connections often drop after 60 seconds, leading to lost data and failed workflows. This skill bridges that gap by providing a persistent, resilient interface.

As a vital addition to the Openclaw Skills directory, this proxy implements sophisticated auto-recovery and polling mechanisms. It ensures that even if a network connection is interrupted, the generation process continues and the final result is successfully delivered to the agent, making it indispensable for production-grade AI design automation.

N2 Stitch MCP Use Cases

  • Automating the generation of complex UI screens from text descriptions without worrying about timeout errors.
  • Building resilient design workflows that require long-running API calls to Google Stitch.
  • Monitoring the real-time progress of multiple concurrent UI generation tasks via dedicated tracking tools.
  • Maintaining stable authenticated sessions for AI agents using automated background token refreshing.

How N2 Stitch MCP Works

  1. The AI agent sends a UI generation request through the MCP server interface to Google Stitch.
  2. The skill monitors the connection; if the standard 60-second TCP timeout occurs, it triggers an internal recovery sequence.
  3. The proxy utilizes its generation tracking system to identify the pending task and begins auto-polling the status in the background.
  4. Virtual tools like generation_status allow the agent to query the current progress without restarting the request.
  5. Upon successful completion of the remote task, the skill retrieves the UI assets and returns them to the agent, effectively hiding the underlying network instability.

N2 Stitch MCP Setup

To integrate this skill into your environment and explore other Openclaw Skills, follow these steps:

1. Authenticate

You can authenticate via gcloud or a direct API key.

# Recommended: Google Cloud SDK
gcloud auth application-default login

# Alternative: API Key
export STITCH_API_KEY="your-key"

2. Configure MCP

Update your MCP configuration file with the following entry:

{
  "mcpServers": {
    "n2-stitch": {
      "command": "npx",
      "args": ["-y", "n2-stitch-mcp"]
    }
  }
}

N2 Stitch MCP Data Schema & Taxonomy

The skill organizes interaction data into projects and screens, while maintaining an internal registry for tracking active generations.

Component Type Description
Projects Metadata Contains IDs and configurations for Stitch UI projects.
Screens UI Data Stores generated HTML/CSS and design variants.
Generation Tracking State Tracks long-running tasks to prevent data loss after TCP drops.
Virtual Tools Utility Proprietary status and list tools exclusive to this proxy.

N2 Stitch MCP Advanced Features

  • TCP Drop Recovery: Automatically handles connection timeouts by transitioning to a polling-based recovery model.
  • Virtual Tracking Tools: Includes generation_status and list_generations to monitor the lifecycle of design tasks.
  • Exponential Backoff: Features a 3x retry system with jitter to handle API rate limits and intermittent errors.
  • Auto Token Refresh: Ensures persistent connectivity by handling credential renewals in the background.
  • Comprehensive Test Suite: Verified by 35 internal tests to ensure reliability across all Openclaw Skills deployments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*