# Build a Page draft with an AI agent

> Goal: the strongest private link-in-bio on yourspage.com for this one person. First learn what Page can put on a page. Then use context you already have. Then ask only for what is still missing. Then save. MCP only writes the draft. One Clerk sign-in. No role template.

## Connect once

MCP: https://yourspage.com/mcp (Streamable HTTP, OAuth). Never ask for passwords, cookies, or tokens.

If Page tools are missing, add this MCP URL. Complete the Clerk browser window. Never skip authentication. Do not tell them to open Settings. Do not add the server again. Do not start a new chat. After they click Allow, keep going in this same turn.

Cursor `~/.cursor/mcp.json`:

```
{ "mcpServers": { "page": { "url": "https://yourspage.com/mcp" } } }
```

Claude Code: `claude mcp add --transport http page https://yourspage.com/mcp`

Codex: `codex mcp add page --url https://yourspage.com/mcp` then `codex mcp login page`

## Flow (do this in order)

1. **Read the product.** `list_catalog`. Learn every block type, theme, color, font, button, motion knob. This is the form. You choose from it. You do not invent new block types.
2. **Read the person you already have.** Chat, a repo, a site they mentioned, `get_account` if they already have a draft. Do not pretend you know nothing.
3. **Decide the page.** Order of blocks, which types, which theme. Unique to them. Two people with GitHub still get different pages.
4. **Ask once for the gaps.** Only what you still need to build that page: GitHub, Instagram, X, YouTube, a site, https image URLs, a shop, dates, a code. Whatever *you* decided is missing. Wait for answers. Do not walk every platform. Do not ask for something you already have.
5. **Open what they gave.** Public profiles and URLs. Best work, not filler. Then `check_username` and `create_page` with `blocksJson` and `themeJson`.

Agents cannot upload files. For IMAGE or GALLERY, ask for https image URLs they already host. No Unsplash filler. No invented stats, merch, tweets, or handles.

Username: a handle from their profile if `check_username` says it is free, else a close variant. Never use their email as the username. If `get_account` already has that name, update it.

## MCP tools (save only)

1. `list_catalog`: the form, blocks plus every color, font, button, and motion knob
2. `get_account`: reuse a page they already have
3. Ask them (not a tool) for the missing URLs
4. `check_username`
5. `create_page` with `blocksJson` and `themeJson`
6. `update_theme` if you need a second pass on look
7. `get_page` and stop

`unfurl_url` is optional for a title. There is no scrape tool. You already browse. There is no developer/designer layout to copy.

## How blocks work (not a template)

Put the most important public thing first. One SOCIALS row for profiles you found. Highlight at most one LINK. Only include a block type when you have real content for it.

Profile URL → SOCIALS. Watch/track/Calendly → EMBED. Named project → CARD. Shop → LINK. Personal GitHub login → GITHUB plus icon.

- **SOCIALS**: Icon row of profiles the owner actually has. One per page.
- **LINK**: A button. Highlight true on the one action people should take.
- **CARD**: A titled project with one line of what it is.
- **EMBED**: In-page player or Calendly scheduler.
- **GITHUB**: Public contribution graph for a personal GitHub login.
- **SKILLS**: A row of tools they use. The name picks the logo: JS becomes JavaScript, Figma stays Figma. columns is 2, 3, or 4 per row. Omit columns to let them wrap.
- **EXPERIENCE**: A list of roles. Each one has a company, a title, dates, a place, optional tool chips, and bullets. stealth true blurs the company name and logo.
- **PRODUCT**: A file people receive by email after they leave a name and email. source is link (an https Drive/Dropbox URL) or upload (a file the owner added in the editor).
- **HEADING**: A short section label.
- **TEXT**: A short note in their words.
- **IMAGE**: One photo they already host on https.
- **GALLERY**: Up to 12 https images, grid or carousel.
- **FAQ**: Questions they actually answer.
- **STATS**: Numbers they typed. Nothing is fetched.
- **DISCOUNT**: A copyable code plus optional shop link.
- **COURSE**: A course they sell on another site. The card opens that link. Optional coupon copies. Optional ref is added as ?ref=.
- **COMMUNITY**: An invite to a WhatsApp, Discord, Telegram, or Slack community.
- **MAP**: A Google Maps place. display preview draws the pin on the page when the link contains coordinates. display link opens Google Maps in a new tab.
- **PDF**: A PDF people read on the page, with a download. Optional password is a string visitors must type. The file itself is uploaded in the editor.
- **CONTACT**: A vCard people can save.
- **EVENTS**: Dated shows or workshops.

Each block: `id`, `type`, `visible`, `data`. Max 60. SOCIALS icon size: sm | md | lg | xl.

## Design (same knobs as the website editor)

Pass `themeJson` as a JSON object. Pick a **preset** that fits this person, then override only what their work asks for. Do not invent a brand palette. If their site is dark and green, `terminal` is fair. If you only know they post photos, `aurora` or `peach` is fair. Default is `linen`.

```
{
  "preset": "ink",
  "accent": "#F2C14E",
  "font": "instrument",
  "fontSize": "md",
  "buttonShape": "pill",
  "buttonStyle": "outline",
  "avatarShape": "circle",
  "motion": {
    "enabled": true,
    "feel": "subtle"
  }
}
```

### Presets

- **linen** (Linen): Warm paper, soft cards. font figtree, buttons soft/rounded, accent #E4572E
- **ink** (Ink): Moody, quiet, elegant. font figtree, buttons outline/pill, accent #F2C14E
- **matcha** (Matcha): Calm greens, round edges. font nunito, buttons solid/pill, accent #2F5D48
- **tangerine** (Tangerine): Loud, chunky, fun. font bricolage, buttons hard/rounded, accent #1A120D
- **terminal** (Terminal): Green on black, for builders. font mono, buttons outline/square, accent #A2FFBC
- **blueprint** (Blueprint): Grid paper, drafting blue. font figtree, buttons outline/square, accent #FFD166
- **peach** (Peach): Dreamy gradient, pillowy. font fraunces, buttons soft/pill, accent #3B2230
- **newsprint** (Newsprint): Editorial, black and white. font fraunces, buttons outline/square, accent #111111
- **aurora** (Aurora): Vivid bloom, dreamy. font fraunces, buttons soft/pill, accent #AF6DFF

Pattern (grain, dots, grid, lines) comes from the preset. You cannot set pattern alone. Peach and aurora keep their gradients unless you override `background` with a solid #RRGGBB.

### Colors

#RRGGBB only (6-digit hex). Gradients cannot be a custom background; use peach or aurora preset instead.

- **accent**: buttons, highlighted links, photo initials. Swatches: #E4572E, #F2B33D, #2F6B4F, #1C4B98, #6E3F5C, #D94F8A, #111111, #0F8B8D, #8A5A44, #7C5CFF
- **background**: page canvas. Swatches: #F4EDE1, #FFFFFF, #F1EEE6, #DCE4CD, #FFE3D1, #E4ECF7, #15120F, #0B0F0C, #1C4B98, #2B2A4C
- **card**: fill behind links and cards. Swatches: #FFFCF6, #FFFFFF, #F7F3EC, #EEF2E4, #FFF4EA, #E8EEF8, #211C18, #1A2330, #0B0F0C, #111111

Omit a color to keep the preset. Text on background and cards is recomputed so it stays readable.

### Type

Fonts: figtree (Friendly, Figtree), fraunces (Bookish, Fraunces), instrument (Elegant, Instrument Serif), bricolage (Quirky, Bricolage), mono (Techy, JetBrains Mono), nunito (Rounded, Nunito).

Sizes: sm (Small), md (Default), lg (Large), xl (Extra).

### Buttons and avatar

Shape: pill (Pill), rounded (Rounded), square (Square).

Style: solid (Solid), soft (Soft), outline (Outline), hard (Chunky).

Avatar crop: circle, rounded, square. Default circle.

### Motion

Usually set `motion.feel` and leave the rest. Feels: subtle: Quiet fades. Barely there.; regular: Soft lift and a short rise. The default.; lively: More bounce and travel. Still restrained..

Entrance style: rise, fade, scale, blur. Direction: up, down, left, right. Ease: snug (Snappy), soft (Smooth), spring (Bouncy).

Toggles (all optional booleans): enabled, entrance, hover, press, cards, shine, arrow, header, blocks, footer, hoverLinks, hoverCards, hoverSocials, hoverEvents, hoverBadge.

Numbers (optional): duration 0.15-1.4, stagger 0-0.2, distance 0-40, lift 0-12, iconScale 1-1.25, pressAmount 0.9-1, cardZoom 1-1.16, hoverDuration 0.08-0.6.

`enabled: false` turns motion off. Fine-tune numbers only if their site already feels that way.

When saved, tell them the username and to open https://yourspage.com/dashboard signed in. Draft is private until they publish. Do not say it is live unless get_account says live.

This file is https://yourspage.com/build.md.
