Stitch MCP Helper CLI logo

Stitch MCP Helper CLI

Community
davideast

A CLI for moving AI-generated UI designs from Google’s Stitch platform into your development workflow.

Publisherdavideast
Repositorystitch-mcp
LanguageTypeScript
Forks
121
Stars
973
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    Stitch MCP Helper CLI exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    973 stars and 121 forks from the linked repository.

stitch-mcp

A CLI for moving AI-generated UI designs into your development workflow — preview them locally, build sites from them, and feed them to coding agents.

Why

AI-generated designs in Google's Stitch platform live as HTML/CSS behind an API. Getting them into a local development environment — for previewing, building, or handing off to coding agents — requires fetching, serving, and structuring them. stitch-mcp handles this through a set of CLI commands that connect to Stitch.

Quick start

bash
# Set up authentication and MCP client config
npx @_davideast/stitch-mcp init

# Serve all project screens on a local dev server
npx @_davideast/stitch-mcp serve -p <project-id>

# Build an Astro site by mapping screens to routes
npx @_davideast/stitch-mcp site -p <project-id>

Features

  • Preview designs locally — serve all screens from a project on a Vite dev server
  • Build an Astro site from your designs — map screens to routes and generate a deployable project
  • Give your agent design context — proxy Stitch tools to your IDE's coding agent with automatic token refresh
  • Explore your design data — browse projects, screens, and metadata in the terminal or via CLI
  • Browse projects in your terminal — navigate screens interactively with copy, preview, and open actions
  • Set up in one command — guided wizard handles gcloud, auth, and MCP client configuration

MCP integration

Add this to your MCP client config to give coding agents access to Stitch tools:

json
{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["@_davideast/stitch-mcp", "proxy"]
    }
  }
}

Supported clients: VS Code, Cursor, Claude Code, Gemini CLI, Codex, OpenCode.

Virtual tools

The proxy exposes these tools alongside the upstream Stitch MCP tools. They combine multiple API calls into higher-level operations for coding agents:

  • build_site — Builds a site from a project by mapping screens to routes. Returns the design HTML for each page.
  • get_screen_code — Retrieves a screen and downloads its HTML code content.
  • get_screen_image — Retrieves a screen and downloads its screenshot image as base64.

build_site input schema:

json
{
  "projectId": "string (required)",
  "routes": [
    {
      "screenId": "string (required)",
      "route": "string (required, e.g. \"/\" or \"/about\")"
    }
  ]
}

Example:

bash
npx @_davideast/stitch-mcp tool build_site -d '{
  "projectId": "123456",
  "routes": [
    { "screenId": "abc", "route": "/" },
    { "screenId": "def", "route": "/about" }
  ]
}'

Explore your designs

Use view and tool to browse your design data and understand what's available before prompting agents.

bash
# Browse all projects
npx @_davideast/stitch-mcp view --projects

# Inspect a specific screen
npx @_davideast/stitch-mcp view --project <project-id> --screen <screen-id>

# Invoke any MCP tool from the CLI
npx @_davideast/stitch-mcp tool [toolName]

Inside the view browser: c copies the selected value, s previews HTML in your browser, o opens the project in Stitch, and q quits. Use arrow keys to navigate and Enter to drill into nested data.

Run tool without a name to list all available tools, or with -s to see a tool's schema.


Installation

Run directly with npx (no install needed):

bash
npx @_davideast/stitch-mcp <command>

Or install globally:

bash
npm install -g @_davideast/stitch-mcp
stitch-mcp <command>

Commands

CommandDescription
Setup
initSet up auth, gcloud, and MCP client config
doctorVerify configuration health
logoutRevoke credentials
Development
serve -p <id>Preview project screens locally
screens -p <id>Browse screens in terminal
viewInteractive resource browser
Build
site -p <id>Generate Astro project from screens
snapshotSave screen state to file
Integration
tool [name]Invoke MCP tools from CLI
proxyRun MCP proxy for agents

Run any command with --help for full options.

Authentication

Automatic (recommended): Run init and follow the wizard. It handles gcloud installation, OAuth, credentials, and project setup.

bash
npx @_davideast/stitch-mcp init

API key: Set the STITCH_API_KEY environment variable to skip OAuth entirely.

bash
export STITCH_API_KEY="your-api-key"

Manual (existing gcloud): If you already have gcloud configured:

bash
gcloud auth application-default login
gcloud config set project <PROJECT_ID>
gcloud beta services mcp enable stitch.googleapis.com --project=<PROJECT_ID>

Then use the proxy with STITCH_USE_SYSTEM_GCLOUD=1:

json
{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["@_davideast/stitch-mcp", "proxy"],
      "env": {
        "STITCH_USE_SYSTEM_GCLOUD": "1"
      }
    }
  }
}

Environment variables

VariableDescription
STITCH_API_KEYAPI key for direct authentication (skips OAuth)
STITCH_ACCESS_TOKENPre-existing access token
STITCH_USE_SYSTEM_GCLOUDUse system gcloud config instead of isolated config
STITCH_PROJECT_IDOverride project ID
GOOGLE_CLOUD_PROJECTAlternative project ID variable
STITCH_HOSTCustom Stitch API endpoint

Troubleshooting

"Permission Denied" errors

Ensure you have Owner or Editor role, billing is enabled, and the Stitch API is enabled. Run doctor --verbose to diagnose.

Authentication URL not appearing

The tool prints authentication URLs to the terminal with a 5-second timeout. Look for a URL starting with https://accounts.google.com. If using proxy with --debug, check /tmp/stitch-proxy-debug.log.

Already authenticated but showing logged in

The bundled gcloud SDK maintains separate authentication from your global gcloud installation. To fully clear authentication:

bash
npx @_davideast/stitch-mcp logout --force --clear-config

API connection fails after setup

Run doctor --verbose to diagnose. Verify your project has billing and the Stitch API enabled. If issues persist, re-authenticate:

bash
npx @_davideast/stitch-mcp logout --force
npx @_davideast/stitch-mcp init

WSL / SSH / Docker environments

The CLI detects WSL, SSH sessions, Docker containers, and Cloud Shell. In these environments, browser-based auth may not work automatically. Copy the OAuth URL from your terminal and open it in a browser manually.

Development

bash
# Install dependencies
bun install

# Run locally
bun run dev init

# Run tests
bun test

# Build
bun run build

# Verify package
bun run verify-pack

License

Apache 2.0 © David East

Disclaimer

[!WARNING] Experimental Project - This is an independent, experimental tool.

This project is:

  • NOT affiliated with, endorsed by, or sponsored by Google LLC, Alphabet Inc., or the Stitch API team
  • Provided AS-IS with NO WARRANTIES of any kind
  • NOT guaranteed to be maintained, secure, or compatible with future API versions

"Stitch" and "Google Cloud" are trademarks of Google LLC.

USE AT YOUR OWN RISK.

Installation

TypingMind
{
  "mcpServers": {
    "davideast-stitch-mcp": {
      "command": "npx",
      "args": [
        "@_davideast/stitch-mcp",
        "proxy"
      ],
      "env": {
        "STITCH_PROJECT_ID": "<STITCH_PROJECT_ID>"
      }
    }
  }
}

Use Stitch MCP Helper CLI MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Stitch MCP Helper CLI is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Stitch MCP Helper CLI as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Stitch MCP Helper CLI MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "davideast-stitch-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@_davideast/stitch-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Stitch MCP Helper CLI MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Stitch MCP Helper CLI MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Stitch MCP Helper CLI to help me with this task?
Stitch MCP Helper CLI
Sure. I read it.
Here is what I found using Stitch MCP Helper CLI.

Frequently asked questions

What is the Stitch MCP Helper CLI MCP server used for?

Stitch MCP Helper CLI is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Stitch MCP Helper CLI MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Stitch MCP Helper CLI with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Stitch MCP Helper CLI MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Stitch MCP Helper CLI connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Stitch MCP Helper CLI MCP to TypingMind?

Stitch MCP Helper CLI runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Stitch MCP Helper CLI MCP provide in TypingMind?

Stitch MCP Helper CLI exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Stitch MCP Helper CLI MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Stitch MCP Helper CLI requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇