Skip to main content

AI Agents

The Micropage markup is small, structured, and predictable — which makes it an excellent substrate for AI-authored landing pages, both inside the editor and from your own automation.

Start here​

After the agent edits the file, you publish it: Publish in the app, micropage publish on Pro, or by asking an agent connected through the MCP server to publish, which your MCP client asks you to approve. Agents write markup; publishing stays a deliberate action.

Why the markup is agent-friendly​

  • Fixed element vocabulary. Headings, paragraphs, images, buttons, columns, sections, form fields — a closed set, no surprises.
  • Line-oriented syntax. Every line is one element. No nested HTML soup.
  • Constrained design tokens. Colors and typography are configured in [site], not freely styled inline.
  • No free-form HTML by default. Agents can't accidentally inject scripts, weird ARIA, or broken components. Free-form HTML is opt-in via /// html fences.

The grammar is small enough that Claude, GPT, and other LLMs produce correct markup on the first try, and small enough that they can edit an existing page without breaking it.

In-editor: the AI tab​

Open any project and switch to the AI tab.

Example prompt:

Build a landing page for a Postgres backup-as-a-service tool. Pricing tiers, FAQ, big CTA.

The editor generates Micropage markup, previews it, and lets you apply it to your project or discard it.

Outside Micropage: pointing your own agent at a project​

Every Micropage project ships a PROJECT_AGENT.md file. It carries the design tokens, the tone of the site, and the standing instruction to not invent elements. Point Claude, Cursor, Aider, or any other coding agent at the project directory; they'll find it automatically.

Example Claude prompt:

Here's my landing page (.page file attached). Add an FAQ section with these four questions: [...]. Keep the existing style.

The agent edits the file. Then publish it — Publish in the app, or micropage publish on Pro. To let the agent save and publish without the file round-trip, connect it through the MCP server.

MCP server​

On Pro and Pro+, the Micropage MCP server, @micropage-sh/mcp, gives Claude Code, Claude Desktop, Cursor, VS Code, and other MCP clients direct access to your projects. The agent can read a project's source, write markup, upload images, save drafts, publish, and write posts, with the .page grammar built in.

micropage login
claude mcp add micropage -- npx -y @micropage-sh/mcp

To use claude.ai or Claude mobile, or to skip the install, connect to the hosted server instead and sign in with your Micropage account.

Saving never publishes. Publishing a build, publishing or removing a post, and deleting a project are separate tool calls that your MCP client asks you to approve; emailing subscribers, deleting projects, and reading form submissions are off unless you turn them on (in the server's environment locally, or per connected app on the hosted server).

See MCP Server for setup, the tool list, and the safety model.

CI-driven AI updates​

You can set up a workflow where an agent reads a source-of-truth (a Notion doc, Google Sheet, database) and re-emits your .page file on changes, then pushes via a project-scoped deploy token.

Pattern:

  1. Cron trigger in GitHub Actions
  2. Agent reads source, generates updated .page markup
  3. micropage projects deploy "$PROJECT_UUID" "$DEPLOY_TOKEN" pushes the new build — see Deploy tokens (Pro+)

Result: your site stays in sync with its source-of-truth without anyone opening the editor.

An agent running in CI can also do steps 2 and 3 through the MCP server with a deploy token instead of a login; see MCP deploy tokens.

Markup constraints to teach your agent​

When prompting an agent that hasn't seen Micropage before, include:

  • The closed element vocabulary (headings h1–h5, p:, img:, btn:/button:, columns via col:, sections via /// section).
  • Allowed section modifiers (bg:muted, align:center, etc.).
  • The site-level color/typography tokens in [site].
  • Image syntax: img: width:600 height:400 <- hero.png.
  • The constraint that free-form HTML must live inside /// html fences.

Tell it what not to do, too: do not invent tags, do not set colors inline, do not emit React, do not emit Tailwind class soup. The vocabulary is closed on purpose.

A short PROJECT_AGENT.md covering the above is usually enough for a strong agent to produce correct markup first try. Or point the agent at llms.txt, which already says all of it. Agents connected through the MCP server get the same grammar from the server itself.

See also​