MCP & API

MCP & API

Let Claude Code, Cursor or any MCP client clone, edit, publish and roll back your pages. Agents send the same operations as the visual editor, so every change is validated and shows up live.

Endpoint
http://localhost:8787/mcp
Authentication
Bearer token. The key is the MCP_API_KEY set on the API server.
Transport
Streamable HTTP · 24 tools
Connect your client
Keep the key in the MAGICWEBS_API_KEY environment variable so it never lands in a prompt or in your repo.

Run in your project

claude mcp add --transport http magicwebs http://localhost:8787/mcp --header "Authorization: Bearer $MAGICWEBS_API_KEY"

Or commit it to .mcp.json

{
  "mcpServers": {
    "magicwebs": {
      "type": "http",
      "url": "http://localhost:8787/mcp",
      "headers": {
        "Authorization": "Bearer ${MAGICWEBS_API_KEY}"
      }
    }
  }
}
Tools 24
Edit tools take a projectId. Ask your agent to call get_page_outline first so it knows the section ids.
  • list_projectsList projects with their ids, status and live hostname.
  • clone_landing_pageClone a public URL into a new editable project. Runs in the background.
  • get_page_outlineThe page's sections with their ids and types.
  • get_sectionThe full JSON of one section, including props and style.
  • get_theme_and_metaGlobal theme (colors, fonts, radius, width) and SEO metadata.
  • search_page_cssSearch the stylesheet of an exact clone.
  • apply_operationsApply several edit operations atomically.
  • publish_pagePublish the current draft so it goes live.
  • list_versionsPublished versions, newest first.
  • rollback_to_versionMake an earlier version live again and load it into the draft.