> Connect Claude, ChatGPT, Cursor or another MCP client to Plandalf so it can list, design and edit your checkouts and add them to your site.

Source: https://plandalf.com/docs/api/mcp

API and webhooks

# Connect an AI agent with MCP

Plandalf has an MCP server, so an AI agent such as Claude, ChatGPT or Cursor can work on your checkouts: find them, design and edit them, check a screenshot of the result, manage products, prices and deadline timers, and add a checkout to your website's code.

## Connect

1.  ### Add the server to your agent
    
    In your MCP client, add a remote (streamable HTTP) server with this URL:
    
    ```text
    https://admin.plandalf.dev/mcp
    ```
    
2.  ### Sign in and approve
    
    The client opens Plandalf's sign-in. Sign in and approve the access it asks for (the `mcp:use` scope). There's no key to copy.
    
3.  ### Ask for something
    
    For example: "List my checkouts", or "Add the Gold membership checkout to the pricing page in this repo".
    

For Claude Code, add it from a terminal:

```bash
claude mcp add --transport http plandalf https://admin.plandalf.dev/mcp
```

## Which organization it works in

A session starts in the organization you have selected in the dashboard. If you belong to more than one, ask the agent to switch: it calls `use_organization`. That changes only the agent's session; your dashboard and other sessions stay as they were.

## What it can change

Every change goes through one of two tools, so your client asks you to approve two tools rather than one per kind of change: `edit_checkout` for checkout design (pages, blocks, templates, themes and images) and `edit_catalog` for products, prices, deadline timers and what each checkout sells.

To stop an agent, revoke it under **Settings → Authorized Apps**.

## Tools

Tool

What it does

`list_organizations`

List the organizations the signed-in user belongs to, which one this MCP session is working in, and which one the dashboard has selected. Call use\_organization to work in a different one.

`use_organization`

Pin this MCP session to one of the signed-in user's organizations by id or subdomain. Every later tool call in this session works in that organization, whatever the dashboard has selected. It does not change the dashboard selection.

`list_checkouts`

List or search the current organization's checkouts (offers) by name: id, name, status (draft, published, archived), modality and route\_key, the checkout key the website SDK needs. Use it whenever the user names a checkout instead of giving an id; when nothing in the current organization matches, it also returns matches from the user's other organizations. Then pass its id or route\_key to get\_install\_details to put it on a site or to get\_offer to read its design. Never guess ids.

`get_install_details`

Everything needed to add one checkout to the user's own website: the organization's SDK script URL and tag (plain HTML and Next.js), where to load it, the exact checkout key, the buy-button attribute and inline-embed snippets, the install rules, docs links, and warnings (a draft or hosted-page checkout). Find the checkout with list\_checkouts first, and read get\_guide(install) before editing the site.

`get_guide`

Get named guidance. Call install before adding a checkout to the user's own website, mcp\_only and design\_quality before the first design write to an offer (design writes are refused until both are read in this session), variation whenever the user asks for several options, and page\_logic before changing a page graph or interactive CTA; the server instructions list every guide and when to use it.

`get_offer_schema`

Get the locally generated Plandalf offer authoring schema. The default summary is a public component catalog with stable block IDs, purposes, placement guidance, and typed theme variables.

`list_templates`

List templates available to the authenticated organization, including global templates.

`get_template`

Get the complete authoring data for a global or current-organization template.

`validate_template`

Validate a template view against the registered public block contracts before creating it. Also returns warnings for layouts that render but cut content off, such as a Hug stack with a pinned height and Scroll on; fix those too.

`get_offer`

MCP-only source of truth for an organization-owned offer design. Read it by numeric id, lookup key, or editor URL key; optionally focus on one block id. Do not open the editor URL in a browser. Its route\_key is the checkout key the website SDK needs; to install the checkout on a site, use get\_install\_details.

`list_themes`

List global and current-organization themes with every standard token and custom variable.

`get_theme`

Get every standard token and custom variable for one accessible Plandalf theme.

`list_media`

MCP-only media inventory for ready organization assets and their URLs, suitable for image and background blocks. Never substitute an unrelated listed asset for an unavailable supplied image.

`get_media`

Get an accessible ready media item and its durable URL.

`crop_image`

Crop supplied source image bytes to a PNG payload. Follow with add\_media to store the result, then update\_block to assign its URL. If source bytes are unavailable, stop and report that MCP attachment-byte access is required; do not inspect files or substitute an asset.

`request_offer_screenshot`

Request an idempotent Cloudflare screenshot for the current offer revision. Call this after a material visual mutation, then poll get\_offer\_screenshot with the same viewport and page\_id until it returns a ready MCP image. Pass viewport "mobile" (375 by 812) to check the phone rendering and page\_id to check a page after the first.

`get_offer_screenshot`

MCP-only visual verification: retrieve the latest screenshot as an MCP image when its revision is ready. Pass the same viewport and page\_id given to request\_offer\_screenshot. This tool is read-only; use request\_offer\_screenshot when a render is stale or pending.

`list_products`

List the organization's products with their active prices: price id, name, lookup key, amount in minor units (cents), currency, renew interval, trial days and custom\_unit\_amount (the minimum and maximum a buyer may type for an "Other amount" price; null for a fixed price). Use the price ids with attach\_offer\_item and update\_offer\_item, and create a missing price with create\_price.

`list_promos`

List the organization's promos: slug, name, type, status and tiers. Put a slug in a countdown block's content.promoSlug to drive its timer from that promo; the deadline is resolved per visitor and the tiers decide which price they pay. A tier with relative\_window\_seconds runs for that long from the visitor's first view, and a tier marked always is the fallback afterwards. Only a promo whose status is live will run. When none fits, create one with edit\_catalog create\_promo (only when the user asked for a real deadline) rather than adding a countdown that counts down to nothing.

`edit_checkout`

MCP-only mutation for checkout design: create and change offers, pages, blocks, templates, themes and media. If validation fails, stop and report the MCP error; never fall back to a browser, editor, source code, HTML, or another mutation path. Pass `changes`, a list of one or more changes run in order; each change is an object with `action` plus that action's own fields. The run stops at the first change that fails: changes before it stay saved and the error lists them with their results, and nothing after it runs. After a successful change to an offer or theme, a later change in the same call to that offer or theme may omit expected\_revision or expected\_updated\_at and the server carries the returned value forward. Actions: - create\_offer: Create a named organization-owned draft offer, optionally from a template the authenticated user may use. - duplicate\_offer: Copy one of the organization's offers into a new draft: its pages, blocks, hosted page size, theme and every offer item with its linked prices, with the copied view re-pointed at the new item ids (changeLineItemPrice, setItem and upsell blocks). Optionally put the copy on another theme. Returns the new offer like get\_offer plus item\_ids (old item id to new). Reuse a proven checkout this way instead of re-sending its view, then change prices with update\_offer\_item and copy with update\_block. - update\_offer: MCP-only mutation: atomically update offer- and view-level fields with RFC 6902 JSON Patch. Use update\_block for one existing block. If validation fails, stop and report the MCP error; do not use a browser, editor, source code, HTML, or another mutation path. - update\_block: MCP-only mutation: atomically update exactly one block. Operations are block-relative RFC 6902 add, replace, remove, or test operations. Read get\_offer before the first write, pass the latest known revision as expected\_revision, and carry forward the revision returned by each successful mutation. If validation fails, stop and report the MCP error; never fall back to a browser, editor, source code, HTML, or another mutation path. - add\_offer\_block: Append a complete public block subtree to an organization-owned offer container without replacing the page view. Read get\_offer and get\_offer\_schema before the first write, then pass the latest known revision as expected\_revision and carry forward the revision returned by each successful mutation. - create\_template: Create a private template in the authenticated organization after validating its public block structure. - create\_theme: Create an organization-owned theme with the full Plandalf token defaults and optional typed custom variables. - update\_theme: Update the name of an organization-owned theme. Use set\_theme\_variable for every token or custom-variable value. - set\_theme\_variable: Set one typed standard theme token or custom variable on an organization-owned theme. Query get\_offer\_schema and get\_theme before the first write, then carry the updated\_at returned by each successful theme write; use {{theme.key}} in blocks rather than hard-coded colors. - add\_media: Add supplied base64 image or video data to the authenticated organization. Returns a durable URL for an image block or stack backgroundImage. Use only the intended source asset; do not upload or select a lookalike substitute.

`edit_catalog`

Create products, prices and promos, and link prices to an offer's items. Kept apart from edit\_checkout so the merchant approves money changes on their own. Pass `changes`, a list of one or more changes run in order; each change is an object with `action` plus that action's own fields. The run stops at the first change that fails: changes before it stay saved and the error lists them with their results, and nothing after it runs. After a successful change to an offer or theme, a later change in the same call to that offer or theme may omit expected\_revision or expected\_updated\_at and the server carries the returned value forward. Actions: - create\_product: Create a product in the current organization and return it in list\_products' shape (with no prices yet). Then add its prices with create\_price. Check list\_products first and reuse a product that already sells the same thing. - create\_price: Create an active list price on one of the organization's products (product ids from list\_products) and return it in list\_products' price shape. Amounts are in minor units (cents). Set custom\_unit\_amount to let the buyer enter their own amount ("Other amount"); amount is then the suggested starting value. Link the new price to an offer with attach\_offer\_item or update\_offer\_item. - attach\_offer\_item: Attach prices from list\_products to an offer as an item and return the item id, default price and linked price ids. When an existing item already sells the same product, the prices join that item (created: false) instead of adding a duplicate. The first standard item is always required. - update\_offer\_item: Change an offer item's default price, linked prices, or required flag. Item ids come from get\_offer items or attach\_offer\_item. Passing prices replaces the whole linked set; default\_price\_id must be one of the item's prices afterwards. - create\_promo: Create a promo (a deadline, flash sale, early bird, launch or coupon) with its tiers and countdown style, and publish it to the countdown worker. Returns the promo with install snippets: a countdown block, the page widget, the email countdown image URL and the checkout link params. A promo sets what buyers pay and when, so only create one the user asked for. Created as draft unless status is live. - update\_promo: Change a promo by slug (list\_promos): status, tiers, countdown style, offer or name, then republish it to the countdown worker. Only the fields sent change; tiers and style replace the whole stored value.

Something wrong or missing? Email [hello@plandalf.com](mailto:hello@plandalf.com).
