Atlas / MCP servers / google-labs-code / @google/stitch-sdk

@google/stitch-sdkSAFE

mcp/google-labs-code/stitch-sdk

Generate UI screens from text prompts and extract their HTML and screenshots programmatically.

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
19 11r · 7w · 1d
Transport
stdio · streamable-http
License
Apache-2.0
Stars
1,829
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://www.npmjs.com/package/@google/stitch-sdk)

Generate UI screens from text prompts and extract their HTML and screenshots programmatically.

Quick Start

Set your API key and generate a screen:

import { stitch } from "@google/stitch-sdk";

// STITCH_API_KEY must be set in the environment
const project = stitch.project("your-project-id");
const screen = await project.generate(
"A login page with email and password fields",
);
const html = await screen.getHtml();
const imageUrl = await screen.getImage();

html is a download URL for the screen's HTML. imageUrl is a download URL for the screenshot.

Need to create a project first? Use the tool client:

const result = await stitch.callTool("create_project", { title: "My App" });

Install

npm install @google/stitch-sdk

To use stitchTools() with the Vercel AI SDK, install ai as well:

npm install @google/stitch-sdk ai

Working with Projects and Screens

List existing projects

import { stitch } from "@google/stitch-sdk";

const projects = await stitch.projects();
for (const project of projects) {
console.log(project.id, project.projectId);
const screens = await project.screens();
console.log(`  ${screens.length} screens`);
}

Reference a project by ID

If you already have a project ID, reference it directly:

const project = stitch.project("4044680601076201931");
// Call methods on it — each method fetches data as needed
const screens = await project.screens();

Edit a screen

const screen = await project.generate("A dashboard with charts");
const edited = await screen.edit("Make the background dark and add a sidebar");
const editedHtml = await edited.getHtml();

Generate variants

const variants = await screen.variants("Try different color schemes", {
variantCount: 3,
creativeRa
Read from source at commit 43755ebf57a6OBSERVED · 2026-10-12
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add stitch-sdk --env GEMINI_API_KEY=${GEMINI_API_KEY} --env GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} --env STITCH_ACCESS_TOKEN=${STITCH_ACCESS_TOKEN} --env STITCH_API_KEY=${STITCH_API_KEY} -- npx -y @google/[email protected]
claude-desktop
{
  "mcpServers": {
    "stitch-sdk": {
      "command": "npx",
      "args": [
        "-y",
        "@google/[email protected]"
      ],
      "env": {
        "GEMINI_API_KEY": "${GEMINI_API_KEY}",
        "GOOGLE_GENERATIVE_AI_API_KEY": "${GOOGLE_GENERATIVE_AI_API_KEY}",
        "STITCH_ACCESS_TOKEN": "${STITCH_ACCESS_TOKEN}",
        "STITCH_API_KEY": "${STITCH_API_KEY}"
      }
    }
  }
}
03

Exposed tools (19)

11 read · 7 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
apply_design_systemwriteApplies a design system to a list of screens. Use this tool when the user wants to update one or more screens to match the style of a design system.\nThis tool applies the selected design system
create_design_systemwriteDefines DesignTheme and ColorPalette in $defs
create_design_system_from_design_mdwriteCreates a design system for a project, with user uploaded DESIGN.md file, and displays the design system in the UI.\n\n**Instructions for Tool Call:**\n* Should call
create_projectwriteCreates a new Stitch project. A project is a container for UI designs and frontend code.\n
delete_projectdestructiveDeletes a specific Stitch project using its project name.\n\n**Instructions for Tool Call:**\n\n* This action cannot be undone. Please confirm with
download_assetsreadDownload screens and assets to a local directory
edit_screenswriteEdits existing screens within a project using a text prompt.\n\n**Instructions for Tool Call:**\n* This action can take a few minutes to complete. Please be patient. DO NOT RETRY.\n* If the tool call fails due to connection error, the process may still succeed.\n
generate_screen_from_textreadGenerates a new screen within a project from a text prompt.\n\n**Instructions for Tool Call:**\n* This action can take a few minutes to complete. Please be patient. DO NOT RETRY.\n* If the tool fails with a timeout, don\
generate_variantsreadGenerates variants of existing screens within a project using a text prompt.\n\n**Instructions for Tool Call:**\n* If the tool fails with a timeout, don
get_projectreadRetrieves the details of a specific Stitch project using its project name.\n
get_screenreadRetrieves the details of a specific screen within a project.\n
list_design_systemsreadLists all design systems for a given project.\n
list_projectsreadLists all Stitch projects accessible to the user. By default, it lists projects owned by the user.\n
list_screensreadLists all screens within a given Stitch project.\n
remote_toolreadRemote
simple_toolreadNo schema
stitch-tool-clientreadAuthenticated tool pipe for Stitch MCP Server
update_design_systemwriteReferences DesignTheme without defining it or ColorPalette
upload_design_mdwriteUploads DESIGN.md to a Stitch project. Use this tool when the user wants to create a design system from a DESIGN.md file.\n\n**Instructions for Tool Call:**\n* Call
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (6 observation(s))
Network
declared (5 observation(s))
Shell
declared (1 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (14)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
delete_project
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.hidden_file · CWE-1104
.prettierignore
.prettierignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
scripts/test/generate-sdk.test.ts:754
const fn = new Function("raw", `return ${js}`);
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
packages/sdk/src/download-handler.ts:426
const hash = crypto.createHash("md5").update(url).digest("hex");
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/sdk/generated/src/designsystem.ts:8
import { type StitchToolClientSpec } from "../../src/spec/client.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/sdk/generated/src/designsystem.ts:9
import { StitchError } from "../../src/spec/errors.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/sdk/generated/src/designsystem.ts:10
import { Generation, emptyGenerationError } from "../../src/generation.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/sdk/generated/src/designsystem.ts:46
import { Screen } from "../../src/screen-ext.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/sdk/generated/src/project.ts:8
import { type StitchToolClientSpec } from "../../src/spec/client.js";
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@types/bun, @types/react, firebase-tools, ink, prettier, react, ts-morph, turbo
Why it matters. 10 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
packages/sdk/examples/container-proxy/package.json
@google/stitch-sdk
Why it matters. 1 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
packages/sdk/package.json
@modelcontextprotocol/sdk, cheerio, zod, @a2a-js/sdk, @google-cloud/storage, @google/adk, @google/genai, @mikro-orm/core
Why it matters. 18 dependency range(s) float
Fix. pin exact versions or ship a lockfile
INFOPrompt injection · prompt.credential_read · CWE-94, CWE-1427
README.md:328
| `STITCH_ACCESS_TOKEN`  | No                 | OAuth access token (alternative to API key) |
Why it matters. asks the agent to read credentials
INFOPrompt injection · prompt.credential_read · CWE-94, CWE-1427
packages/sdk/README.md:257
| `STITCH_ACCESS_TOKEN`  | No                 | OAuth access token (alternative to API key) |
Why it matters. asks the agent to read credentials

Gates applied: no_behavioural_pass.

Audited 2026-10-12 · audit v0.4.1 · source sha 43755ebf57a6full audit observations/trust-audit/mcp-server/google-labs-code__stitch-sdk.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-1243755ebf57a6SAFEB89first audit
06

Questions

What is the @google/stitch-sdk MCP server?

Generate UI screens from text prompts and extract their HTML and screenshots programmatically.

What tools does @google/stitch-sdk expose?

19 in total: 11 read-only, 7 that write, and 1 that can delete or overwrite (delete_project). Every one is listed on this page with its risk.

Is @google/stitch-sdk safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does @google/stitch-sdk need?

It reads GEMINI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, STITCH_ACCESS_TOKEN and STITCH_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does @google/stitch-sdk run?

It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @google/stitch-sdk at 0.4.0.

How current is this page?

The grade is for one exact copy of the source (43755ebf57a6), read on 2026-10-12. The repository is watched and re-audited when it changes.

Advertisement