> ## Documentation Index
> Fetch the complete documentation index at: https://docs.widgetic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI agents (MCP)

> Build, preview, publish and embed Widgetic widgets from ChatGPT, Codex, Cursor, Claude Code, VS Code and any other MCP client

Widgetic runs one public [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server. Connect an AI assistant to it and you can describe a widget in plain words, watch it being built, publish it and get the code to put it on a website, without leaving the conversation.

```text theme={"theme":"css-variables"}
https://mcp.widgetic.com
```

That address is the whole setup: every supported assistant uses the same one.

> [!NOTE]
>
> MCP builds and manages widgets in the Widgetic account the connection acts for. It does **not** configure partner accounts: managed users, storage, billing, webhooks and activation use the [Partner API](https://docs.widgetic.com/docs/partners/overview.md) from your server.

## What you can ask for

> [card] Build
>
> "Make a countdown to our launch on March 3, in our brand green." The assistant starts the build and shows you the preview as it comes together.

> [card] Change
>
> "Make the numbers bigger and add a title." Changes that need new code are rebuilt, and the new version replaces the one your embeds show (ask for a draft to try it first); texts, images, colors, fonts and sizes of a published widget change at once.

> [card] Publish and embed
>
> "Give me the embed code for it." A finished widget is already published, so its embed code is ready: the standard JavaScript embed code you paste into your page, and a share link. Where a page cannot run a script, ask for an iframe instead. To look at a widget before it goes live, ask the assistant to keep it as a draft; publishing it later is a separate step.

> [card] Find, reuse and manage
>
> "Show my drafts." "Save these logos to my media library and use the first one." "Go back to the previous version." "Copy this widget for the pricing page." The assistant can also rename or delete a widget (deleting asks you to confirm its title) and tell you how many credits you have left.

> [card] Plan a page
>
> "I want a landing page for my basketball team. Which widgets would work?" The assistant suggests the widgets that fit (a scoreboard, a schedule, a gallery, cards for the players), asks a few questions if it needs them, and starts the ones you choose together, each in its own canvas.

> [card] Create a workflow
>
> "Make a workflow for my newsletter launch: my sign-up form first, then a one-question poll about what people want to read, then a thank-you card." The widgets of a workflow come one after another, in the order you give: a visitor sees the first, and when something happens on it (they send the form, they vote) the next one takes its place in the same spot on the page. The assistant uses the published widgets you already have that fit (here, the sign-up form), builds the ones that are missing (the poll and the thank-you card, 1 credit each, with the total told to you first), and chains the three in that order. It tries the workflow with made-up visitors and publishes it only after you have seen it tried. Workflows need a Teams account, or a partner account.

## How it works

**1. Describe the widget**

The assistant calls `create_widget` with your description. The build starts and returns at once, usually finishing within a few minutes. If your description is very open ("a widget for my bakery"), the assistant asks a few short questions first, and nothing is started or charged until you have answered.

**2. Watch and review**

`show_widget` displays the build progress and then the live preview (as a card in assistants that can show one, as text otherwise). Ask for changes with `revise_widget`.

**3. Publish, or keep a draft**

A finished build is published for you, unless your plan does not include publishing, you approved the connection without the permission to publish, or you asked to keep it as a draft. `publish_widget` makes a kept draft live, or brings an earlier version back. It is only called after you agree, because it replaces what existing embeds show.

**4. Customize and embed**

`update_widget_customization` changes the texts, images, colors, fonts and sizes of a published widget without rebuilding it, and `add_content_from_files` fills its content list from files in your media library. `get_embed_code` returns the code and a share link, and `save_embed_settings` and `apply_embed_code` set how it is embedded (see [Embed settings](https://docs.widgetic.com/docs/agents/tools.md#embed-settings)).

For a page or a workflow made of several widgets, ask which widgets the assistant would suggest. It answers with a list, you choose, and it starts the chosen ones together (up to 25 at a time), after telling you how many credits that is. See [Several widgets at once](https://docs.widgetic.com/docs/agents/tools.md#several-widgets-at-once).

With published widgets you can also ask for a **workflow**: widgets chained on one embed, one after the other, so that a visitor who sends a form sees the thank-you card next, in the same place. The assistant writes it for you, tries it with made-up visitors, and publishes it only after you have seen it tried. See [Workflows](https://docs.widgetic.com/docs/agents/tools.md#workflows).

With a Teams account (or a partner account) you can also **A/B test** two to four published widgets on one embed and read which reaches a goal, or **translate** a widget into several languages on one embed. Turn on **Always translate** and every new widget in the workspace is translated into the languages you chose, and kept up to date when its original changes. See [A/B tests](https://docs.widgetic.com/docs/agents/tools.md#a/b-tests) and [Translations](https://docs.widgetic.com/docs/agents/tools.md#translations).

Workflows, A/B tests and translations are part of the Teams plan and of a partner account: see [What you need](#what-you-need).

The full list of tools is in the [tools reference](https://docs.widgetic.com/docs/agents/tools.md).

## What it costs

* **Creating and revising** a widget uses **1 credit per call**, charged when the build starts. Starting several at once uses **1 credit per widget**, charged as each build starts, and the assistant tells you the total before it starts them.
* **`replicate_widget`** only offers the copy that the Widgetic browser extension stored from a web page (the `wgc_…` link): it runs no model, builds nothing and uses **no credits**. The widget itself is made in the Widgetic chat, where you paste the same link. That is a build like any other, so it uses **1 credit**, like a new widget: it starts from the real code of the original when the copy shows a Widgetic widget you are allowed to open, and the model draws it from the copy when it shows anything else on the web.
* Everything else (suggesting which widgets to build, previews, listing, versions, copies, renaming, deleting, customization, embed code, workflows, A/B tests, translations, the media library, checking your usage) uses no credits. Saved files count against your storage allowance.
* **Publishing** needs a plan that includes it and a connection approved with the publish permission. If either is missing, builds stay drafts and the assistant tells you.

## What you need

* A Widgetic account whose plan **includes API access**. Without it the connection is refused with a message saying so.
* New widgets are made in this connection's workspace, the one you chose when you connected (or the one the API key was made for). Your role has to allow making widgets there, the credit comes from the workspace's own credits, and the workspace's Brand Kit applies. See [Where a new widget goes](https://docs.widgetic.com/docs/agents/tools.md#where-a-new-widget-goes).
* For **workflows**, **A/B tests** and **translations**, a **Teams** account, or a **partner** account. What counts is the plan of the workspace this connection works in, the one you chose when you connected, not the plan of your other workspaces. On any other plan the assistant is told that the feature is not included, and nothing is changed.
* An assistant that supports remote MCP servers. See [Connect your assistant](https://docs.widgetic.com/docs/agents/connect.md) for ChatGPT, Codex, Cursor, Claude Code and VS Code.

## Good to know

> [accordion] Widgets that keep what visitors send
>
> When your request needs it (a vote, a rating, a comment, an RSVP or a sign-up), the assistant can build a widget that keeps what its visitors send. Widgetic stores those entries in the widget's own database in your account, and the widget can show the results (a poll's tally, an average rating). You can ask the assistant for them whenever you like: counts per option by default, and the entries themselves only when you ask. A visitor can send more than once, and entries are not emailed or forwarded anywhere. The entries are yours: you can export or delete them through the REST API or the CLI (the assistant itself only reads them), and they are deleted with the widget. Orders, payments and logins are not built. A widget replicated from a web page element keeps nothing, and neither does one you did not ask to keep entries (a quiz, a countdown, a gallery, a chart or a calculator only displays information).

> [accordion] Retrying a build
>
> Each `create_widget` call starts a separate widget and charges credits. A repeat of the same title within two minutes returns the widget already started and charges nothing, so a retry after a lost answer does not build twice; the same goes for each widget of a batch started with `create_widget_batch`. If a call times out, ask the assistant to check your widget list before it tries again.

> [accordion] Deleting a widget
>
> `delete_widget` removes a widget for good, with all its versions and published copies; embeds already placed on websites stop working, and it cannot be undone. The assistant has to pass the exact title you confirmed, and a widget that is still being built cannot be deleted. Going back to an earlier version never deletes anything: `list_widget_versions` and `publish_widget` do that.

> [accordion] Deleting a file
>
> `delete_media_file` removes one file from your media library for good and gives its space back to your storage allowance. A widget that loads the file stops showing it, so the assistant is told which widgets use it and the file is refused until you say you still want it gone. Widgetic cannot see inside widgets built before it kept a record of which file went into which widget, so it never says that a file is unused. The assistant has to pass the exact file name you confirmed. Renaming or moving a file with `manage_media_library` is safe for your widgets: the file's address does not change.

> [accordion] Files you attach or link
>
> Images (PNG, JPEG, WebP, GIF, HEIC, SVG), videos (MP4, WebM, MOV), audio (MP3, WAV, OGG, M4A), PDFs and data files (CSV, JSON, Excel `.xlsx`) can be saved to your media library from attached files or HTTPS links, up to 250 MB each (an SVG up to 2 MB, JSON and Excel files up to 10 MB). An SVG is cleaned of scripts and other active content before it is saved. A JSON or Excel file is read before it is saved and kept only if it holds a table; an Excel file is read from its first sheet, as the values it stores. FLAC and AAC audio and the old `.xls` Excel format cannot be saved.

> [accordion] Your prompts are screened
>
> Requests to create or revise a widget are checked with a content moderation service before they are acted on, and so are the words you use to ask which widgets to build. Those words are also sent to a language model, which writes the suggestions. See the [privacy policy](https://widgetic.com/legal/privacy) for what is sent and why.

## Build on it

> [card] [Build your own client](https://docs.widgetic.com/docs/agents/build-a-client.md)
>
> The tool contract you can check without a key, questions before a build, progress, files, errors, and several agents on one account.

> [card] [MCP events](https://docs.widgetic.com/docs/webhooks/mcp-events.md)
>
> Be called at your own address when a visitor sends an entry into one of your published widgets.

> [card] [Docs for agents](https://docs.widgetic.com/docs/agents/docs-for-agents.md)
>
> Let your coding agent search and read these docs, install the skill, and report a page that is wrong.

> [card] [Connect your assistant](https://docs.widgetic.com/docs/agents/connect.md)
>
> One snippet per client.

> [card] [Tools reference](https://docs.widgetic.com/docs/agents/tools.md)
>
> Every tool, what it costs and what it needs.

> [card] [Authentication](https://docs.widgetic.com/docs/agents/authentication.md)
>
> Sign-in, API keys and revoking access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.