stitch-mcp
Reference

Command Reference

All commands, flags, and environment variables.

Command Reference

Run any command with --help for full options.

Setup

CommandFlagsGuide
init--local --yes -y --defaults -c, --client <client> -t, --transport <transport>Setup
doctor--verboseSetup, Troubleshooting
logout--force --clear-configTroubleshooting

init

Initialize authentication and MCP configuration.

FlagDescriptionDefault
--localInstall gcloud locally to project directory instead of user homefalse
-y, --yesAuto-approve verification commandsfalse
--defaultsUse default values for promptsfalse
-c, --client <client>MCP client to configure (antigravity, vscode, cursor, claude-code, gemini-cli, codex, opencode)prompted
-t, --transport <transport>Transport type (http or stdio)prompted

doctor

Verify configuration health.

FlagDescriptionDefault
--verboseShow detailed error informationfalse

logout

Log out of Google Cloud and revoke credentials.

FlagDescriptionDefault
--forceSkip confirmation promptsfalse
--clear-configDelete entire gcloud config directoryfalse

Development

CommandFlagsGuide
serve -p <id>-p, --project <id> (required)Preview designs
screens -p <id>-p, --project <id> (required)Preview designs
view--projects --name <name> --sourceScreen <name> --project <id> --screen <id> --servePreview designs

serve

Serve project HTML screens via local web server.

FlagDescriptionRequired
-p, --project <id>Project IDYes

screens

Explore all screens in a project.

FlagDescriptionRequired
-p, --project <id>Project IDYes

view

Interactively view Stitch resources.

FlagDescriptionDefault
--projectsList all projectsfalse
--name <name>Resource name to view
--sourceScreen <name>Source screen resource name
--project <id>Project ID
--screen <id>Screen ID
--serveServe the screen via local serverfalse

Build

CommandFlagsGuide
site -p <id>-p, --project <id> (required) -o, --output <dir> -e, --exportBuild a site
snapshot-c, --command <command> -d, --data <file> -s, --schema

site

Build a structured site from Stitch screens.

FlagDescriptionDefault
-p, --project <id>Project IDrequired
-o, --output <dir>Output directory.
-e, --exportExport screen-to-route config as build_site JSONfalse

snapshot

Create a UI snapshot given a data state.

FlagDescriptionDefault
-c, --command <command>The command to snapshot
-d, --data <file>Path to JSON data file
-s, --schemaPrint the data schema for the commandfalse

Integration

CommandFlagsGuide
tool [name]-s, --schema -d, --data <json> -f, --data-file <path> -o, --output <format>Use Stitch tools in agents
proxy--transport <type> --port <number> --debugConnect your agent

tool

Invoke MCP tools directly.

FlagDescriptionDefault
-s, --schemaShow tool arguments and schemafalse
-d, --data <json>JSON data (like curl -d)
-f, --data-file <path>Read JSON from file (like curl -d @file)
-o, --output <format>Output format: json, pretty, rawpretty

Run tool without a name to list all available tools.

proxy

Start the Stitch MCP proxy server.

FlagDescriptionDefault
--transport <type>Transport typestdio
--port <number>Port number
--debugEnable debug logging to filefalse

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 bundled config
STITCH_PROJECT_IDOverride project ID
GOOGLE_CLOUD_PROJECTAlternative project ID variable
STITCH_HOSTCustom Stitch API endpoint