P1 Component Library
The P1 component library exposes pre-built Puck blocks as first-class citizens in the P1 MCP Server. AI agents connected via MCP can discover available blocks, inspect their schema, add them to pages, and configure their properties — all without requiring a developer to intervene on each edit.
Access the MCP Server at mcp.p1.pantheon.io/mcp (or staging.mcp.p1.pantheon.io/mcp for staging).
Prerequisites
A Pantheon account with access to at least one P1 site
The P1 MCP Server connected to your agentic client (Claude Desktop, Claude Code, or any MCP-compatible client)
The site must have the P1 component library installed (configured by a developer)
Discovering Available Blocks
Use the list_components MCP tool to retrieve all blocks installed on a site:
list_components({ site_id: "<your-site-id>" })The response includes each block's name, description, and schema — the fields an agent can read or write when placing a block on a page.
Agents should call list_components before attempting to place a block to confirm it is available on the target site and to obtain the correct field schema.
Reading Block Content on a Page
Use get_page MCP tool to retrieve the current block layout of any page:
get_page({ site_id: "<your-site-id>", page_id: "<page-id>" })The response contains a blocks array. Each entry includes the block type, a unique block ID, and the current field values. Agents can inspect this to understand the page structure before making changes.
Adding a Block to a Page
Use update_page to add a new block to a page's layout:
update_page({
site_id: "<your-site-id>",
page_id: "<page-id>",
blocks: [
...existing_blocks,
{
type: "HeroBlock",
props: {
heading: "Welcome",
subheading: "Built with P1",
ctaLabel: "Get Started",
ctaHref: "/start"
}
}
]
})
Field names and accepted values come from the block's schema returned by list_components. Omitting a required field returns a validation error — check the schema before submitting.
Editing an Existing Block
To update a specific block on a page, retrieve the current page state with get_page, modify the target block's props in the blocks array, then call update_page with the full updated array.
Agents must not drop blocks from the array when intending only to edit one — pass back all existing blocks with the modified entry included.
Troubleshooting
Block type not recognized
The block may not be installed on the site. Run list_components to confirm available types. If the expected block is missing, ask the developer to install it from the P1 component library.
Validation error on update_page
A required field in the block's props is missing or has an invalid value. Re-fetch the block schema from list_components and ensure all required fields are provided.
Changes not persisting after update_page
Confirm the agent is operating on an active workstream branch, not the main branch. The main branch may be write-protected depending on site governance settings.