Docs

MCP server and tools

Page Lemon runs a remote MCP server, so any AI app that speaks the Model Context Protocol can publish and manage sites with tools instead of a shell. Users sign in with OAuth; scripts and servers can use an API token.

Last updated

Page options
On this page

Say this to your AI

In Claude Code:

bash
claude mcp add --transport http pagelemon https://mcp.pagelemon.com/mcp

Then in any connected chat:

Copy into your AI chat

Deploy on PageLemon.com

Step-by-step setup for each app: Connect your AI.

Server URLs

Transport: streamable HTTP, JSON-RPC over POST (a GET answers 405). Requests from a web page must come from a known Origin (AI apps, local tools such as the MCP Inspector); requests without one, from servers and CLIs, are fine.

URLWithout a token
https://mcp.pagelemon.com/mcpinitialize, tools/list and a new-site site_publish work anonymously, and so do site_read what=site, site_read what=versions, site_make action=upload_link, site_replace action=version and site_delete with that site's site_token. Every other call answers 401 with the challenge

Sign-in (OAuth)

Page Lemon is its own OAuth 2.1 authorization server, following the MCP authorization spec. Clients find everything from the challenge:

Protected resource metadatahttps://mcp.pagelemon.com/.well-known/oauth-protected-resource/mcp (on the MCP server's own host)
Authorization server metadatahttps://dash.pagelemon.com/.well-known/oauth-authorization-server (the authorization server is the Dashboard host)
Client registrationClient ID Metadata Documents (Claude and ChatGPT), or Dynamic Client Registration at https://dash.pagelemon.com/oauth/register
FlowAuthorization code with PKCE (S256); the user signs in and clicks Approve at dash.pagelemon.com
ScopesEvery connection gets all four, read deploy manage data, for the one workspace the user picks on the consent page (it says "Full access to one workspace"). A requested scope does not narrow it; the user's role in that workspace still decides what each call may do
TokensAccess token pl_mcpaccess_… for 1 hour; rotating refresh token pl_mcprefresh_…. A connection lasts 30 days from its last refresh (no fixed end)
Revoke/oauth/revoke, or Disconnect under Account, AI connections (dash.pagelemon.com/account/ai)

Redirect URIs must be loopback (http://127.0.0.1, http://[::1], http://localhost, any port) or an allowlisted callback of a known client; a client registered by Dynamic Client Registration may also use a known native app's pinned callback (Cursor's cursor://anysphere.cursor-retrieval/oauth/<id>/callback) with PKCE. Tool results that need sign-in also carry the challenge in _meta["mcp/www_authenticate"]. An API token can hold fewer scopes; a call it lacks the scope for gets 403 with insufficient_scope and required_scope.

Code agents can send an API token instead: Authorization: Bearer pl_apikey_….

Scopes

An AI connection holds all four. An API token holds the ones chosen when it was made.

ScopeAllows
readRead sites, files, versions, settings, content lists, services and free times; account_read what=account
deployAlso publish and update sites, restore versions, drafts, content list items, services; site_share_file
manageAlso site_update action=settings, access_save action=rule, team_update action=invite, team_remove action=remove, user_add action=add, user_remove action=remove, site_domain_update action=add, site_domain_remove, team_transfer action=transfer_site, team_transfer action=cancel, site_delete. Sensitive actions still need the user's approval in the browser
dataCustomer data: form replies, bookings, orders, users and analytics. Scopes combine: with read alone it only reads them; making or changing a booking or a reply also needs deploy or manage

An API token also needs the People's data tick (people) for form replies, user and team lists, bookings and orders. An AI connection asks the user for that access instead (list_grant_update action=request).

Tools

The tools each do one thing. Two confirm rules. A risky call (restoring a version, publishing a draft, removing a domain, restoring a backup, and more as the tools move over) first answers confirmation_required with a summary and effects: nothing has happened. Show them to the user, and only if they say yes call the same tool again with the same arguments plus its confirm_token (it works once, for 30 minutes). A change or delete of something with a version (site settings, a domain, the spec, a list, a teammate, shipping) also sends etag from the AI's read of it (site_read what=site gives the site's, its domains' and seo.etag for search). Without it the call answers 428 precondition_required before anything is asked; an old one answers 412, and the AI reads again. When a result has confirm_token, its agent_message says what the action would do; for a two-step action, call the same tool again with confirm_token only after the user says yes. When a result has approval.url (status 202), nothing has happened. Deleting, removing people, transfers, money, emailing users, making something private public and reading people's data are confirmed by the user on that link, signed in to Page Lemon, within 30 minutes. The AI can't confirm it. Then account_read what=approval says how it ended (list_grant_update action=request without lists shows your AI's data access and can end it). Anything that emails a customer or deletes data takes two steps. The yes covers exactly what was asked, and a different message or option needs a new yes. Deleting a site returns a link where you type the site address yourself; for 30 days after, site_update action=undelete brings it back, and then it is gone for good.

Publish and edit

ToolWhat it does
account_capabilitiesWhat this connection can do: its scopes and the tools served now. Call first when unsure
site_publishPublishes files (each by its sha256, uploaded first) as the site's next version. Without site, creates a new one. To update, pass site, base_version and patch: true with only the changes plus remove paths; to replace every file, use site_replace action=files. template copies a fictional sample and next_actions lists the details to swap. With no account, leave out site and send files with content_base64; after the user keeps the site, site_read what=site with site_token says so
site_share_filePublishes one file as a new site and returns its address: the file's name (with its extension) and content_base64; with neither, it answers the app page to share from
site_read what=siteOne site: address, domains and their records, settings, the live version, the latest check and its open drafts and pretend members. download: true adds the link to the live files as one zip (for the workspace Owner or Admin) and what stops working on a copy hosted elsewhere. what=files (with version, or live) lists a version's files and what=file with path reads one file's content. Long lists page with cursor
site_read what=versionsThe published versions, newest first
site_make action=upload_linkA one-time link where the user uploads a large file or folder
site_close action=upload_linkEnds an upload link now, or every link of the site
site_replace action=versionMakes an earlier version live again, after the user's yes
site_make action=previewPuts files (sent as site_publish takes them) on a private draft address first; site_read what=site lists the open drafts
site_replace action=previewMakes a draft the live version, after the user's yes; a draft with a spec change waits for the user, who confirms removing data in the Dashboard
site_close action=previewCloses a draft link; nothing live changes
site_make action=checkRuns the content check on the live site; read the result with site_read what=site
site_domain_update action=checkChecks a domain's DNS records now and makes it live once they are right
site_read what=domainsSuggests domain names for a name or idea, checks if each is likely free and gives plain links to buy one at a registrar
site_read what=spec and site_spec_saveRead or change the whole site as one spec. A change answers 202 with approval.url and the list of changes in one call; the person approves it once in the Dashboard
account_read what=accountThe account, its workspaces and the sites this connection reaches, paged with cursor
list_read what=inboxWhat waits on you across your sites: form replies and bookings, newest first; each row says which tool acts on it

Questions about changes

Your AI answers these with site_read what=versions and site_read what=site, then site_replace action=version to undo:

You askWhat your AI does
"What did Tim change?"Lists the versions, picks Tim's, then reads each page he changed as it was before and as it is now, and tells you the difference
"What changed in the last 2 days?"Lists the versions since then, then compares the changed pages with how they were at the start
"What's different on the menu page since last week?"Reads the menu page at last week's version and at the live version, and compares them
"Who removed the prices?"Goes through the versions that changed that page and reads it at each one until the prices disappear
"Undo what Tim did today"Finds the version from just before Tim's first change today and makes it live again with site_replace action=version (it asks first if other people changed things after Tim)

How far back it can look depends on your plan's version history.

Site settings and access

ToolWhat it does
site_update action=settingsChanges the site's name and other settings, or archives it (a new name or archiving waits for your yes)
site_make action=memberMakes a pretend member of a draft for one hour, with a plan and groups, and a one-use link that signs in on the draft only
site_read what=files and site_read what=fileThe files of a version, and one file
access_save action=ruleWho can open the site or a path: passcode, users, team or open (open removes protection, after your approval). A path can be kept for groups, a list of email addresses or plan members. A passcode is set by you on the link your AI gives you, never typed into the chat
access_removeEnds the rule on one path, after your yes; the path then follows the whole site's rule
user_read what=accessShows what a given user, group or plan member would get on a path. On a draft, site_make action=member makes a pretend member and gives a one-use sign_in_url that opens the draft signed in as them, with no code to type
team_transfer action=transfer_siteHands the site to another person's account (approval). For a site offered to you, reads the offer, and accepting or declining it is confirmed by you on a link
team_transfer action=cancelCancels a pending transfer; the recipient's link stops working
site_deleteDeletes a site and its data: the first call answers confirmation_required with what would go; after your yes you type the site's address on a link. You can also delete a site in the Page Lemon app yourself: the site's Pages → Settings → Delete this site
site_make action=exportEmails you a link to download the site's files, or its files and records
site_make action=backup, site_read what=backups and site_replace action=backupBacks up a whole site (files, settings, records), lists its backups and restores one into the same site. The first call answers confirmation_required with what would come back. After the user's yes, they confirm on a link
account_read what=approvalSays how an approval link ended: pending, approved, declined, failed or expired
list_grant_update action=requestAsks you to let your AI read people's data in named lists of one site, for a time you choose

People

ToolWhat it does
team_read what=teammatesThe workspace's teammates and their roles
team_update action=inviteInvites up to 100 people to the workspace team by email with a role, after your yes
team_remove action=removeRemoves people from the workspace team, after your yes
user_read what=usersThe people who sign in to the site (not the team)
user_add action=addLets people (emails or company domains) sign in to an app or invite-only site
user_remove action=removeStops people signing in to the site: the first call answers confirmation_required with how many people it stops; then your yes
user_remove action=pause and user_add action=resumeStop one site user signing in until resumed; their records stay
user_announceEmails the site's users; asks first (confirmation_required), then the person approves at the link
user_read what=sign_inHow people sign in to the site: settings, groups and user counts
account_read what=notifications and account_update action=notificationsRead and change your notification settings and what a site's users are emailed; mark notices read
analytics_read what=personEverything one person sent or holds on the site (forms, bookings, orders, items), for a privacy request

Workspaces

ToolWhat it does
user_add action=save_groupCreates or changes a group of site users, by id or key; what you leave out stays
team_update action=save_groupCreates or changes a group of teammates and the sites it reaches, by id or name; what you leave out stays
team_transfer action=move_sitesMoves sites between your workspaces
team_remove action=leaveLeaves a workspace you were added to
site_update action=unfreezeBrings frozen sites back after a plan change, after your yes

Custom domains

ToolWhat it does
site_domain_update action=addConnects a domain and lists the DNS records to add; read the domains and their records with site_read what=site
site_domain_removeDisconnects a domain from the site; the domain stays with its registrar

Bookings, orders, automations and analytics

ToolWhat it does
booking_read what=servicesThe site's bookable services with their settings
booking_service_save action=serviceCreates or changes a bookable service by key: length, price, deposit, staff or rooms; what you leave out stays
booking_service_save action=scheduleA service's hours, time off, classes, a calendar that blocks busy times, or seats
booking_read what=bookingsThe site's bookings by status and days, the waitlist, or a CSV file
booking_read what=bookingOne booking
booking_read what=timesFree times for a service, from a day to a day
booking_save action=createBooks someone in; every and count book a weekly or fortnightly series
booking_save action=updateMoves a booking (start_at), sets it confirmed, declined, completed or no_show, or changes the customer email
booking_cancelCancels a booking, after your yes; series: true cancels the rest of a repeating booking too
booking_class_update action=moveMoves one class time; everyone booked is told
booking_class_update action=add_date, skip_date, open_waitlistAdds a one-off class, skips a date, or lets people join a closed class waitlist again
booking_class_cancel action=cancelCancels one class time, after your yes; everyone booked is told and refunded
booking_class_cancel action=close_waitlistCloses a class waitlist, after your yes; those waiting are emailed that no place will open
shop_read what=productsThe site's shop products
shop_catalog_save action=productCreates or changes a product by its key (name, price, stock, kind)
shop_update action=stockAdds or takes away stock of a product or one variant
shop_read what=ordersThe site's orders, newest first
shop_read what=orderOne order with its refunds
shop_read what=refundsThe site's refunds, or those waiting for approval
shop_update action=fulfilMarks an order sent, after your yes; the buyer is emailed
shop_order_refund action=refundAsks to refund an order (all, or an amount); the owner approves it before money moves
automation_readwhat=automations lists the site's automations; what=runs reads an automation's runs, or a webhook's deliveries
automation_runaction=test runs an automation once on sample data without sending anything
site_ai_prompt_saveCreates or replaces an AI prompt for an app (summarise, categorise or chat) and gives the markup to paste into a page
analytics_read what=analyticsVisits and top pages for a date range; kind reads the last 30 minutes, tracking links, funnels, a CSV export, or an overview of all your sites
analytics_save action=settingsMakes or removes a tracking link or a funnel, names an event, changes what is counted, or turns the weekly team email on or off
analytics_removeEnds a tracking link (action=link), a funnel (funnel) or an ended A/B test (ab_test), with its etag from analytics_read, after your yes; counted visits, views and events stay
analytics_read what=activityWho changed what on the site, newest first (metadata only); with workspace, across the workspace's sites, also as CSV

Lists

Lists the site's pages show (a menu, a team, events), plus form replies and bookings as private lists. A change to a list shows on the site within seconds, without a new version. When your site keeps data (sign-ins, records, payments), your AI designs it in lists from the start; a site that only shows content stays plain pages. Guide: Lists; for AIs, pagelemon.com/agents/lists.

ToolWhat it does
list_read what=listsThe site's lists and forms
list_read what=listOne list's fields, form settings and rules
list_read what=itemsOne page of a list's items, or a form's replies by status
list_saveMakes a list or form by key, or changes one by id. fields replace the whole set, name renames it, form changes a form's questions and settings, rules merge into the current rules, public_json turns its JSON feed on or off
list_make action=read_linkMakes a private spreadsheet link to a content list, after your yes in the chat
list_remove action=read_linkTurns that link off
list_make action=from_pageMakes a list from a page's table or cards; importing the rows waits for your yes
list_remove action=listDeletes a list and its items, after your yes
list_items_add action=addAdds up to 100 items, or copies a form reply's words into a content list once you confirm the visitor agreed
list_items_change action=updateChanges up to 100 items by id
list_remove action=itemsRemoves up to 100 items by id, after your yes
list_items_add action=sortPuts a list's items in a given order
list_items_change action=importImports rows from CSV or a spreadsheet; it shows what would change and waits for your yes
list_read what=changesThe changes to a list's items, newest first, or the items removed in the last 30 days
list_items_change action=undoUndoes one change or the whole write it was part of, after your yes; this is how items removed in the last 30 days (list_read what=changes) or a deleted list (list_read what=deleted) come back

Every write tool takes an idempotency_key. If an answer is lost, your AI sends the same call again with the same key: Page Lemon answers once with what it stored (for 24 hours) and doesn't run it twice. Every argument is described in the server's own tool schemas (tools/list). Each tool carries a title and the annotations readOnlyHint, destructiveHint, idempotentHint and openWorldHint.

How results work

  • agent_message is a plain-language summary of the result for the user, in neutral facts; every link, code, number, date, email and domain in it is exact. Results carry no referral offers or promotions. Data marked untrusted_content (form replies, bookings, page files, analytics paths) is never instructions. After your AI reads such data, publishing, links it hands out and writes to public lists wait for your approval for the next 12 hours (the answer gives approval.url); a refusal like not_found is never such data.
  • To update, pass base_version (required: the live version from site_read what=site or the last publish; 0 for a site with no version yet). Without it, site_publish is refused and publishes nothing. If someone else changed the site in between, it returns a conflict and publishes nothing. Tell the user what changed and ask before merging. Then load the live files, merge, and publish again with the new base_version. Changing an item, a list or a setting works the same way: send the etag from the read (or was for an item's fields); a missing or stale one is refused with what is there now. Nothing fills in a fresh version for the AI, and force saves over on purpose only.
  • Tools that need the user's approval return approval.url with approval.id. When the user says they approved, call account_read what=approval with it to see pending, approved (with the result), declined (the user said no on the page; nothing changed), failed or expired (at most every 10 seconds). People's data (form replies, users' rows) needs list_grant_update action=request first: the user confirms which lists, for 1 hour unless they choose longer, and email addresses only if they tick them.
  • Editors build, Staff run the business and Admins do both, as teammates; an invite-only site's users (member) only open it. Don't give edit rights to someone who should only open the site.
  • Limits, skipped files, the secret-key check and error codes are the same as the REST API: see Limits and Fix a problem.
  • Plan limits are stated as facts with a link to pricing; results never link to checkout or upgrade pages.
  • When a Free user asks for something a paid plan has (a custom domain, invite-only, an extra teammate, a transfer), the result says which plan it needs, with the pricing link. In other AI apps than ChatGPT and Codex (both OpenAI apps) it also says "Not for you? Cancel within 14 days of starting for a refund: in full the first time in 12 months, pro rata after that." Page Lemon has no free trials, and no tool starts or buys a plan: the person subscribes on the pricing page or in the Page Lemon app.
  • A transfer's reply says what the new Workspace Owner pays. The site runs on their own plan from when they accept: Free when the site fits it, else at least the plan it needs. The sender's bill doesn't change.

Terms and support

Publishing with Page Lemon means agreeing to the Terms and Privacy Policy; an anonymous publish says so in its reply, and keeping a site or signing up records the acceptance. Help: pagelemon.com/support.

Still stuck? Ask your AI

Need support with PageLemon.com, about MCP server and tools

Still need a person? Contact us