
WSG Check
io.github.ivanoats由 GitHub 账号 ivanoats 发布v0.6.2更新于 Oct 24, 2026
Check websites against the W3C Web Sustainability Guidelines and look up the guidelines
概览
依据 W3C 网页可持续性指南的启发式规则检查网页,返回加权评分、未通过项与修复建议,并可查询指南条目。
- 可以做什么
- 检查页面 URL,返回评分、等级以及每项未通过或警告的检查及建议修复方式,可选返回完整报告
- 按类别、可测试性或文本筛选列出 WSG 指南,并显示每条指南对应的自动化检查数量
- 获取单条指南的说明与 W3C 规范链接
- 检查覆盖网页开发、用户体验与托管三类,商业类暂无自动化检查
- 适用场景
- 适合让助手审查已上线站点或本地开发服务器的可持续性问题并在代码库中修复,或查询某主题(如网页字体)涉及哪些 WSG 指南。
- 运行要求
- 通过 npx 从 npm 包以 stdio 在本地运行,需要 Node.js 22 或更高版本。无需账号、API 密钥或托管服务。需要访问目标站点,并向 Green Web Foundation 查询绿色托管信息。
安装
在 SourceWeft 中
- 打开 控制台中的 WSG Check,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
WSG-Check
Check a website against automated heuristics based on the W3C Web Sustainability Guidelines. Get a weighted score, recommendations, and reports in terminal, JSON, Markdown, or HTML format through a CLI or a Next.js web app.
Release status
The latest release is v0.7.0.
Source on main targets WSG September-2026, the 24 September 2026 Group Note Draft; v0.6.1 and earlier target July-2026. It includes an MCP server for AI assistants, with the check_url, list_guidelines, and get_guideline tools, listed in the MCP Registry as io.github.ivanoats/wsg-check. The server first shipped in v0.4.0; v0.3.0 was tagged on GitHub but not published to npm. See the changelog and spec versioning policy.
Scores from different spec versions should not be treated as directly comparable. The package version and check selection also matter when comparing reports.
Quick start
Requires Node.js 22 or later. Pin the released CLI for reproducible usage:
To run the current source, including unreleased features, use Node.js 22.22.1 or later (required by development tooling):
See CONTRIBUTING.md for environment configuration and development commands.
What the results mean
- Checks cover web development, UX, and hosting. The business category has no automated checks.
- Analysis uses fetched HTML and HTTP metadata; it does not render JavaScript, measure Core Web Vitals, or download every referenced asset.
- Results describe one page, but most checks read the server or content shared by a site template, so pages on one site usually score alike. Scores differ mainly on page-specific content such as images and inline styles or scripts.
- CO₂ estimates use the HTML transfer size and the SWD v4 model, not measured full-page energy consumption. Failed green-hosting lookups fall back to
false. - Report page weight is the HTML transfer size: the bytes received over the network, compressed when the server compressed them. Resource and third-party counts come from references in the HTML. Referenced assets are not downloaded or measured.
- Security headers, form validation, native form features, and image alternative text remain visible as related checks, excluded from WSG scores.
CLI Usage
WSG-Check ships with a command-line tool that lets you check any website directly from your terminal or integrate checks into CI pipelines.
Basic usage
Options
--header values land in shell history and CI logs, and a malformed one is echoed in the error. For a secret, set "headers": {"Cookie": "..."} in a wsg-check.config.json kept out of version control. Header names in the config file are checked when it loads, and an error names the bad header without printing its value. --header replaces the config file's headers entirely. Headers are not sent over plain http after an https hop. To change the user agent, use WSG_USER_AGENT or the config's userAgent. The web API and MCP server do not accept request headers.
CI integration
Use --fail-threshold to fail your pipeline when a site's sustainability score drops:
Exit codes
Use with AI assistants (MCP)
The package includes wsg-check-mcp, a Model Context Protocol server for Claude Code, Claude Desktop, VS Code, Cursor, and other MCP clients. It runs on your machine over stdio, with no account, port, or hosted service. Your assistant can then check a deployed site or your local dev server, look up guidelines, and fix what it finds.
Claude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json):
npx -y @sustainablewebsites/wsg-check --mcp starts the same server; it's the command the MCP Registry listing, io.github.ivanoats/wsg-check, uses.
VS Code (.vscode/mcp.json) uses a servers key:
Try prompts such as "Check http://localhost:3000 against the WSG and fix the top three issues" or "Which WSG guidelines cover web fonts?"
Network access
- Local URLs are allowed by default, so
http://localhost:3000and other loopback addresses work without setup. The trade-off: text the assistant reads, such as a web page or a file in your project, could try to steer it into requesting a service on your machine. Requests are GET-only and the results go back to the assistant. If you don't check a local dev server, add--no-localafterwsg-check-mcpin the arguments, or setWSG_CHECK_NO_LOCAL=1. - Private networks (10/8, 172.16/12, 192.168/16) are blocked unless you add
--allow-private-networkor setWSG_CHECK_ALLOW_PRIVATE=1. - The only other request
check_urlmakes is a green-hosting lookup: it sends the hostname to the Green Web Foundation. Local hostnames are never sent. - Cloud metadata and other reserved addresses are always blocked. Redirects from a public site into your machine or network are refused, and each connection is pinned to the address that was checked.
Agent skill
The repository also ships an Agent Skill, wsg-sustainability-review. It walks an assistant through checking a site, fixing the issues in your codebase in priority order, and checking again. It uses the MCP tools when they are configured and falls back to the CLI otherwise. Install it into Claude Code, Cursor, Copilot, and other agents with:
REST API
The web app exposes Next.js Route Handlers:
Responses use CORS headers, shared error envelopes, and in-memory rate limiting. Stored results expire after one hour and the store holds at most 500 entries. Results and limits are not shared across server instances. The browser carries newly created reports through sessionStorage; result URLs are not durable share links. See runtime and storage.
Architecture and documentation
The CLI, web API, and MCP server share a TypeScript fetch → check → score → report pipeline. The code is layered and framework-independent at its core, with direct dependencies on concrete utility implementations. The architecture overview documents these boundaries and the external-I/O exceptions.
- Documentation index
- Architecture Decision Log (ADL) and ADR template
- Module and check reference
- WSG spec versioning
- Contributing, releasing, and changelog
- Executive summary and implementation plan — historical planning context; use the architecture overview for implemented behavior
License
Apache-2.0. See NOTICE and the Contributor License Agreement.
来源:README.md,提交 f4da3e7
工具
0版本历史
2- v0.6.2最新Oct 14, 2026
- v0.6.0Sep 27, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。
其他 Check 集成
check.tattoo: tattoo size and placement guide
tattoo.check官方发布者
check.tattoo: tattoo size and placement guide 的托管 MCP 服务,由 check.tattoo 发布;无需登录;Streamable HTTP;5 个工具。
iva.pt — EU VAT check (VIES) and Portuguese VAT law
pt.iva官方发布者
在 VIES 中校验欧盟增值税号,并返回葡萄牙增值税法典(CIVA)与 RITI 条文,支持葡语和英语。

Dirtsmith Evidence Quote Check
由 GitHub 账号 throttler300 发布
一个本地 MCP 服务器,将助手的引用绑定到已准入的源文本并标注片段位置,可选拒绝哈希过期的引用。

HTTP Header Policy Check — HSTS, CSP & Frame Declarations
由 GitHub 账号 kriton-dev 发布
托管在 Apify 上的远程 MCP 服务器,让助手检查网站声明的七类 HTTP 安全响应头,且不返回原始头值。

VOOPA Render Check
由 GitHub 账号 Voopa-Corp 发布
对照创作要求审查已生成的视频,在再次付费渲染前建议是剪辑修改、重试一次还是更换方案。