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
On this page
Say this to your AI
In Claude Code:
claude mcp add --transport http pagelemon https://mcp.pagelemon.com/mcpThen in any connected chat:
Copy into your AI chat
Deploy on PageLemon.comStep-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.
| URL | Without a token |
|---|---|
https://mcp.pagelemon.com/mcp | initialize, 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 metadata | https://mcp.pagelemon.com/.well-known/oauth-protected-resource/mcp (on the MCP server's own host) |
| Authorization server metadata | https://dash.pagelemon.com/.well-known/oauth-authorization-server (the authorization server is the Dashboard host) |
| Client registration | Client ID Metadata Documents (Claude and ChatGPT), or Dynamic Client Registration at https://dash.pagelemon.com/oauth/register |
| Flow | Authorization code with PKCE (S256); the user signs in and clicks Approve at dash.pagelemon.com |
| Scopes | Every 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 |
| Tokens | Access 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.
| Scope | Allows |
|---|---|
read | Read sites, files, versions, settings, content lists, services and free times; account_read what=account |
deploy | Also publish and update sites, restore versions, drafts, content list items, services; site_share_file |
manage | Also 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 |
data | Customer 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
| Tool | What it does |
|---|---|
account_capabilities | What this connection can do: its scopes and the tools served now. Call first when unsure |
site_publish | Publishes 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_file | Publishes 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=site | One 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=versions | The published versions, newest first |
site_make action=upload_link | A one-time link where the user uploads a large file or folder |
site_close action=upload_link | Ends an upload link now, or every link of the site |
site_replace action=version | Makes an earlier version live again, after the user's yes |
site_make action=preview | Puts files (sent as site_publish takes them) on a private draft address first; site_read what=site lists the open drafts |
site_replace action=preview | Makes 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=preview | Closes a draft link; nothing live changes |
site_make action=check | Runs the content check on the live site; read the result with site_read what=site |
site_domain_update action=check | Checks a domain's DNS records now and makes it live once they are right |
site_read what=domains | Suggests 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_save | Read 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=account | The account, its workspaces and the sites this connection reaches, paged with cursor |
list_read what=inbox | What 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 ask | What 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
| Tool | What it does |
|---|---|
site_update action=settings | Changes the site's name and other settings, or archives it (a new name or archiving waits for your yes) |
site_make action=member | Makes 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=file | The files of a version, and one file |
access_save action=rule | Who 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_remove | Ends the rule on one path, after your yes; the path then follows the whole site's rule |
user_read what=access | Shows 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_site | Hands 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=cancel | Cancels a pending transfer; the recipient's link stops working |
site_delete | Deletes 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=export | Emails 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=backup | Backs 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=approval | Says how an approval link ended: pending, approved, declined, failed or expired |
list_grant_update action=request | Asks you to let your AI read people's data in named lists of one site, for a time you choose |
People
| Tool | What it does |
|---|---|
team_read what=teammates | The workspace's teammates and their roles |
team_update action=invite | Invites up to 100 people to the workspace team by email with a role, after your yes |
team_remove action=remove | Removes people from the workspace team, after your yes |
user_read what=users | The people who sign in to the site (not the team) |
user_add action=add | Lets people (emails or company domains) sign in to an app or invite-only site |
user_remove action=remove | Stops 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=resume | Stop one site user signing in until resumed; their records stay |
user_announce | Emails the site's users; asks first (confirmation_required), then the person approves at the link |
user_read what=sign_in | How people sign in to the site: settings, groups and user counts |
account_read what=notifications and account_update action=notifications | Read and change your notification settings and what a site's users are emailed; mark notices read |
analytics_read what=person | Everything one person sent or holds on the site (forms, bookings, orders, items), for a privacy request |
Workspaces
| Tool | What it does |
|---|---|
user_add action=save_group | Creates or changes a group of site users, by id or key; what you leave out stays |
team_update action=save_group | Creates or changes a group of teammates and the sites it reaches, by id or name; what you leave out stays |
team_transfer action=move_sites | Moves sites between your workspaces |
team_remove action=leave | Leaves a workspace you were added to |
site_update action=unfreeze | Brings frozen sites back after a plan change, after your yes |
Custom domains
| Tool | What it does |
|---|---|
site_domain_update action=add | Connects a domain and lists the DNS records to add; read the domains and their records with site_read what=site |
site_domain_remove | Disconnects a domain from the site; the domain stays with its registrar |
Bookings, orders, automations and analytics
| Tool | What it does |
|---|---|
booking_read what=services | The site's bookable services with their settings |
booking_service_save action=service | Creates or changes a bookable service by key: length, price, deposit, staff or rooms; what you leave out stays |
booking_service_save action=schedule | A service's hours, time off, classes, a calendar that blocks busy times, or seats |
booking_read what=bookings | The site's bookings by status and days, the waitlist, or a CSV file |
booking_read what=booking | One booking |
booking_read what=times | Free times for a service, from a day to a day |
booking_save action=create | Books someone in; every and count book a weekly or fortnightly series |
booking_save action=update | Moves a booking (start_at), sets it confirmed, declined, completed or no_show, or changes the customer email |
booking_cancel | Cancels a booking, after your yes; series: true cancels the rest of a repeating booking too |
booking_class_update action=move | Moves one class time; everyone booked is told |
booking_class_update action=add_date, skip_date, open_waitlist | Adds a one-off class, skips a date, or lets people join a closed class waitlist again |
booking_class_cancel action=cancel | Cancels one class time, after your yes; everyone booked is told and refunded |
booking_class_cancel action=close_waitlist | Closes a class waitlist, after your yes; those waiting are emailed that no place will open |
shop_read what=products | The site's shop products |
shop_catalog_save action=product | Creates or changes a product by its key (name, price, stock, kind) |
shop_update action=stock | Adds or takes away stock of a product or one variant |
shop_read what=orders | The site's orders, newest first |
shop_read what=order | One order with its refunds |
shop_read what=refunds | The site's refunds, or those waiting for approval |
shop_update action=fulfil | Marks an order sent, after your yes; the buyer is emailed |
shop_order_refund action=refund | Asks to refund an order (all, or an amount); the owner approves it before money moves |
automation_read | what=automations lists the site's automations; what=runs reads an automation's runs, or a webhook's deliveries |
automation_run | action=test runs an automation once on sample data without sending anything |
site_ai_prompt_save | Creates or replaces an AI prompt for an app (summarise, categorise or chat) and gives the markup to paste into a page |
analytics_read what=analytics | Visits 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=settings | Makes 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_remove | Ends 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=activity | Who 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.
| Tool | What it does |
|---|---|
list_read what=lists | The site's lists and forms |
list_read what=list | One list's fields, form settings and rules |
list_read what=items | One page of a list's items, or a form's replies by status |
list_save | Makes 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_link | Makes a private spreadsheet link to a content list, after your yes in the chat |
list_remove action=read_link | Turns that link off |
list_make action=from_page | Makes a list from a page's table or cards; importing the rows waits for your yes |
list_remove action=list | Deletes a list and its items, after your yes |
list_items_add action=add | Adds 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=update | Changes up to 100 items by id |
list_remove action=items | Removes up to 100 items by id, after your yes |
list_items_add action=sort | Puts a list's items in a given order |
list_items_change action=import | Imports rows from CSV or a spreadsheet; it shows what would change and waits for your yes |
list_read what=changes | The changes to a list's items, newest first, or the items removed in the last 30 days |
list_items_change action=undo | Undoes 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_messageis 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 markeduntrusted_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 givesapproval.url); a refusal likenot_foundis never such data.- To update, pass
base_version(required: the live version fromsite_readwhat=siteor the last publish;0for a site with no version yet). Without it,site_publishis 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 newbase_version. Changing an item, a list or a setting works the same way: send theetagfrom the read (orwasfor 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, andforcesaves over on purpose only. - Tools that need the user's approval return
approval.urlwithapproval.id. When the user says they approved, callaccount_readwhat=approvalwith it to seepending,approved(with the result),declined(the user said no on the page; nothing changed),failedorexpired(at most every 10 seconds). People's data (form replies, users' rows) needslist_grant_updateaction=requestfirst: 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.