PlandalfDocsSign inStart free trial

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:

    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:

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

ToolWhat it does
list_organizationsList 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_organizationPin 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_checkoutsList 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_detailsEverything 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_guideGet 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_schemaGet 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_templatesList templates available to the authenticated organization, including global templates.
get_templateGet the complete authoring data for a global or current-organization template.
validate_templateValidate 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_offerMCP-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_themesList global and current-organization themes with every standard token and custom variable.
get_themeGet every standard token and custom variable for one accessible Plandalf theme.
list_mediaMCP-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_mediaGet an accessible ready media item and its durable URL.
crop_imageCrop 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_screenshotRequest 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_screenshotMCP-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_productsList 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_promosList 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_checkoutMCP-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_catalogCreate 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.