WrapGuard MCP

io.github.Yuni9959由 GitHub 帳號 Yuni9959 發布v0.1.1更新於 Oct 24, 2026

Detect unnatural Korean and English mid-word wrapping in responsive web pages.

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,用真實瀏覽器算繪響應式頁面,偵測韓文或英文單字在行間被從中間斷開的問題。

可以做什麼
  • 在多個視窗寬度下稽核頁面,依真實瀏覽器座標找出單字中間換行
  • 偵測單字內部嵌入的硬換行,並區分可避免的斷行與不可避免的長識別字
  • 檢查實際套用的換行 CSS 並提出 CSS 修正建議,支援試跑預覽
  • 驗證換行回歸,僅在明確允許寫入時套用修正
  • 回報伺服器與版本資訊
適用情境
適合維護韓文或英文網頁排版時,讓助理檢查響應式版面中單字被拆斷的問題,或把換行回歸當成建置檢查項目。
執行需求
以 npm 套件形式透過 npx 在本機執行;需要 Node.js 22 以上版本以及 Playwright Chromium(或已安裝的 Chrome、Edge)。選用的 WRAPGUARD_CONFIG 指定設定檔,WRAPGUARD_SERVER_NAME 設定顯示名稱。
安裝前請注意
預設只稽核設定根目錄下的本機檔案與 localhost;遠端 URL 稽核、截圖與 CSS 寫入需明確開啟。CSS 寫入需要 allowWrites 與允許的根目錄。說明指出不受限制的瀏覽器導覽有 SSRF 風險,託管執行個體應使用範圍很窄的 allowedHosts 清單。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 WrapGuard MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

其他 MCP 客戶端

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

README

WrapGuard MCP

WrapGuard is an MCP server and CLI that renders responsive pages with Playwright and finds Korean or English words split across visual lines. It also reports hard newlines embedded inside words, such as 업로↵드, without rewriting immutable source evidence.

한글·영어 문장이 반응형 화면에서 단어 중간에 잘리는 문제를 실제 브라우저 좌표로 검사합니다. 표시 이름은 자유롭게 바꿀 수 있지만 npm/GitHub/MCP Registry의 패키지 식별자는 별도로 유지됩니다.

What it checks

  • Korean eojeol-like tokens and English word tokens, including apostrophes and hyphens
  • Actual grapheme positions across 320, 375, 768, and 1024 px by default
  • Avoidable mid-word wraps versus unavoidable long identifiers
  • Hard source newlines between letters
  • Applied wrapping CSS and same-origin matching rules
  • Explicit, dry-run-first CSS suggestions

URLs, code, hashes, and immutable raw evidence can be excluded with patterns or data-wrapguard-ignore. Public fixtures contain no private data.

Install and run locally

Requirements: Node.js 22 or newer and a Playwright Chromium installation.

bash
npm installnpx playwright install chromiumnpm run buildnode dist/stdio.js

With browserChannel: "auto" (the default), WrapGuard tries Playwright Chromium first and then an installed Chrome or Microsoft Edge. Installing Playwright Chromium is the reproducible choice for CI.

After an npm release, an MCP client can launch it directly:

json
{  "mcpServers": {    "wrapguard": {      "command": "npx",      "args": ["-y", "wrapguard-mcp"],      "env": {        "WRAPGUARD_SERVER_NAME": "My Typography Inspector",        "WRAPGUARD_CONFIG": "C:/absolute/path/wrapguard.config.json"      }    }  }}

On Windows, clients that do not resolve command shims may need npx.cmd instead of npx.

Run it as a release gate without MCP:

bash
wrapguard audit ./dist/index.html --viewports 320,375,768,1024 --output wrap-report.jsonwrapguard audit ./dist/index.html --format markdown --output wrap-report.md

Exit code 0 means no avoidable split, 1 means regression issues were found, and 2 means the audit could not run.

Change the displayed name

Copy wrapguard.config.example.json to wrapguard.config.json, then edit:

json
{  "serverName": "우리집 문장 검사기"}

WRAPGUARD_SERVER_NAME overrides the JSON value. This changes the runtime MCP display name only. Before the first public release, change name, mcpName, repository URLs, and server.json together if you want a different permanent package identity.

MCP tools

  • server_info
  • audit_page
  • detect_midword_breaks
  • inspect_wrap_css
  • suggest_wrap_fix
  • verify_wrap_regression
  • apply_wrap_fix — dry-run by default; real writes require allowWrites: true and an allowed root

Safe defaults

The default configuration audits local files under the configured roots and localhost only. Remote URL auditing, screenshots, and CSS writes are disabled unless explicitly enabled. A hosted instance should use a narrow allowedHosts list because unrestricted browser navigation creates an SSRF risk.

CSS previews, CSS writes, and screenshots resolve filesystem links before checking allowedFileRoots. Screenshot directories must be inside an existing allowed root. An explicitly selected configuration file must exist and contain a JSON object; a missing conventional wrapguard.config.json still uses defaults. Runtime and MCP versions are read from package.json.

Three publication layers

  1. GitHub publishes source, issues, documentation, and releases. It does not by itself run an MCP endpoint.
  2. npm publishes the stdio executable so users can run npx -y wrapguard-mcp.
  3. Remote MCP hosts /mcp over Streamable HTTP for clients that do not run local processes.

Publish source and npm

After reviewing the repository name and public contents:

bash
git initgit add .git commit -m "feat: release WrapGuard MCP 0.1.1"gh repo create wrapguard-mcp --public --source . --remote origin --pushnpm loginnpm publish --access public

Then validate and publish server.json with the official mcp-publisher. The npm package must be published first and the mcpName in package.json must match server.json.

Host a remote endpoint

The included container starts the Streamable HTTP server at /mcp:

bash
docker build -t wrapguard-mcp:0.1.1 .docker run --rm -p 8787:8787 \  -e WRAPGUARD_HTTP_TOKEN="replace-with-a-long-random-value" \  -e WRAPGUARD_HTTP_HOSTS="localhost,127.0.0.1" \  wrapguard-mcp:0.1.1

For a public host, set WRAPGUARD_HTTP_HOSTS to the deployed domain and store WRAPGUARD_HTTP_TOKEN as a platform secret. Use a container service that supports Playwright/Chromium, such as Cloud Run, Fly.io, Render, Railway, or an equivalent service. Add the final HTTPS URL to the remotes field in server.json only after the endpoint exists.

Vercel Functions are not the default recommendation for this project because browser binaries, execution duration, and memory limits make browser audits less predictable than a long-running container.

Development

bash
npm run checknpm testnpm run buildnpm pack --dry-run

The test suite uses synthetic Korean and English pages and an in-memory MCP client/server connection.

License

MIT

來源:README.md,提交 c065ed3

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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