WebMCP — Make Any Website Agent-Ready

io.github.up2itnow0822由 GitHub 帳號 up2itnow0822 發布v0.5.0更新於 Oct 27, 2026

W3C WebMCP toolkit for Chrome 146. Expose any website as a structured MCP server for AI agents.

發布方自己的服務:Make

概覽

AI 產生的概覽

面向瀏覽器代理的 TypeScript SDK,透過實驗性 W3C WebMCP 介面把網站工具開放給 AI 代理,並附授權、限額與錢包示範。

可以做什麼
  • 透過實驗性的 document.modelContext 介面在網頁中註冊與呼叫工具,也可選擇啟用舊版 navigator 轉接器。
  • 為工具加上確認對話框、速率限制與稽核鉤子,並依受限的 JSON schema 驗證輸入。
  • 在 React 應用程式中界定工作階段策略,並透過明確的可信處理常式對應表註冊帶註解的 HTML 表單。
  • 由 Express 中介軟體提供探索中介資料,並執行本機交易工作室,由代理提出錢包操作、由人工核准。
適用情境
適合正在開發網站或 React 應用程式、希望藉由 WebMCP 向 AI 代理開放自身工具的情境,也適合研究「代理提案、人工核准」的錢包交易參考實作。
執行需求
需從程式碼倉庫在本機執行,要求 Node 22.22.2+ 或 24.15+ 及 npm;目前尚未發布套件,必須自行建置。原生 WebMCP 仍屬實驗性,取決於瀏覽器與來源。即時錢包示範需要注入式 EIP-1193 錢包,並執行於 Base 鏈 8453。
安裝前請注意
README 說明安全修補僅存在於未發布的 0.6.0 候選版本,已發布的登錄版本不含這些修補。即時錢包模式可提交真實轉帳與兌換;單筆提案限額不限制累計支出,已提交的交易雜湊在核實前一直處於待處理狀態。x402 支付已暫停,不得用於正式環境。通用 kit 回呼與日誌可能包含輸入內容,並非去識別化的稽核儲存。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 WebMCP — Make Any Website Agent-Ready,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

webmcp-sdk

TypeScript tools for browser agents, with explicit authorization, bounded execution, React lifecycle support and a non-custodial transaction reference app.

0.6.0 is a breaking security release candidate. Existing registry releases do not contain these repairs. Read the migration guide. The candidate is unpublished; this project provides neither custody nor a guarantee against attacks.

Try the transaction studio

From a repository checkout, with Node 22.22.2+ (22 LTS) or 24.15+ (24 LTS) and npm:

sh
npm ci --ignore-scriptsnpm run buildnpm run studio:dev

Open Vite's localhost URL. Practice mode uses invented balances, prices and receipts; it never signs or broadcasts. Live wallet mode uses an injected EIP-1193 wallet on Base chain 8453. The candidate supports ETH, native Base USDC and WETH transfers, and USDC/WETH exact-input swaps through the configured Uniswap V3 router and fee tier 500. Agents read state and propose actions; humans separately review each exact approval or transaction and authorize it in their external wallet.

Proposals bind account, chain, saved policy version, exact amount, minimum output and a 120-second expiry. Slippage is capped at 1%. Per-proposal limits do not cap aggregate spending. No key/seed input, arbitrary agent calldata, unlimited approval or agent signing tool is provided. Saved policy survives mode changes; memory-only activity clears on reload or mode change.

A submitted hash is pending. Matching transaction fields, receipt and token events must be checked before confirmation. Ambiguous submissions and RPC failures remain pending. Mined inclusion is not irreversible finality; inspect pending wallet activity before retrying. See the threat model and release runbook.

SDK quickstart

Install the reviewed package after publication, or build this branch locally. Public subpaths provide CommonJS, ES modules and TypeScript declarations.

ts
import { createKit, defineTool } from "webmcp-sdk";
const kit = createKit({ prefix: "demo" });kit.register(  defineTool(    "hello",    "Return a greeting for the supplied name.",    {      type: "object",      properties: { name: { type: "string", maxLength: 100 } },      required: ["name"],      additionalProperties: false,    },    ({ name }) => ({ message: `Hello, ${name}!` }),  ),);console.log(await kit.invoke("demo.hello", { name: "Bill" }));// { message: 'Hello, Bill!' }await kit.ready();// Later: kit.unregisterAll();

Direct invocation works without a native browser API. The default adapter uses document.modelContext, execute, asynchronous registration and registration AbortSignals. Await ready() to observe registration errors. Native WebMCP is experimental and browser/origin dependent. Use the canonical browser example to distinguish local execution from native readiness. A legacy navigator adapter requires explicit browserAdapter: 'legacy' and separate compatibility testing. Annotations are advisory metadata, not authorization.

Execution and authorization

Inputs are finite own-data JSON snapshots, recursively frozen before asynchronous hooks. Dangerous keys, cycles, arbitrary prototypes, accessors and invalid schemas reject. Validation works without unsafe-eval; supported schema restrictions are intentional compatibility limits.

Defaults: 10 concurrent executions, 100 queued/admitted waits, 30-second deadlines, 65,536 input bytes, 1,000 nodes and depth 10. Handlers receive an optional second { signal } argument. Propagate cancellation and check current authority at the operation boundary. A deadline cannot preempt synchronous JavaScript or force an uncooperative promise to stop; unresolved work retains its capacity/lease until it settles.

ts
import { withConfirmation, withSecurity } from "webmcp-sdk/security";
// reviewedTool, showReviewDialog and writeAuditEvent are application-owned.const secured = withSecurity(  withConfirmation(    reviewedTool,    "Approve these reviewed terms?",    showReviewDialog,  ),  {    rateLimit: { maxInvocations: 10, windowMs: 60_000 },    audit: true,    onAudit: writeAuditEvent,  },);kit.register(secured);

withConfirmation requires its explicit provider to return literal true. kit.requestUserInteraction independently requires kit configuration confirmationProvider. Financial review must bind immutable terms; a generic boolean dialog is insufficient by itself. audit: true needs a reliable synchronous sink. Security audit omits input by default and never logs raw handler results/errors; explicitly allowed fields receive credential-key redaction. General kit callbacks/logs can contain input and are not a redacted audit store. blockedPatterns are bounded literal substrings, not a comprehensive prompt-injection filter.

React and declarative forms

Use WebMCPProvider from webmcp-sdk/react to scope session policy. Tool hooks publish committed handlers/metadata, revoke old registrations when callback authority changes, and remove only their owned registrations. Config-owned providers reject changed configuration; remount to replace policy. Supplied kits may be replaced. Stable callbacks avoid unnecessary revocation but must retain all account/policy dependencies.

registerDeclarativeTools(kit, root, { handlers }) registers annotated forms through an explicit trusted handler map and returns cleanup. HTML cannot define executable handlers. See declarative tools for supported fields and authorization responsibilities.

x402 and discovery

x402 payments: Paused for security maintenance. Do not use in production.

webmcp-sdk/middleware/express serves discovery metadata, not an execution transport or authentication system. Catalogs deny by default: supply an authorizer returning literal true, or deliberately choose publicManifest: true. Catalog responses use private, no-store. Actual operations need separate authentication and authorization.

Python discovery is a separate source distribution; npm does not install Python imports. No stdio server, webmcp-sdk serve, ProxyRelay or AuditLog class is supplied.

Verification

sh
npm run verify:release

The release record distinguishes historical evidence from freshly reconstructed checks. The complete gate covers formatting, types, SDK/Studio tests and builds, packed consumers, native browser/CSP, deterministic wallet flows, accessibility/mobile checks, Python tests and dependency audit. Python installation has a separate wheel-import check. No automated check publishes, deploys or sends real funds. See SECURITY.md for reporting. MIT license.

來源:README.md,提交 44a3899

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.5.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Make 整合