The Stitch MCP server is Google's hosted endpoint at https://stitch.googleapis.com/mcp that lets a coding agent list your Stitch projects, pull a screen's HTML and screenshot, and ask Stitch to generate or edit screens. To connect it, create an API key in Stitch settings and send it as an X-Goog-Api-Key header: one claude mcp add line for Claude Code, a few lines of config.toml for Codex, or an mcp.json entry for Cursor and VS Code. Then raise the tool timeout, because a generation can run for minutes while most agents give up after 60 seconds.
What the Stitch MCP server does
Stitch is Google Labs' AI design canvas: you describe a screen and Gemini draws it, with HTML and Tailwind code behind every design. The MCP server brings that into your agent. Your agent never moves a button itself. It sends a prompt, Stitch does the drawing, and the agent fetches the result to turn into React, Vue, Flutter or whatever your codebase uses.
It is a remote server, so nothing runs on your machine. When we listed it on November 27, it exposed 18 tools and one resource, a "Stitch Project Viewer" MCP App that clients with MCP Apps support can render as a preview panel. If MCP itself is new to you, start with our plain English explainer of MCP.
Get a Stitch API key first
Sign in at Stitch, open your profile menu, choose Stitch settings and click Create API Key in the API Keys section, as the setup guide describes. Copy it straight into a password manager. Keys stay valid until you delete them in the same settings page.
Two details save time:
- A Stitch key is not a Gemini key. When we passed a placeholder, the Stitch CLI explained that Stitch wants a Stitch key starting with
AQ, and that Google Cloud or Gemini API keys (starting withAIza) are refused because they don't identify a user. - OAuth exists, but it is clumsy. The OAuth path uses
gcloud auth application-default login, enablingstitch.googleapis.comon a Google Cloud project and pasting a bearer token plus anX-Goog-User-Projectheader into your config. Google notes the token usually lasts one hour and most clients won't refresh it, so you paste a new one each hour. Use it only where you can't store a key on disk.
Stitch MCP server setup in each agent
Every client below uses the same URL and header. Only the file and field names change.
| Agent | Where it goes | Key field |
|---|---|---|
| Claude Code | claude mcp add (saves to ~/.claude.json) | --header "X-Goog-Api-Key: ..." |
| Codex | ~/.codex/config.toml | env_http_headers |
| Cursor | .cursor/mcp.json | "url" plus "headers" |
| VS Code | mcp.json via MCP: Add Server | "type": "http" plus "headers" |
| Antigravity | Agent panel, Manage MCP Servers, View raw config | "serverUrl" plus "headers" |
| Gemini CLI | gemini extensions install | key goes into the extension's JSON |
| OpenCode | opencode.json | "type": "remote" |
Stitch MCP in Claude Code
This is the command from Google's guide:
claude mcp add stitch --transport http https://stitch.googleapis.com/mcp \
--header "X-Goog-Api-Key: YOUR_STITCH_KEY" -s user
-s user saves it for every project in ~/.claude.json; -s project writes ./.mcp.json instead, which you should keep out of git if it holds the key. One trap we hit: claude mcp list reported "Connected" for a key that was obviously fake. Stitch answers initialize and tools/list without checking credentials, so a bad key only shows up on the first real call, as "API key not valid. Please pass a valid API key." Test with "list my Stitch projects" before you trust the setup. More on how Claude Code handles MCP and skills is in our agent skills guide.
Stitch MCP in Codex
Google's page doesn't cover Codex, but Codex speaks Streamable HTTP natively. Put the key in an environment variable and point a header at it, per the Codex MCP docs:
[mcp_servers.stitch]
url = "https://stitch.googleapis.com/mcp"
env_http_headers = { "X-Goog-Api-Key" = "STITCH_API_KEY" }
tool_timeout_sec = 300
codex mcp get stitch should then show transport: streamable_http and tool_timeout_sec: 300, which is what we saw in Codex 0.172.0. The timeout line matters; see the gotchas below.
Cursor, VS Code and Antigravity
For Cursor, create .cursor/mcp.json:
{
"mcpServers": {
"stitch": {
"url": "https://stitch.googleapis.com/mcp",
"headers": { "X-Goog-Api-Key": "YOUR_STITCH_KEY" }
}
}
}
VS Code uses a servers object with "type": "http" and the same header (Google also adds "Accept": "application/json"). Antigravity uses the mcpServers shape but names the field serverUrl instead of url. If you mostly work in Copilot Chat, our guide to using MCP servers in GitHub Copilot covers the VS Code side.
Gemini CLI and OpenCode
Gemini CLI gets an official extension: gemini extensions install https://github.com/gemini-cli-extensions/stitch. Its README has you paste the key into the extension's JSON, which already sets a 300,000 ms timeout. It is still on version 0.1.4 from January, so its feature list is older than the server. OpenCode takes a "type": "remote" entry in opencode.json, per the Stitch skills README.
Remote server or the Stitch CLI's local server?
Google now ships a second option. The Stitch CLI (npm install -g @google/stitch, version 0.13.0 from November 17) includes stitch mcp start, a local stdio server, and stitch mcp install, which registers it in Claude Desktop, Claude Code, Cursor, VS Code and Antigravity. Our dry run showed it writes a node .../stitch.js mcp start command into each client's config, with no key in the file: the CLI reads its own login from ~/.stitch.
The two servers expose different tools. The local one has 7 generic verbs (stitch_find, stitch_get, stitch_create, stitch_edit, stitch_delete, stitch_generate, stitch_url), and without a key it fails fast with a clear MISSING_CANVAS_CREDENTIALS error. The remote one has the 18 named tools below, and it is what Google's skills are written for. Use the remote server unless you want one login shared between the CLI and your agents, or you want stitch_url, which builds canvas links without guessing.
All 18 Stitch MCP tools
Google's tool reference lists 14 tools. The live server had four more: update_project, delete_project, update_screen and download_file.
| Group | Tools | Notes |
|---|---|---|
| Projects | create_project, get_project, list_projects, update_project, delete_project | delete_project can't be undone; its description tells the agent to ask you first |
| Screens | list_screens, get_screen, update_screen, download_file | download_file returns raw HTML or a base64 screenshot |
| Generation | generate_screen_from_text, edit_screens, generate_variants | marked destructive and not idempotent |
| Design systems | create_design_system, update_design_system, list_design_systems, apply_design_system, upload_design_md, create_design_system_from_design_md | upload_design_md takes a base64 DESIGN.md |
Two more differences from the docs. The live modelId choices are GEMINI_3_8_FLASH and GEMINI_3_5_FLASH_LITE, while the reference page still shows Gemini 3 Flash and 3.1 Pro. And download_file exists because the signed download URLs need credentials: its description tells agents to use the tool instead of fetching the URL with curl, which is what the older getting started guide suggests.
Add Stitch skills to your agent
The Stitch skills repo (Apache 2.0, about 13,450 stars on November 27) packages 16 skills in three plugins: stitch-design (generate, code to design, DESIGN.md extraction, uploads), stitch-build (React, React Native, Vite dashboards, shadcn/ui, Remotion videos) and stitch-utilities (prompt enhancement, DESIGN.md, the multipage Stitch Loop). Google's own docs still say 13; the repo has 16.
Install them per agent:
# Claude Code (user scope worked for us)
npx plugins add google-labs-code/stitch-skills --scope user --target claude-code
# Codex
codex plugin marketplace add google-labs-code/stitch-skills --ref main
The README's --scope project example for Claude Code failed with plugins 1.3.9 ("Scope project is not supported for Claude Code with this source"). --scope user installed all three plugins. Note that none of them ships an MCP config, so the skills do nothing until you add the server yourself. Their frontmatter allows tools matching stitch*:*, so keep the server name stitch. If design quality is your real goal, compare these with the checkers in our best design skills for Claude Code roundup.
Timeouts, credits and other gotchas
- Generation is slow. Google's tool description says
generate_screen_from_text"can take a few minutes" and tells agents not to retry: on a timeout, pollget_screenevery 30 seconds, up to 10 times. Codex's default per tool timeout is 60 seconds, so settool_timeout_sec = 300. In Claude Code, add"timeout": 300000to the server entry; the Claude Code MCP docs say HTTP servers otherwise get a 60 second wait for the first response byte. - Auth errors look like tool results. With no key or a bad key, the server still returns HTTP 200 with
isError: truein the body, so your agent may describe the problem in prose rather than fail loudly. - Credits. Stitch's FAQ says it is "currently provided free of charge" on a daily credit limit that resets at midnight UTC; your balance is on the settings page. Google publishes no per call cost, and your agent's own model usage is billed separately.
- Who can use it. English only, adults 18 and over, in countries where Gemini is available.
- Destructive tools. Most write tools carry
destructiveHint: true. If your client supports per tool approval, leave approval on fordelete_projectand the generation tools.
For another set of Google hosted MCP servers with very different auth, see our Google Workspace MCP server guide. If you want your agent to look at the running app rather than the design, Chrome DevTools MCP pairs well with Stitch.
FAQ
Is the Stitch MCP server free?
Yes, today. Stitch is free with a Google account, under a daily credit limit that resets at midnight UTC. Google doesn't publish how many credits a generation costs, so watch the settings page. Calls that only read projects or download files don't generate anything.
What is the Stitch MCP server URL?
https://stitch.googleapis.com/mcp, over Streamable HTTP, with your key in an X-Goog-Api-Key header. The Stitch SDK uses the same URL as its default.
Why does my Stitch MCP show connected but every call fails?
Because listing tools works without a key. Check that the key starts with AQ and came from Stitch settings, not from Google AI Studio or the Cloud console, and that the header name is exactly X-Goog-Api-Key.
Can I use Stitch MCP with Codex?
Yes. Add an [mcp_servers.stitch] block with the URL, an env_http_headers entry that maps X-Goog-Api-Key to an environment variable, and tool_timeout_sec = 300. Stitch's skills also install as Codex plugins.
Do I need the Stitch skills to use the MCP server?
No. The server works on its own with plain prompts like "download the HTML for the checkout screen". The skills add tested workflows on top, such as turning a screen into React components or extracting a DESIGN.md from your code.


