Site2WebMCP

Turn any page’s forms and actions into WebMCP tools. Pick the demo mode that matches your agent — both use the same discover + bridge libraries.

Demo mode 1 — Codex CLI + Skill + agent-browser

Install the skill and drive agent-browser from Codex CLI. ChatGPT desktop’s built-in browser is read-only and will not work.

  1. Install agent-browser and point Codex CLI at it (not ChatGPT’s built-in browser).
  2. Call install_site2webmcp (or copy the skill below) into Codex’s skills directory.
  3. On every target site, after each reload / full navigation, inject: vendor/discover.js → vendor/page-bridge.js → agent-inject.js.
  4. List WebMCP tools and run the workflow — prefer tools over clicking.
SKILL.md

Demo mode 2 — Chrome extension + agent-browser

Same path as the public demo video — Codex CLI + agent-browser with the extension loaded.

  1. Enable chrome://flags/#enable-webmcp-testing → relaunch Chrome.
  2. Load unpacked Site2WebMCP from this repo’s extension/ folder (or Chrome Web Store).
  3. Point Codex CLI at agent-browser / Chrome with that profile (not ChatGPT’s built-in browser).
  4. Open a live site (e.g. Amazon); list WebMCP tools and run a short workflow — no script inject needed.
Checking WebMCP…

Agents on this page can call install_site2webmcp, get_inject_snippet, get_extension_install when document.modelContext is available.

Skill text (mode 1)

SKILL.md Skill folder
Loading skill…

Inject URLs (mode 1)

MAIN world, in this order (Codex CLI + agent-browser / Playwright / CDP):

https://tradunsky.github.io/site2webmcp/vendor/discover.js https://tradunsky.github.io/site2webmcp/vendor/page-bridge.js https://tradunsky.github.io/site2webmcp/agent-inject.js
async function site2webmcpInject(base = "https://tradunsky.github.io/site2webmcp") {
  const paths = ["/vendor/discover.js", "/vendor/page-bridge.js", "/agent-inject.js"];
  for (const path of paths) {
    const src = await (await fetch(base + path)).text();
    (0, eval)(src);
  }
  return window.__site2webmcp?.list?.() ?? [];
}

Extension details (mode 2)

Extension path is unchanged. Requires Codex CLI + agent-browser (or plain Chrome). ChatGPT desktop’s built-in browser is read-only and is not supported.

Docs: CONNECT_AGENT.md · MIT · GitHub