stitch-setup

stitch-setup is a command for Claude Code from joaquimscosta/arkhe-claude-plugins. It costs 10 tokens per session (2,512 once invoked), scanned B, original, MIT.

A guided command for setting up and checking the connection between a coding agent and Google Stitch through an MCP server. It verifies access and explains problems such as missing credentials or restricted preview access.

In plain words
What is it for?
Use it before generating Stitch screens to check the available tools, test the connection, and get setup instructions when access is missing.
Why use it?
It makes connection failures easier to diagnose instead of leaving screen-generation commands to fail without context. It also gives steps for correcting authentication or access issues.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions Claude Code.

Good fit Use it before generating Stitch screens to check the available tools, test the connection, and get setup instructions when access is missing.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/joaquimscosta/arkhe-claude-plugins/stitch-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/joaquimscosta/arkhe-claude-plugins

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for stitch-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/joaquimscosta/arkhe-claude-plugins/stitch-setup/github.svg)](https://agentmods.dev/commands/joaquimscosta/arkhe-claude-plugins/stitch-setup)
Your own site
<a href="https://agentmods.dev/commands/joaquimscosta/arkhe-claude-plugins/stitch-setup"><img src="https://agentmods.dev/badge/commands/joaquimscosta/arkhe-claude-plugins/stitch-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for stitch-setup

Your own site · 80×15
<a href="https://agentmods.dev/commands/joaquimscosta/arkhe-claude-plugins/stitch-setup"><img src="https://agentmods.dev/badge/commands/joaquimscosta/arkhe-claude-plugins/stitch-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,512 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.02512
Opus 5.5 $0.00004 $0.01005
Sonnet 5.5 $0.00002 $0.00502
Haiku 4.5 $0.00001 $0.00251

Measured yesterday against content hash e07f77748851, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

stitch-setup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

Step 5: Restart Claude Code to load the MCP configuration.
plugins/google-stitch/commands/stitch-setup.md · 372 lines

How it starts

The opening of the file, as written. The whole thing — 372 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stitch Setup Command

Set up and verify the Stitch MCP server connection for automated screen generation.

Execution

Step 1: Check MCP Availability

Check if Stitch MCP tools are available by looking for the generate_screen_from_text tool.

  • If available: Proceed to Step 2 (verification)
  • If not available: Proceed to Step 3 (setup guidance)

Step 2: Verify Connection

If MCP tools are detected:

  1. Call list_projects to verify the connection works

  2. Handle errors:

    • If 403 Forbidden: The Stitch API requires preview/allowlist access from Google. Report:

      Stitch MCP: Connection Failed (403 Forbidden)
      
      The Google Stitch API requires preview access. This API is not yet
      generally available and requires allowlist approval from Google.
      
      To stop the failing MCP server from retrying:
        claude mcp remove stitch
      
      To check MCP status:
        claude mcp list
      
      Once you have Stitch API access, run /stitch-setup again.
      
    • If authentication error (message contains "invalid authentication credentials", "OAuth 2 access token", or "Token fetch failed"):

      The MCP server connected but the isolated credentials at ~/.stitch-mcp/config have expired. This commonly happens when doctor passes but API calls fail.

      Proceed directly to Step 2b (Credential Refresh) - no diagnostic needed since the error message already identifies the issue.

    • If MCP tools unavailable but stitch is configured: The MCP server may be failing to connect. Proceed to Step 2a (Proxy Diagnostic).

    • If other error: Report the error and suggest checking ADC credentials

  3. On success, run the doctor command to validate the full setup:

    npx @_davideast/stitch-mcp doctor
    

    This validates: CLI installation, user login, credentials, project config, API reachability.

  4. Report status:

    Stitch MCP: Connected
    Projects found: {count}
    Project ID: {STITCH_PROJECT_ID or "not set"}
    
    Ready to use:
      /prompt       - Author Stitch prompts (with auto-generate offer)
      /stitch-generate - Full pipeline: author -> generate -> fetch
    

Read the full file on GitHub · 372 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 372 lines · 10 tokens per session scan B e07f77748851

Subscribe to this mod's changes

stitch-setup is a command published in the GitHub repository joaquimscosta/arkhe-claude-plugins (21 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 2,512 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.