ContentBuilder.js · ContentBox.js · Guide
Claude edits the page that is open in the editor. The user sees every change as it happens.
In this series
The user opens a page in the editor. The top bar shows that Claude is connected.
yoursite.com, in the editor
Claude
↓ MCP
Your connector
↓ a live link
The editor page
The change goes through the editor, so it behaves like a change the user made: it is on the page at once, and the editor's Undo and Redo work on it.
The page is saved through your own save code, when the user saves or asks Claude to. Nothing is written to your database behind the editor's back.
Claude can reach a page only while its owner has it open in the editor. With no editor open, the tools say so and do nothing.
There is a step-by-step guide for each editor, with all the code to copy:
Each adds live editing to a Node.js site that already has the editor and a login, in eight steps:
Claude connects to websites on the internet, not to a computer. On your live site, use its own address. To test on your computer, give the site a temporary public address with a tunnel, for example Cloudflare's free tunnel:
cloudflared tunnel --url http://localhost:3000Then add the connector in claude.ai with that address followed by /mcp (see Connecting Claude, and What to Ask), open a page in the editor through the same address, and ask Claude, for example:
Add a three-column features section below the header, then save.The connector does no logins itself. Your site tells it who is logged in, through four hooks:
attachMcp(app, httpServer, {
getUser: (req) => currentUser(req), // or null
loginUrl: (back) => '/login?next=' + encodeURIComponent(back),
session: sessionMiddleware,
store: mcpStore,
});On the editor page, connect the editor and pass your save code:
<script src="mcp/bridge.js"></script>
<script>
connectClaudeBridge(() => builder, {
url: '/mcp/bridge',
onSave: () => { /* your save code */ },
});
</script>That is all the editor page needs. The step-by-step guide has every file, with the full code.
In live editing, Claude gets a short list of tools that work on the open page. Each section (in ContentBuilder.js, each row) is changed on its own, so the rest of the page stays exactly as it was.
Undo and Redo are tools too: the user can say "undo that" in the chat, or press Undo in the editor.
The framework guides tell Claude which classes and attributes the editor understands, so the sections it writes look right and stay editable.
get_outline: One line per section of the open pageget_selection: What the user has selected in the editorget_section: The full markup of one section (ContentBuilder.js: get_row, and the same for the next three)replace_section: Replace one sectioninsert_section: Add a section at a positiondelete_section: Remove one sectionget_page_styles: The page's saved global CSS, for site-wide styling (ContentBox.js; ContentBuilder.js has get_html and load_html for the whole page instead)get_framework_docs: The editor's markup guidesundo, redo: The editor's Undo and Redosave: Runs your save code