Skip to content

Replace Socket.IO designer bridge with page-automation REST API#123

Closed
marktros wants to merge 1 commit intomainfrom
tros/replace-socketio-with-page-automation
Closed

Replace Socket.IO designer bridge with page-automation REST API#123
marktros wants to merge 1 commit intomainfrom
tros/replace-socketio-with-page-automation

Conversation

@marktros
Copy link
Copy Markdown

Summary

  • Replace Socket.IO-based designer extension tools (de_*) with dynamically registered page-automation tools (pa_*) that call REST endpoints
  • Add PageAutomationClient HTTP client with 409 schema-staleness retry logic
  • Add dynamic tool registration that fetches the tool manifest from GET /v1/page-automation/tools and converts JSON Schema → Zod at startup
  • Remove 13 obsolete files (Socket.IO bridge, de_* tools, schemas, utils) and dependencies (socket.io, cors, express)
  • Graceful degradation: data API tools remain available if page-automation endpoints are unreachable

Motivation

The de_* tools required an active Webflow Designer browser session via Socket.IO RPC, which was fragile and limited to local development. The page-automation REST API works without a designer session and the tool manifest is fetched dynamically, so new tools are available as soon as they're added server-side.

Tool Parity

Page-automation currently exposes 6 tools (vs 58 actions in the old de_* tools):

Tool Family Mutates
get-all-elements elements no
get-element-children elements no
get-style-by-name styles no
get-style-properties styles no
create-style styles yes
set-style-properties styles yes

Missing capabilities (pages, element writes, assets, components, variables) will be added as page-automation expands.

Configuration

Env Var Required Default Description
WEBFLOW_TOKEN Yes OAuth token forwarded to page-automation
PAGE_AUTOMATION_API_URL No https://api.webflow.com Base URL for page-automation endpoints

Test plan

  • Build succeeds (npm run build)
  • MCP Inspector shows pa_* tools alongside data_* tools
  • pa_get_all_elements returns elements for a valid site/page
  • Full MCP chain (stdio → HTTP → page-automation → response) works end-to-end
  • Graceful degradation: server starts with only data API tools when page-automation is unreachable

🤖 Generated with Claude Code

Remove the Socket.IO-based designer extension tools (de_*) that required
an active Webflow Designer browser session. Replace with dynamically
registered page-automation tools (pa_*) that call the page-automation
REST API endpoints (GET /v1/page-automation/tools, POST
/v1/page-automation/execute).

Key changes:
- Add PageAutomationClient HTTP client with 409 schema-staleness retry
- Add dynamic tool registration that converts JSON Schema → Zod at startup
- Remove 13 files: Socket.IO bridge, de_* tools, schemas, utils
- Remove dependencies: socket.io, cors, express
- Graceful degradation: data API tools still work if page-automation is unavailable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@marktros marktros requested a review from a team as a code owner April 16, 2026 16:28
@marktros marktros requested review from zmcnellis and removed request for a team April 16, 2026 16:28
@marktros marktros marked this pull request as draft April 16, 2026 16:34
@bertenator
Copy link
Copy Markdown
Member

oh this should actually go to https://github.com/webflow/mcp-remote-cloudflare-server!

@bertenator bertenator closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants