Please do not open a public issue for security problems. Use this repository's GitHub Security Advisories ("Security" tab → "Report a vulnerability") for private disclosure. We aim to acknowledge reports within a few business days.
Security fixes target the latest released minor version. Older versions are not back-patched.
This is an unofficial MCP server that drives Webstudio Cloud through a captured browser session cookie + CSRF token. Operators should understand the following before exposing it — especially to automated / untrusted prompt input.
-
The credential is account-scoped, not project-scoped. The session cookie grants access to every project on the Webstudio account, not just the one you are editing. It is stored locally at
~/.webstudio-mcp/projects/<slug>/webstudio-auth.jsonwith0600permissions and is never logged. The per-projectallowPushgate (off by default) guards against accidental writes to the wrong project. -
Destructive actions default to a dry run.
project.nukeand every*.deleteaction default todryRun: trueand require an explicit confirmation (andallowPush) to mutate.project.nukeadditionally requiresconfirmto equal the project slug. -
assets.uploadURL fetch is SSRF-guarded. Caller-supplied URLs are restricted to publichttp(s)hosts; loopback, private, link-local (incl. the cloud-metadata endpoint169.254.169.254), unique-local and CGNAT addresses are rejected. Caveat: HTTP redirects are followed and not re-validated, so do not aim it at untrusted redirectors. -
assets.uploadfilePathreads the host filesystem. It reads with the MCP process's permissions. When the server is exposed to untrusted prompt input, treatfilePathas a sensitive surface — a malicious prompt could attempt to upload local files. -
projectSlugis path-traversal validated (charset-restricted + resolved-path containment check) before it is used as an on-disk directory name. -
Headless Chromium runs with
--no-sandbox. The optional Playwright probe that reads the Webstudio app version launches Chromium with--no-sandboxfor container/root compatibility. It only ever navigates to your own project'sapps.webstudio.isorigin. Prefer running this MCP as a non-root user in a sandboxed environment. -
CMS adapter config holds third-party credentials in plaintext. Files under
~/.webstudio-mcp/cms/*.json(Directus token, WordPress application password, n8n API key) are read but not created by the MCP —chmod 600them yourself. -
Telemetry is opt-in. It is disabled unless
WEBSTUDIO_MCP_TELEMETRY=1is set, and records onlytool/action/projectSlug/ duration — never credentials or input values.
- Run the MCP as a non-root user.
- Keep
allowPushoff except on projects you intend to write to. chmod 600 ~/.webstudio-mcp/cms/*.jsonif you use CMS adapters.- Treat the MCP host as trusted:
filePathuploads and the session cookie make it a credential-bearing process.