The protocol in short
- One endpoint.
POST https://mcp.widgetic.com/, JSON-RPC 2.0. Every request carries its own credential,Content-Type: application/jsonand anAcceptthat lists bothapplication/jsonandtext/event-stream. - One JSON document per answer. The server is stateless: there is no session to open, no stream to hold and nothing to listen on. A
GETthat asks fortext/event-streamgets405withAllow: POST, OPTIONS. A call that takes time answers at once, and you follow it with later calls: see While a build runs. - Revisions. The server speaks revision
2025-11-25of MCP and the ones before it. A request that names revision2026-07-28, in theMCP-Protocol-Versionheader or in_meta["io.modelcontextprotocol/protocolVersion"], is answered the way that revision says: noinitialize, aresultTypeon every result, aserver/discovercall that lists what the server accepts, and atools/listthat says how long to keep the list (ttlMs, one minute,cacheScope: "private"). A request that names anything else is answered as it always was.
Check the tools without a key
The version of the tool contract and the names of the tools are published at an address that needs no credential:
Use it before a release, or in a test, to check that the tools your client was written for are the ones the server serves: compare
contractVersion and tools with what the client expects, and read tools/list again when they differ. The document has no descriptions, no input schemas and nothing that depends on who asks, so it is the same for everyone. It answers GET and HEAD, and it sends no CORS headers: read it from a server or a script, not from a web page.
Questions before a build
When a request tocreate_widget is very open (“a widget for my bakery”), the server does not start a build and spend a credit on a guess. It asks a few short questions first, and builds once they are answered. revise_widget does the same for a change request that does not say what should change. A question starts nothing and costs no credit.
What it asks
- For a new widget: what kind of widget it should be (a quiz or poll, a countdown, an image gallery or carousel, an FAQ or list, a timeline, a chart or calculator, or the person’s own words), what it should look like (clean and light, dark and bold, playful and colorful, matching their brand colors, or their own words) and, optionally, anything it must say or show. A question the call already answers is left out.
- For a change: what should change (colors and style, layout, texts and content, behavior and animation, sizes and spacing; several can be chosen) and, optionally, a description of the change.
- Nothing else, and never a secret. What the person types is cut to the room its field has.
suggest_widgets asks questions of its own, up to three and once, when a goal is too open to suggest widgets from: its status is needs_details, the questions come in the answer, and you call the tool again with the answers in details. create_widget_batch and replicate_widget never ask.
How the questions reach your client
- In words (every client)
- As a form (revision 2026-07-28)
The call comes back as a tool error that says nothing was started and no credits were used, and lists the questions. Put them to the person, then call the same tool again with the whole request and the answers added to it. The server keeps nothing between the two calls, so the second call carries everything.
While a build runs
create_widget and revise_widget start the work and answer at once. They, get_widget, show_widget and cancel_widget_creation all return the same state object, so one reader serves all five. This is what get_widget returns a minute into a build:
Poll
get_widget every 5 to 10 seconds until phase is ready, failed or cancelled. It uses no credits, and a build usually takes a few minutes. There is no push, and no progress inside a single call: the figure moves in coarse steps and there is no time estimate. Polling faster does not make the build quicker, and each call counts against the tool’s budget for the minute.
What the server keeps true
- The state is read from stored records, not from the memory of one server, so any server can answer and a restart loses nothing.
- A build that stops reporting for 5 minutes is reported as
failedwith a note, not asgeneratingfor ever. A widget with no draft and no build record isqueuedfor its first 2 minutes andfailedafter that. - A failed or cancelled revision never erases the draft the person already has: the widget stays
ready, with a note. - Credits come back when a build fails.
queued or generating, revise_widget, publish_widget and delete_widget are refused for it, each with a sentence that says nothing was started, published or deleted. cancel_widget_creation marks the build as cancelled, but it cannot stop work the generator has already begun, so a draft can still appear afterwards. For 2 minutes after a stop, delete_widget is refused as well, because the stopped build may still be writing to the widget; the refusal says to try again in a few seconds.
Batches, translations and the rest
create_widget_batch answers at once with one entry for each widget and returns no state object: follow each widget with get_widget, as above. create_translation and add_translation_languages are the one place where a single call waits for work. They wait for under a minute, then answer with what they have (finished is false while some languages are still being made), and you follow them with get_translation until its state is ready. A translation that has not finished is not a failure and the work goes on without you.
Saving files
save_to_media_library runs inside the call and returns a result for every file, so there is no live percentage to follow.
- What it takes. Up to 10 HTTPS links in
file_urls, and up to 10 attachedfiles, filed in the folder you name (Assetswhen you name none). A link has to answer directly: redirects are not followed. A file can be up to 250 MB, an SVG up to 2 MB, a JSON or Excel file up to 10 MB. - What it returns.
savedlists each file with itsmedia_id,name,kind,folderandthumbnail_url.failedlists thepositionof each file that could not be saved and thereason, in words: the type is not supported, the file is too big, the link did not answer, or the storage allowance is full. One bad file does not stop the others. - Room. Saved files count against the storage allowance.
get_account_usagereportsstorage_used_mbandstorage_limit_mbbefore you save many.
create_widget and revise_widget take up to 5 files of their own and up to 5 media_ids of images already in the media library. The files argument holds what ChatGPT hands over for an attachment (a temporary download_url and a file_id), and the server fetches those only from the file hosts of OpenAI and ChatGPT. Any other client saves the image with save_to_media_library first and passes the media_id it gets back. A file that cannot be used refuses the whole call before any credit moves, and the answer names it and says why.
Errors
A failure is one of two things, and a client should treat them differently. An HTTP error says the request did not reach a tool at all. A tool error says the tool ran and refused. The event methods of MCP events refuse a third way, with HTTP200 and a JSON-RPC error that has its own codes.
At the door
The server checks the request in this order: the credential and the plan that goes with it, thenAccept, Content-Type, the size of the body and the JSON in it. An answer about the credential, the plan or the rate has a body of the form { "error": "...", "error_description": "..." }. An answer about the request itself (400, 406, 413, 415) is a JSON-RPC error: { "jsonrpc": "2.0", "id": null, "error": { "code": ..., "message": "..." } }.
Any other address on the host answers
404 with { "error": "not_found" }. A browser that opens the bare host is sent to the overview of these docs.
Inside a tool
A tool error comes back with HTTP status200. The result has isError set to true and one text item, a sentence written for the person to read as it is. It has no structuredContent.
isError and from the tool you called, and do not match on the words: they are written for people and can be improved from one release to the next. Every refusal says whether anything was changed. A refusal that starts nothing says that no credits were used.
Several agents on one account
Any number of clients can be connected to the same workspace at once: ChatGPT, two Cursor windows, Claude Code in a terminal, a script with an API key. Each connection is separate and has its own grant, which the person can revoke without touching the others. They all work as the same account in the same workspace, so they see the same widgets, the same media library, the same Brand Kit, the same workflows, A/B tests and translations, and they spend the same credits. There is no push between agents. One is not told when another changes something: it sees the change the next time it reads. The one notice that exists is MCP events, and it tells a subscribed app that a visitor sent an entry into a widget, not that another agent changed it. Reading entries (list_widget_data, get_widget_data) changes nothing, so several agents can do it at once.
What is protected
A tool that changes a widget takes therevision the widget had when the agent read it, as expected_revision: revise_widget, publish_widget, unpublish_widget, rename_widget, delete_widget, update_widget_customization, save_embed_settings, apply_embed_code and add_content_from_files. save_workflow and publish_workflow do the same with a workflow’s revision. When the token is no longer the current one, the tool does nothing, uses no credits and says the widget has changed, so the agent reads it again instead of writing over somebody else’s change. Pass it whenever you read first. The details are in Changing a widget that may have changed.
A revision is a short opaque token, 16 hexadecimal characters. It moves when the widget is renamed, built, published, unpublished or set live, and not for a thumbnail or any change nobody would call a change of the widget. Copy it as it is.
What is not protected
- Starting a build.
create_widgethas a repeat guard, but a narrow one: the same title (capital letters ignored) from the same account within two minutes returns the widget already started, and charges nothing. Another title, or the same one two minutes later, starts another widget. The same holds for each entry ofcreate_widget_batch, and it refuses a second batch within the same minute. - Copies and new things.
duplicate_compositionadds a copy at every call, up to 10 for a widget.save_workflowandsave_ab_testwithout an id make another one at every call, and so does a retry after a timeout: checklist_workflowsorlist_ab_testsfirst. - The Brand Kit.
update_brand_kithas no revision. The later write wins, andcolorsreplaces the whole palette, so an agent that read the palette before another one changed it, and sends it back, undoes the other’s colors. Read it again withget_brand_kitbefore you write. The answer carries what each changed part was before, so nothing is lost for good. - The media library.
manage_media_libraryrenames and moves files without a lock, so the later of two renames of a file wins.delete_media_fileis final for everyone. - Final for everyone.
delete_widget, a stop withset_ab_test_stateandcancel_widget_batchcannot be undone, and an agent that is still waiting for what they ended finds it deleted, stopped or cancelled. The exact title or name the person confirmed protects against the wrong target, not against another agent that is still working on the right one. Passexpected_revisiontodelete_widgetto refuse the delete when the widget has changed since you read it. - Offline for everyone.
unpublish_widgettakes a widget offline for every agent, until any agent publishes it again, or a revision that was not asked to stay a draft does.
Checklist for a client
- Send
Content-Type: application/jsonand anAcceptthat lists bothapplication/jsonandtext/event-stream. - Treat an HTTP error and a tool error (
isError) differently, and show the sentence of a tool error as it is. - Handle the questions before a build: as words in every client, as a form in a client on revision
2026-07-28that declares one. - Poll
get_widgetevery 5 to 10 seconds, and stop atready,failedorcancelled. Showstatus_textandnoteas written. - Pass
expected_revisionwhenever you read before you write. - After a call that starts something has failed without a clear answer, call
list_widgetsbefore you call it again.