Skip to main content
Glama

@swebsy/mcp — connect your coding agent to Swebsy

Build and edit real websites with the coding agent you already pay for — no per-token AI fees.

npm CI License: MIT

An agent creating a site, rewriting the hero, adding a section and exporting it, while Swebsy Studio updates live

@swebsy/mcp is an MCP server that lets Claude Code, Codex, Cursor, Windsurf, Cline, GitHub Copilot — or any agent that speaks the Model Context Protocol — drive an open Swebsy Studio tab. Your agent discovers templates, creates and opens sites, renames projects, adds sections, edits content, switches pages, sets every site setting (SEO, favicon, fonts, analytics, robots.txt, deploy target), captures screenshots, and exports the finished site, all over a local 127.0.0.1 WebSocket relay. Nothing is proxied through our servers, and Studio redacts secrets (API keys, deploy tokens, chat history) before anything crosses the bridge. Your coding agent's own service and privacy policy still apply to the non-secret content it receives.

Using ChatGPT or Claude (the apps)? You don't need this package. Add https://mcp.swebsy.com/mcp as a custom app in ChatGPT or a custom connector in Claude, sign in to Swebsy and click Allow — setup steps. This package is for coding agents that run on your machine.

What is Swebsy?

Swebsy is a visual website builder with a real ownership model: you build visually, export real files (HTML/CSS/JS), and publish wherever you want — no lock-in, no proprietary hosting requirement. The free plan runs fully local; no account required.

Related MCP server: Wix MCP Server

Why use an MCP instead of a built-in AI panel?

Most "AI website builders" bolt on a chat panel and bill you per token on top of the model you're already subscribed to. Swebsy takes the opposite approach — it exposes the editor as a tool your own agent can drive:

  • No per-token API billing. Swebsy isn't in the loop on model costs. You use the Claude, Cursor, Codex, or Copilot plan you already pay for.

  • Runs on your machine. The agent talks to your open Studio tab over a local 127.0.0.1 bridge — prompts and content aren't shipped off to be metered.

  • Bring your own agent. Your model, your custom instructions, your workflow — not a locked-down wrapper. Any MCP-capable agent works.

  • You own the output. Everything the agent builds exports as real, portable files you can host anywhere.

Setup

One command registers Swebsy with every supported agent it finds (Claude Code, Codex, Cursor, Windsurf, VS Code, Cline):

npx -y @swebsy/mcp setup

It never changes an existing swebsy entry and never rewrites a config file it can't parse; it reports each agent's result. Or register it by hand:

Claude Code

claude mcp add swebsy -- npx -y @swebsy/mcp

Codex

codex mcp add swebsy -- npx -y @swebsy/mcp

Cursor — add to ~/.cursor/mcp.json (or a project's .cursor/mcp.json):

{
  "mcpServers": {
    "swebsy": { "command": "npx", "args": ["-y", "@swebsy/mcp"] }
  }
}

GitHub Copilot (VS Code)

code --add-mcp '{"name":"swebsy","command":"npx","args":["-y","@swebsy/mcp"]}'

Windsurf — add the same JSON block to ~/.codeium/windsurf/mcp_config.json.

Cline — add the same JSON block to cline_mcp_settings.json, or use the extension's MCP Servers → Configure button, which opens it:

  • macOS ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

  • Linux ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

  • Windows %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

Cline CLI (npm i -g cline) is a separate install from the extension, with its own config at ~/.cline/data/settings/cline_mcp_settings.json and a nested transport block:

{
  "mcpServers": {
    "swebsy": {
      "transport": { "type": "stdio", "command": "npx", "args": ["-y", "@swebsy/mcp"] }
    }
  }
}

Or let its own CLI write it: cline mcp add swebsy --yes -- npx -y @swebsy/mcp.

Pairing

  1. Run npx -y @swebsy/mcp setup

  2. Restart your agent.

  3. Ask it: "Build me a landing page with Swebsy." The first request opens Studio and connects it.

You connect once per browser. Whenever no Studio tab is connected, the next tool call opens Studio and reconnects it by itself (it waits up to 20 seconds). The session is saved in ~/.swebsy/agent-<port>.session, so it survives the bridge restarting.

Claude Code also lists a /swebsy:swebsy (MCP) prompt that walks the agent through connecting and opening a site. Other agents show MCP prompts their own way, if at all.

To pair by hand (the browser didn't open, Swebsy runs in a different browser, or SWEBSY_NO_OPEN=1 is set):

  1. Ask your agent to run the swebsy_start_pairing tool. It opens the pairing link in your default browser automatically, and also returns the link, raw code, and relay port.

  2. Swebsy connects automatically and strips the code from the address bar after it is used. (Set SWEBSY_NO_OPEN=1 to skip the auto-open and just get the link back.)

  3. If the browser didn't open — or Swebsy is running in a different browser — open the returned link there yourself, or use the fallback fields under Global settings → Coding agents → Didn't connect? Pair by hand: paste the raw code, leave the port at 37373 unless you changed SWEBSY_AGENT_PORT, and click Connect.

  4. Prompt your agent as usual — it drives the tab through the swebsy_* tools.

Keep the Studio tab open. If the browser puts it to sleep, tools return tab_unresponsive until you click the tab. Pinning it may help, or add Studio under Chrome's Settings → Performance → "Always keep these sites active".

Full guide: https://docs.swebsy.com/settings/ai-coding-agent/

Multiple agents

Several coding agents can share one paired Studio tab. Register @swebsy/mcp in each agent and use the same SWEBSY_AGENT_PORT (default 37373) for every server. The first MCP process starts the local broker; later processes join it automatically, so Studio only needs to be paired once.

Studio shows the connected-agent roster and activity. The broker serializes commands across agents so the editor handles one command at a time, and routes each result, screenshot, and export back to the agent that requested it. One Studio tab can be paired to a broker at a time; pairing another tab revokes the previous tab.

What your agent can do

Once paired, your agent can work from Home or Studio. It can refresh and list installed templates, create the standard blank site or import a template unchanged, list saved-site metadata, open sites by ID, and rename their internal Swebsy names. Duplicate names are allowed; IDs are authoritative.

After swebsy_create_site or swebsy_open_site, poll swebsy_status until the expected siteId appears and editorReady is true. The agent can then read the page tree, add and edit sections, create and link pages, insert blocks, manage reusable symbols — including repeating one with different content per instance while its styling stays in sync — capture screenshots at any viewport, and export the project.

swebsy_list_sites returns metadata only — never page content, thumbnails, assets, revisions, or settings. Agent-driven create/rename analytics contain only source/template/site IDs, never internal names or site content.

Configuration

Env var

Default

Purpose

SWEBSY_AGENT_PORT

37373

Port the local relay listens on

SWEBSY_AGENT_DIR

workspace .swebsy-agent

Where screenshots/exports land

SWEBSY_APP_URL

https://studio.swebsy.com

Studio origin for the swebsy_start_pairing link (set for local/self-host)

SWEBSY_NO_OPEN

(unset)

Set to skip auto-opening the pairing link in the browser

Build from source

The published package is all you need to use this; the source is here to read, audit, or hack on.

git clone https://github.com/swebsy/MCP.git
cd MCP
npm install
npm test
npm run build      # -> dist/server.js

Point an agent at your local build instead of npm:

claude mcp add swebsy -- node /absolute/path/to/MCP/dist/server.js

This repo is a generated mirror, snapshotted from the mcp/ directory of Swebsy's main repository on every release. Every file here is overwritten on the next sync, so a pull request against it would be erased rather than merged — please open an issue instead and we'll apply the change upstream.

License

MIT

Available Tools

45 tools
swebsy_add_sectionAdd sectionAInspect

Insert a new section into the current page. Use for adding discrete sections (hero, features, pricing, CTA) to an existing page. Supply exactly one of component (a component tree) or html (one root element). Appends to the end by default; to place it somewhere specific, pass position plus the targetPath of the component to place it next to.

Inputs: summary (required), html, position, component, +1 more.

swebsy_add_symbol_instanceAdd symbol instanceAInspect

Add a linked INSTANCE of an existing symbol (see list_symbols) to the CURRENT page. The instance stays in sync with the symbol main and every other instance — the way to reuse one navbar/footer/CTA across pages. Select the target page with select_page first.

Inputs: symbolId (required), position, targetPath.

swebsy_animate_pageAnimate pageAInspect

Apply Swebsy's built-in scroll-reveal animation in one step — a smart, per-section staggered entrance on headings, text, images, buttons, and cards (navbars/footers skipped). Prefer this over hand-placing animate-* classes whenever the user asks to animate the page or site, or wants a consistent reveal.

Inputs: scope.

swebsy_captureTake screenshotA
Read-onlyIdempotent
Inspect

Capture a styled screenshot of the current page at a fixed viewport, written under .swebsy-agent/screenshots/. Returns the file path. Scope it with targetPath when verifying ONE section — a whole-page PNG downscales so far that component detail is unreadable.

Inputs: viewport (required), targetPath, selectionOnly.

swebsy_commit_design_directionCommit design directionAInspect

Commit this site to a specific visual direction, and apply it (fonts, type roles, palette swatches). Call this ONCE, BEFORE generating a new site's first page — a site with no committed direction has nothing for later edits to stay consistent with, and the result drifts to generic. Prefer a directionId from the sampled menu; supply the custom fields only when the user's brief clearly calls for something the menu doesn't cover. Not needed when editing a site that already has a direction.

Inputs: custom, directionId.

swebsy_create_pageCreate pageAInspect

Create a NEW blank page in the project and (by default) select it. Returns the new page's id and fileName. The page starts nearly empty — fill it with replace_page_content or add_section, and point a navbar/link at it with link_page. Use THIS to add an additional page; use replace_page_content (NOT this) to overwrite the current page's content.

Inputs: name (required), select, fileName.

swebsy_create_siteCreate siteAInspect

Create a site and open it in Studio. Pass name to set its internal Studio/Home name (default "My Website"). Omit templateId for Swebsy's standard blank site; provide an installed template ID to import that template unchanged. Then poll swebsy_status until editorReady is true and siteId matches before editing.

Inputs: name, templateId.

swebsy_delete_assetDelete assetA
Destructive
Inspect

Delete one managed asset from the open site's asset gallery. By default this refuses assets referenced by any page, shared symbol, style, or site setting; call swebsy_list_assets first. force:true also clears live component references and should be used only when that is explicitly intended.

Inputs: assetId (required), force.

swebsy_delete_pageDelete pageA
Destructive
Inspect

Delete a page. The home page (index) and a site's last page can't be deleted. Links to the deleted page are left in place — repoint them with link_page or delete them.

Inputs: page (required).

swebsy_delete_sectionDelete sectionA
Destructive
Inspect

Remove a component from the current page entirely. Use this instead of emptying a section's contents — an emptied section leaves a stray blank div on the page. Deletes the selected component by default; pass targetId or targetPath (from read_page) to delete a component you did not select.

Inputs: summary (required), targetId, targetPath.

swebsy_delete_symbolDelete symbolA
Destructive
Inspect

Delete a symbol. Every instance is DETACHED first and stays on its page as a plain component — nothing disappears from the site. To also remove the copies, delete_section them.

Inputs: symbolId (required).

swebsy_detach_symbolDetach symbolAInspect

Turn ONE symbol instance on the current page back into a plain component, so it can be edited on its own. The symbol and its other instances stay linked. Use it when one page needs a variant of the shared navbar/footer.

Inputs: targetPath (required).

swebsy_duplicate_pageDuplicate pageAInspect

Copy a page (content, classes and styles) into a new page and select the copy. Returns the new page's id and fileName. Use it to start a page from an existing layout instead of rebuilding it.

Inputs: page (required), name.

swebsy_duplicate_sectionDuplicate sectionAInspect

Copy a component (with its classes and styles) and insert the copy right after it. Paths after it shift by one — call read_page before the next path-based edit (ids don't shift).

Inputs: targetId, targetPath.

swebsy_edit_sectionEdit sectionAInspect

Modify an existing component. By default this edits the selected component. To edit a component identified by read_page, provide its targetId (preferred — survives other edits) or targetPath; an explicit target overrides the canvas selection. Preferred: provide component — the full replacement component tree (compact DSL OK), best for structural changes. Alternative: provide html — the complete modified HTML string. Fallback: provide patch — JSON Patch (RFC 6902) for tiny single-property tweaks. Supply exactly one. Preserve existing IDs: an id kept in the edit keeps the styles attached to it; an id you drop loses them. The result's id is the component's id after the edit (a replacing edit can give it a new one). changed: false means the page's HTML/CSS/JS came out identical, so the edit did not show up; success: false means a patched attribute is not what the page exports.

Inputs: summary (required), html, patch, targetId, +2 more.

swebsy_exportExportAInspect

Export the site to .swebsy-agent/exports/. Static files via the site exporter and/or the project JSON (with assets). Returns outDir, the exported page paths, and per-kind file counts — verify a build by grepping those HTML files.

Inputs: minify, baseUrl, verbose, includeStatic, +1 more.

swebsy_get_builder_guideLoad builder guideA
Read-onlyIdempotent
Inspect

Load the static Swebsy builder guidance (component system, theme classes, conventions) that the in-app AI Builder is primed with.

Inputs: no named parameters.

swebsy_get_skillLoad guidanceA
Read-onlyIdempotent
Inspect

Load deep, on-demand guidance for a specific area before acting on it (e.g. before adding animations, composing a new page, writing copy, building forms, editing the nav, or reusing components with symbols). Returns the full instructions for that skill.

Inputs: skill (required).

swebsy_insert_blockInsert blockAInspect

Insert a pre-built block from the catalog and optionally customize its content. STRONGLY preferred over generating from scratch when a matching block exists. The block re-themes on insert — its colour and font classes resolve against THIS site's theme, so the result is meant to differ from the catalog thumbnail (a screenshot of the block in the template it came from).

Inputs: blockId (required), position, targetPath, adaptations.

swebsy_list_assetsList assetsA
Read-onlyIdempotent
Inspect

List managed assets in the open site with whole-project usage counts. References are checked across every page, shared symbols, styles, and site settings. Use imagesOnly:true and unusedOnly:true before deleting unused gallery images.

Inputs: imagesOnly, unusedOnly.

swebsy_list_blocksList blocksA
Read-onlyIdempotent
Inspect

List the pre-built block catalog (ids + labels) available to insert_block.

Inputs: no named parameters.

swebsy_list_pagesList pagesA
Read-onlyIdempotent
Inspect

List the project's pages (id, name, fileName, section count, which one is selected). Call this instead of guessing a page name for select_page or link_page.

Inputs: no named parameters.

swebsy_list_sitesList sitesA
Read-onlyIdempotent
Inspect

List saved sites newest-first as metadata only: IDs, internal names, status, timestamps, template ID, page count, and whether each site is open.

Inputs: no named parameters.

swebsy_list_skillsList guidance topicsA
Read-onlyIdempotent
Inspect

List the available deep-guidance skills (animation, page-composition, copywriting, forms, nav) with one-line summaries.

Inputs: no named parameters.

swebsy_list_symbolsList symbolsA
Read-onlyIdempotent
Inspect

List the project's SYMBOLS (reusable components that stay in sync across every page). Returns each symbol's id, name, component type, instance count, and how many pages use it, plus a health report of BROKEN linkage: orphans (copies whose main was deleted — editing them changes nothing elsewhere), unregistered (instances the main doesn't list back, so edits propagate one way only) and ghosts. Repair any of it by calling promote_to_symbol on one affected section. Use before add_symbol_instance to find the symbol id.

Inputs: no named parameters.

swebsy_list_templatesList templatesA
Read-onlyIdempotent
Inspect

Refresh and list installed site templates with names, descriptions, tags, fonts, preview URLs, and thumbnail URLs. Works from Home or Studio.

Inputs: no named parameters.

swebsy_move_sectionMove sectionAInspect

Move a component to just before or after another component on the current page — reorder sections, swap columns, lift a CTA above the footer. The component keeps its id, classes and id-styles. ALWAYS use this to reorder; delete + re-add loses the component's styles. Name each side by id (targetId/anchorId) or by path (targetPath/anchorPath).

Inputs: anchorId, position, targetId, anchorPath, +1 more.

swebsy_open_siteOpen siteAInspect

Open a saved site by ID in the paired tab and return its metadata. Idempotent if it is already open. Poll swebsy_status for the expected siteId and editorReady before editing.

Inputs: siteId (required).

swebsy_promote_to_symbolPromote to symbolAInspect

Promote an existing component into a reusable SYMBOL so it can be shared, in sync, across pages. Pass its targetPath from read_page (e.g. the navbar or the CTA band). Also REPAIRS broken linkage (see list_symbols → health): re-promoting an orphaned copy rebuilds its main and re-links every other copy of it, and re-promoting a symbol registers instances it had lost. Returns the symbol id (for add_symbol_instance) and a repaired count; copies whose structure has diverged too far are reported as detached — delete_section + add_symbol_instance those instead.

Inputs: targetPath (required), name.

swebsy_publishPublish siteA
Destructive
Inspect

Publish the open site to Swebsy Hosting, free, at its own swebsy.site address, and return the live URL. Call it ONLY after the user has said yes to publishing in this conversation, and ask again before every publish, a republish included: an earlier yes doesn't carry over. If it can't go live straight away (no account yet, a plan limit, something to check), nothing goes out yet: Studio opens its Publish screen and the result says what to tell the user. When it says Studio finishes publishing from there, don't call publish again; the site goes live once the user is done.

Inputs: no named parameters.

swebsy_read_pageRead pageA
Read-onlyIdempotent
Inspect

Read the current page structure: each line shows a component's target path and its #id. edit_section, delete_section, move_section, duplicate_section and link_page take either — prefer the id (targetId), which survives moves and inserts; other tools take the path. Use the id only to target; don't copy auto ids into markup. Call this BEFORE editing a named or relative page component that is not the current selection. The default sections read lists every top-level section with its target path — enough to pick the one to edit. To find a nested element (a link, button, card) pass that section's targetPath plus depth — one call instead of drilling down level by level. When copying content between components, use detail: full WITH the targetPath of the one section you're copying, not a whole-page read. Also call it AFTER applying edits to verify the result.

Inputs: depth, detail, targetPath.

swebsy_read_selectionRead selectionA
Read-onlyIdempotent
Inspect

Read the currently selected component (type, classes, attributes, text). Secrets are never surfaced.

Inputs: no named parameters.

swebsy_redoRedoAInspect

Re-apply tool calls reverted by swebsy_undo, oldest-undone last. Cleared by any new edit.

Inputs: steps.

swebsy_rename_siteRename siteAInspect

Rename a saved site's internal Studio/Home name. This does not change its SEO or public title settings.

Inputs: name (required), siteId (required).

swebsy_rename_symbolRename symbolBInspect

Rename a symbol (the name shown in the Symbols panel).

Inputs: name (required), symbolId (required).

swebsy_replace_page_contentReplace page contentA
Destructive
Inspect

Replace ALL top-level sections of the CURRENTLY SELECTED page with a generated list of components. This OVERWRITES the page — it does NOT create a new page (use create_page) and does NOT append a single section (use add_section). Use when the user asks to build/replace/redesign an entire page. Each top-level component should be wrapped in a container.

Inputs: plan (required), components (required).

swebsy_select_pageSelect pageCInspect

Select a page in the connected Studio project.

Inputs: page (required).

swebsy_start_pairingStart pairingAInspect

Start a pairing session. Returns a single-use pairUrl — give it to the user to click; opening it connects their Studio tab automatically. (Also returns the raw code/port for manual entry.)

Inputs: no named parameters.

swebsy_statusCheck connectionA
Read-onlyIdempotent
Inspect

Report bridge status, siteName, selected page, and editorReady, plus a short theme summary (fonts, default color mode, brand colors). After creating or opening a site, wait until editorReady is true and siteId matches the expected site before editing.

Inputs: verbose.

swebsy_undoUndoAInspect

Revert your own last editing tool call(s) this session (add/edit/delete/move/duplicate_section, insert_block, update_settings, page tools…), newest first. Does NOT undo symbol or asset tools. Refuses (returns blocked) when a page, CSS or settings it would restore has been edited since, so hand edits are never overwritten. Paths may shift — call read_page afterwards.

Inputs: steps.

swebsy_update_pageUpdate pageAInspect

Rename a page and/or change its URL slug — the Pages panel's rename. Links that pointed at the old ./slug.html on every page follow the new slug. The home page's index slug is locked (its display name can still change).

Inputs: page (required), name, fileName.

swebsy_update_settingsUpdate settingsAInspect

Update site settings — SEO title/description, site URL, structured data (JSON-LD), per-page SEO overrides, language/direction, theme tokens (light + dark), type scale, animation defaults, Google and uploaded fonts, dark mode toggle, site-wide custom CSS for component-level restyling (globalTheme.customTailwindConfig), favicon, robots.txt/sitemap/service worker/security headers/image optimization (performance), analytics ids, custom head/body code (advanced), the "Made with Swebsy" badge (branding) and the deploy target (deploy). Provide ONLY the fields that change. general/seo are SITE-WIDE; use page to change ONE page. Also used to match the theme to a reference IMAGE's vibe: sample its palette into brand/surface tokens and ALWAYS set BOTH light and dark variants.

Inputs: summary (required), seo, page, fonts, +8 more.

swebsy_upload_assetUpload assetAInspect

Upload a local image, font, video, audio or PDF file into the open site and return its assetId, src and a usage snippet. Images go in the asset library for image components, video for video components (attributes.src), audio for audio, PDFs as a link href; fonts are stored for update_settings fonts.custom. This is the ONLY way to get your own imagery (screenshots, logos, textures, mockups) into a site — an image with an empty src gets a random stock photo instead. Reads the file from the agent's own filesystem, so pass a path you can see (for example a screenshot you just captured). The asset is stored in the project and travels with static export and project JSON. Pass path or paths (exactly one). Several files: pass paths (up to 25) instead of path for one call that returns a compact {assets: {basename: src}, failed: {basename: reason}} map.

Inputs: path, paths, filename.

swebsy_wrap_sectionWrap sectionAInspect

Wrap a run of sibling components in one new element, optionally with a semantic tag — e.g. put everything between the navbar and footer in <main>, or a footer symbol in <footer>. The wrapped components keep their ids, id-styles and symbol links. ALWAYS use this to add a wrapper; re-sending the components through edit_section/replace_page_content loses their styles. Paths shift — call read_page before the next path-based edit.

Inputs: targetPath (required), endPath, tagName, customName.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 45 tools

    Disambiguation4/5

    Most tools have clearly distinct resource/action targets, and descriptions explicitly disambiguate potential overlaps such as add_section vs insert_block vs replace_page_content, read_page vs read_selection, and delete_section vs detach_symbol. A few boundaries remain softer among the skill/guidance tools and some lifecycle helpers, but the set is generally understandable.

    Naming Consistency4/5

    All tools use the swebsy_ prefix and snake_case, and most follow a predictable verb_noun pattern. Minor deviations are single-word tools like capture, publish, status, undo, and redo, but they remain readable and consistent enough.

    Tool Count2/5

    45 tools is well beyond a typical well-scoped surface and creates a heavy cognitive load for an agent, especially with many granular section, symbol, page, and asset tools. The domain is broad, but the count suggests some operations could be consolidated or exposed more selectively.

    Completeness4/5

    The surface covers the main builder workflows: site creation/opening, page lifecycle, section editing, symbols, assets, settings, publishing/export, undo/redo, and guidance. The main gaps are site-level deletion/duplication and fuller template management, but those are minor relative to the overall coverage.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Static site generator / website building toolkit for AI coding agents like Claude, Codex, Cursor, Gemini, OpenClaw, etc. No subscription, no lock-in — host your site anywhere.
      17 npm
      9
      Elastic 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI clients to control the user's already-open, logged-in browser pages in real time over a local WebSocket channel, without Playwright, Puppeteer, Selenium, or any browser driver. Exposes tools for navigation, semantic page snapshots, clicking, form filling, JavaScript evaluation, screenshots, network monitoring, cookie handling, and tab management via the CDP.
      20
      MIT