mcp-web-validator 1.0.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +91 -0
- package/README.md +149 -83
- package/SECURITY.md +35 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +444 -668
- package/dist/index.js.map +1 -1
- package/dist/network.d.ts +37 -0
- package/dist/network.js +288 -0
- package/dist/network.js.map +1 -0
- package/dist/presentation.d.ts +15 -0
- package/dist/presentation.js +347 -0
- package/dist/presentation.js.map +1 -0
- package/dist/report.d.ts +43 -0
- package/dist/report.js +143 -0
- package/dist/report.js.map +1 -0
- package/dist/screenshot.d.ts +1 -0
- package/dist/screenshot.js +150 -14
- package/dist/screenshot.js.map +1 -1
- package/dist/seo-auditor.d.ts +11 -2
- package/dist/seo-auditor.js +176 -66
- package/dist/seo-auditor.js.map +1 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -0
- package/dist/w3c-validator.d.ts +2 -0
- package/dist/w3c-validator.js +76 -17
- package/dist/w3c-validator.js.map +1 -1
- package/package.json +18 -7
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The project follows [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [1.2.1] - 2026-09-19
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Added current Gemini CLI and GitHub Copilot CLI setup guidance for the local stdio package.
|
|
12
|
+
- Migrated the hosted stateless MCP handler to the supported Agents SDK v2 server-factory path and refreshed current minor/patch dependency resolutions.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Rejected malformed Nu HTML Checker responses that omit the required `messages` member in both local and hosted validation paths.
|
|
17
|
+
- Rejected malformed non-empty W3C CSS Validator JSON that omits the expected `cssvalidation` envelope.
|
|
18
|
+
- Rejected successful non-HTML responses from local URL validation instead of forwarding arbitrary content to the HTML checker.
|
|
19
|
+
- Removed unsupported exact-one-H1 SEO penalties while retaining heading-structure guidance.
|
|
20
|
+
- Resolved relative links from the document's first valid public `<base href>` when no explicit link-check base URL is provided.
|
|
21
|
+
- Recognized parameterized `application/ld+json` media types, including the standards-defined `profile` parameter, in both local and hosted schema scans.
|
|
22
|
+
|
|
23
|
+
## [1.2.0] - 2026-09-19
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Added the hosted `audit_public_site` tool for bounded, sitemap-first, same-origin public-site audits with robots enforcement, page continuation, compact coverage, grouped findings, and a transparent health-score denominator.
|
|
28
|
+
- Added the hosted `audit_public_webpage` tool for one-page live URL audits with bounded public fetching, redirect validation, HTML validation, SEO/accessibility-signal checks, JSON-LD syntax checks, and optional link checks.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Organized local MCP tool names under shallow dot-notation paths and documented every local input, including nested screenshot viewport fields.
|
|
33
|
+
- Upgraded the hosted Worker contract to version 0.5.0 and the results widget to v5.
|
|
34
|
+
- Added a dedicated per-client rate limit for bounded public-site audits and cache-busted the site-aware widget resource.
|
|
35
|
+
- Limited hosted link checks to 20 targets so the worst-case live-page audit remains below the Cloudflare Workers Free subrequest ceiling.
|
|
36
|
+
- Corrected non-mutating external tool annotations, clarified tool-selection metadata, and distinguished checked CSS from CSS that was not supplied.
|
|
37
|
+
- Renamed the hosted HTML diagnostic field from `errors` to `messages` because it contains errors, warnings, and informational notes.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- Prevented client-controlled MCP session IDs from bypassing coarse rate limiting.
|
|
42
|
+
- Added bounded Nu response handling and a structured final Worker error boundary.
|
|
43
|
+
- Corrected warning-only next-step copy and the JSON-LD syntax-check title.
|
|
44
|
+
- Refreshed production dependency resolutions to remove newly disclosed transitive vulnerabilities before publishing the npm release.
|
|
45
|
+
|
|
46
|
+
## [1.1.0] - 2026-07-12
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- Added concise, tool-specific result summaries with prioritized fixes and clear next steps.
|
|
51
|
+
- Added a shared hosted result overview with truthful status, severity, truncation, schema-block, link-health, and partial-report metadata.
|
|
52
|
+
- Added the responsive v3 ChatGPT results widget with accessible severity groups, clean and partial states, dark-mode support, and expandable findings.
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
|
|
56
|
+
- Replaced duplicated raw JSON in local MCP narration with polished Markdown while preserving every structured result field.
|
|
57
|
+
- Upgraded the hosted Worker contract to version 0.3.0 and cache-busted its UI resource.
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- Fixed CSS errors being presented as informational results in the hosted widget.
|
|
62
|
+
- Fixed healthy links appearing as problems, missing truncation notices, and partial reports hiding completed checks.
|
|
63
|
+
- Distinguished pages with no JSON-LD from pages whose JSON-LD parsed successfully.
|
|
64
|
+
|
|
65
|
+
## [1.0.1] - 2026-07-11
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
- Automated contract, network-safety, report, and hosted Worker tests in CI.
|
|
70
|
+
- Security reporting and contribution guidance.
|
|
71
|
+
- Machine-readable results for every local MCP tool.
|
|
72
|
+
|
|
73
|
+
### Changed
|
|
74
|
+
|
|
75
|
+
- Reworked documentation to distinguish the local npm server from the hosted ChatGPT app.
|
|
76
|
+
- Documented exact runtime tool names, external data recipients, filesystem behavior, and production verification commands.
|
|
77
|
+
- Added bounded file and response sizes, network timeouts, capped link concurrency, public-address checks, and safer screenshot output handling.
|
|
78
|
+
- Upgraded the hosted Worker contract to version 0.2.0 with complete report details, a readable results widget, observability, and rate limiting.
|
|
79
|
+
|
|
80
|
+
### Fixed
|
|
81
|
+
|
|
82
|
+
- Fixed local tool calls being rejected because advertised output schemas had no matching `structuredContent`.
|
|
83
|
+
- Fixed relative-link resolution, unbounded link fan-out, unsafe redirect handling, and screenshot filename traversal.
|
|
84
|
+
- Fixed hosted HTML warnings being counted as errors.
|
|
85
|
+
- Reject untrusted browser `Origin` headers at the hosted Streamable HTTP boundary as required by MCP.
|
|
86
|
+
|
|
87
|
+
## [1.0.0] - 2026-07-11
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
|
|
91
|
+
- Initial public npm release with HTML and CSS validation, technical SEO and accessibility auditing, JSON-LD parsing, broken-link checks, aggregate reports, and responsive screenshots.
|
package/README.md
CHANGED
|
@@ -1,99 +1,96 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Web Validator by DigestSEO
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mcp-web-validator)
|
|
4
|
-
[](https://github.com/AKzar1el/mcp-web-validator/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://tensorblock.co/mcp/servers/github-akzar1el-mcp-web-validator-4b38b48a)
|
|
7
|
+
[](https://glama.ai/mcp/servers/AKzar1el/mcp-web-validator)
|
|
5
8
|
|
|
6
|
-
Part of the **[DigestSEO](https://digestseo.com/)** suite of open-source SEO tools.
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
· Support: [digestseo.com/support](https://digestseo.com/support/)
|
|
10
|
+
An MCP server for HTML and CSS validation, technical SEO and accessibility checks, JSON-LD syntax validation, broken-link checks, and responsive screenshots. It is part of the [DigestSEO](https://digestseo.com/) suite of open-source SEO tools.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
- Product: [digestseo.com/validator-mcp](https://digestseo.com/validator-mcp/)
|
|
13
|
+
- Engineering case study: [DigestSEO MCP Suite — AI visibility, Search Console, web validation, and trend intelligence](https://tomiseregi.si/projects/digestseo-mcp-suite)
|
|
14
|
+
- Documentation: [this README](https://github.com/AKzar1el/mcp-web-validator#readme)
|
|
15
|
+
- Support: [digestseo.com/support](https://digestseo.com/support/)
|
|
16
|
+
- Privacy: [digestseo.com/privacy](https://digestseo.com/privacy/)
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
## Choose the right surface
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
This repository contains two deliberately separate MCP surfaces:
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
| Surface | Transport | Best for | Access and side effects |
|
|
23
|
+
| --- | --- | --- | --- |
|
|
24
|
+
| Local npm server | stdio | Claude Desktop, Cursor, and other local MCP clients | Can read user-selected workspace files, contact validation and link targets, and write screenshot files. |
|
|
25
|
+
| Hosted app | Streamable HTTP | ChatGPT and remote MCP clients | Can fetch one authorized public HTML page, run a bounded sitemap-first site audit, or process supplied markup. It cannot access local files, authenticate, recursively crawl links, execute page JavaScript, or create screenshots. |
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
Local installation:
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
```bash
|
|
30
|
+
npx -y mcp-web-validator
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Hosted endpoint:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
https://web-validator-mcp.digestseo.com/mcp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Requirements
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
- Node.js 22.12.0 or newer
|
|
42
|
+
- An MCP client that supports stdio, or a client that supports Streamable HTTP for the hosted endpoint
|
|
27
43
|
|
|
28
|
-
|
|
29
|
-
The assistant automatically runs `generate_validation_report` which aggregates standard specs and outputs a unified PageSpeed-style scorecard directly in your chat:
|
|
44
|
+
Puppeteer may download a compatible browser during npm installation. The browser is used only by the local `screenshot.capture` tool.
|
|
30
45
|
|
|
31
|
-
|
|
32
|
-
*Generated for: `index.html`*
|
|
46
|
+
## Local server tools
|
|
33
47
|
|
|
34
|
-
|
|
35
|
-
| Score Card | Status | Score |
|
|
36
|
-
| :--- | :---: | :---: |
|
|
37
|
-
| **W3C HTML Validation** | 🟠 Needs Work | **88** / 100 |
|
|
38
|
-
| **SEO & Accessibility** | 🟠 Warnings | **88** / 100 |
|
|
39
|
-
| **Links Integrity** | 🟢 All Good | **100** / 100 |
|
|
48
|
+
The npm package exposes these exact runtime tool names:
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
| Tool | Purpose | Network or filesystem behavior |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| `html.local` | Validate a local HTML file. | Reads the selected file and submits its markup to the external W3C Nu HTML Checker at `validator.w3.org/nu/`. |
|
|
53
|
+
| `html.url` | Validate the markup returned by a public URL. | Fetches the URL, then submits the returned markup to the external Nu checker. |
|
|
54
|
+
| `css.local` | Validate a local CSS file. | Reads the selected file and submits its CSS to the external W3C Jigsaw CSS Validator. |
|
|
55
|
+
| `seo.metadata` | Audit titles, descriptions, canonical tags, headings, viewport metadata, image alt attributes, and Open Graph metadata. | Processes supplied HTML locally. |
|
|
56
|
+
| `links.broken` | Check links extracted from supplied HTML. | Sends bounded HTTP requests to eligible public links. |
|
|
57
|
+
| `schema.markup` | Parse JSON-LD blocks and report JSON syntax errors. | Processes supplied HTML locally. |
|
|
58
|
+
| `report.validation` | Combine HTML, optional CSS, SEO, JSON-LD, and bounded link checks in a Markdown report. | Reads selected files, contacts the validators, and checks eligible public links found in the HTML. |
|
|
59
|
+
| `screenshot.capture` | Capture desktop, tablet, mobile, or custom viewport screenshots. | Opens a selected local file or eligible public URL and writes PNG files to the selected output directory; existing matching files may be replaced. |
|
|
43
60
|
|
|
44
|
-
|
|
45
|
-
| :---: | :---: | :---: |
|
|
46
|
-
| 🖥️ `desktop.png` | 📟 `tablet.png` | 📱 `mobile.png` |
|
|
61
|
+
## Hosted app tools
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
The hosted app exposes eight tools:
|
|
49
64
|
|
|
50
|
-
|
|
65
|
+
| Tool | Purpose |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `audit_public_webpage` | Fetch one authorized public HTML page and run the combined HTML, SEO/accessibility-signal, and JSON-LD syntax audit. Link checks are optional. |
|
|
68
|
+
| `audit_public_site` | Run a bounded sitemap-first audit of up to eight authorized, same-origin public pages. It respects `robots.txt`, returns compact page coverage and deduplicated findings, and does not run site-wide link checks. |
|
|
69
|
+
| `validate_html` | Validate raw HTML markup already supplied in the conversation. |
|
|
70
|
+
| `validate_css` | Parse supplied CSS for syntax errors inside the Worker. |
|
|
71
|
+
| `audit_seo_metadata` | Audit supplied HTML for covered on-page SEO and accessibility signals. |
|
|
72
|
+
| `validate_schema_markup` | Check JSON-LD blocks in supplied HTML for JSON syntax errors. |
|
|
73
|
+
| `check_broken_links` | Check up to 20 authorized public links extracted from supplied HTML. |
|
|
74
|
+
| `generate_validation_report` | Combine the checks for supplied markup; `base_url` resolves relative links but does not fetch a page. |
|
|
51
75
|
|
|
52
|
-
-
|
|
53
|
-
- **CSS Validation**: Calls the W3C Jigsaw CSS Validator API to debug stylesheets.
|
|
54
|
-
- **Technical SEO Check**: Audits title/description lengths, viewport responsiveness, heading hierarchies, Open Graph metadata, and image alt attributes.
|
|
55
|
-
- **Broken Link Checker**: Scans HTML documents for broken internal or external URLs.
|
|
56
|
-
- **Schema Validator**: Parses and validates embedded JSON-LD structured schemas.
|
|
57
|
-
- **Visual Viewport Audits**: Uses a headless Puppeteer browser locally to capture responsive layout screenshots (desktop, tablet, mobile) for design auditing.
|
|
76
|
+
`audit_public_webpage` follows at most three validated redirects, accepts a bounded `text/html` response, and records the final URL. It does not crawl additional pages, execute JavaScript, authenticate, or fetch linked stylesheets and assets. `audit_public_site` first locks the final public origin, reads bounded same-origin `robots.txt` and XML sitemap documents, then audits at most eight eligible sitemap pages in one call. It never follows HTML links, subdomains, external sitemap entries, private/reserved destinations, custom ports, or cross-origin redirects; use `page_offset` when the response says more eligible pages remain. The fetched HTML is sent to `https://html5.validator.nu/`, the same external Nu HTML Checker used by `validate_html` and the report tool. CSS parsing, SEO analysis, and JSON-LD parsing run inside the DigestSEO Worker. Optional link checks make capped `HEAD` requests, with a bounded `GET` fallback where necessary, to eligible public HTTP(S) URLs; link redirects are reported but not followed. The site tool intentionally does not perform site-wide link checking. The hosted app does not retain tool inputs, fetched HTML, or results.
|
|
58
77
|
|
|
59
|
-
|
|
78
|
+
## Privacy Policy
|
|
60
79
|
|
|
61
|
-
|
|
80
|
+
Only validate files, markup, and public webpages that you own or are authorized to inspect. Public page URLs can contain sensitive query values, so remove tokens and private identifiers before submitting them. Do not submit passwords, API keys, access tokens, payment data, health data, private source code, or other sensitive personal data.
|
|
62
81
|
|
|
63
|
-
|
|
64
|
-
- **Arguments**: `filePath: string` (Absolute or relative path to the local HTML file)
|
|
65
|
-
- **Description**: Submits local HTML to the W3C Nu Checker and returns syntax errors/warnings.
|
|
66
|
-
2. `validate_url`
|
|
67
|
-
- **Arguments**: `url: string` (The live public URL to audit)
|
|
68
|
-
- **Description**: Validates live page markup against W3C standards.
|
|
69
|
-
3. `validate_local_css`
|
|
70
|
-
- **Arguments**: `filePath: string` (Absolute or relative path to the CSS file)
|
|
71
|
-
- **Description**: Checks local CSS syntax against the W3C Jigsaw API.
|
|
72
|
-
4. `audit_seo_metadata`
|
|
73
|
-
- **Arguments**: `htmlContent: string` (Raw HTML string)
|
|
74
|
-
- **Description**: Performs a fast, local SEO audit (titles, descriptions, headings, images, alt tags).
|
|
75
|
-
5. `check_broken_links`
|
|
76
|
-
- **Arguments**: `htmlContent: string`, `baseUrl?: string`
|
|
77
|
-
- **Description**: Tests all links in the document to detect 404s or broken URLs.
|
|
78
|
-
6. `validate_schema_markup`
|
|
79
|
-
- **Arguments**: `htmlContent: string`
|
|
80
|
-
- **Description**: Validates JSON-LD schema syntax.
|
|
81
|
-
7. `generate_validation_report`
|
|
82
|
-
- **Arguments**: `htmlFilePath: string`, `cssFilePath?: string`, `baseUrl?: string`
|
|
83
|
-
- **Description**: Automatically runs all checks (HTML/CSS syntax, SEO audit, JSON-LD, broken links) and generates a unified Markdown report card styled with PageSpeed-inspired scoring.
|
|
84
|
-
8. `capture_screenshots`
|
|
85
|
-
- **Arguments**: `targetPath: string` (Path to local HTML file or HTTP(S) URL), `outputDir?: string`, `viewports?: Array<{ name: string, width: number, height: number }>`
|
|
86
|
-
- **Description**: Renders the target in a local headless browser and saves screenshots across desktop, tablet, and mobile views.
|
|
82
|
+
The local server runs with the same operating-system permissions as its MCP client. Review tool inputs before approving file access, outbound validation, link checking, or screenshot creation. The hosted app has no access to your local filesystem.
|
|
87
83
|
|
|
88
|
-
|
|
84
|
+
See the published [privacy policy](https://digestseo.com/privacy/) for data-handling details and [SECURITY.md](SECURITY.md) for private vulnerability reporting.
|
|
89
85
|
|
|
90
|
-
##
|
|
86
|
+
## Configure a local client
|
|
91
87
|
|
|
92
|
-
###
|
|
93
|
-
Add this to your `claude_desktop_config.json`:
|
|
88
|
+
### Claude Desktop
|
|
94
89
|
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
Add the server to `claude_desktop_config.json`:
|
|
91
|
+
|
|
92
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
93
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
97
94
|
|
|
98
95
|
```json
|
|
99
96
|
{
|
|
@@ -106,24 +103,93 @@ Add this to your `claude_desktop_config.json`:
|
|
|
106
103
|
}
|
|
107
104
|
```
|
|
108
105
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
Restart Claude Desktop after saving the configuration.
|
|
107
|
+
|
|
108
|
+
### Cursor and compatible clients
|
|
109
|
+
|
|
110
|
+
Create a command/stdio MCP server with:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
npx -y mcp-web-validator
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This repository also includes a Cursor Marketplace plugin manifest. After the
|
|
117
|
+
plugin is published, install **Web Validator by DigestSEO** from Cursor's
|
|
118
|
+
Marketplace or add the repository from Cursor's plugin UI. The plugin bundles
|
|
119
|
+
the same local stdio server and does not require API keys or environment
|
|
120
|
+
variables.
|
|
121
|
+
|
|
122
|
+
### Gemini CLI
|
|
123
|
+
|
|
124
|
+
Gemini CLI supports local stdio MCP servers. Add the published package with:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
gemini mcp add mcp-web-validator npx -y mcp-web-validator
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This writes the server definition to Gemini CLI's MCP configuration. No API
|
|
131
|
+
keys or environment variables are required by Web Validator.
|
|
132
|
+
|
|
133
|
+
### GitHub Copilot CLI
|
|
134
|
+
|
|
135
|
+
Add the published local stdio server with:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
copilot mcp add mcp-web-validator -- npx -y mcp-web-validator
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
When Copilot CLI is started inside a clone of this repository, it can also
|
|
142
|
+
discover the checked-in root `.mcp.json`, which already points
|
|
143
|
+
`mcp-web-validator` at `npx -y mcp-web-validator`.
|
|
144
|
+
|
|
145
|
+
### Kiro
|
|
146
|
+
|
|
147
|
+
[](https://kiro.dev/launch/mcp/add?name=mcp-web-validator&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mcp-web-validator%22%5D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D)
|
|
148
|
+
|
|
149
|
+
This installs the local stdio package, preserving its workspace-file and screenshot capabilities. Node.js 22.12.0+ is required.
|
|
150
|
+
|
|
151
|
+
## Development
|
|
152
|
+
|
|
153
|
+
Clone the repository and install the locked dependencies:
|
|
115
154
|
|
|
116
|
-
### 3. Development / Local Execution
|
|
117
|
-
To run and test the server locally:
|
|
118
155
|
```bash
|
|
119
156
|
git clone https://github.com/AKzar1el/mcp-web-validator.git
|
|
120
157
|
cd mcp-web-validator
|
|
121
|
-
npm
|
|
158
|
+
npm ci
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Run the local quality gates:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
npm run check
|
|
165
|
+
npm test
|
|
122
166
|
npm run build
|
|
123
|
-
|
|
167
|
+
npm pack --dry-run
|
|
124
168
|
```
|
|
125
169
|
|
|
126
|
-
|
|
170
|
+
Run the local stdio server:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npm start
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Validate the hosted Worker separately:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
cd chatgpt-plugin
|
|
180
|
+
npm ci
|
|
181
|
+
npm run check
|
|
182
|
+
npm test
|
|
183
|
+
npm run deploy:dry-run
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution expectations. Deployment and marketplace-review notes live in [chatgpt-plugin/SUBMISSION.md](chatgpt-plugin/SUBMISSION.md).
|
|
187
|
+
For agent-assisted installation, see [llms-install.md](llms-install.md).
|
|
188
|
+
|
|
189
|
+
## Ecosystem
|
|
190
|
+
|
|
191
|
+
[](https://smithery.ai/servers/digestseo/web-validator)
|
|
192
|
+
|
|
193
|
+
## License
|
|
127
194
|
|
|
128
|
-
|
|
129
|
-
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
195
|
+
Licensed under the [MIT License](LICENSE).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
Security fixes are applied to the current npm release of `mcp-web-validator` and the currently deployed hosted endpoint at `https://web-validator-mcp.digestseo.com/mcp`. Older npm versions are not supported; upgrade to the latest published version before reporting a problem that may already be fixed.
|
|
6
|
+
|
|
7
|
+
## Report a vulnerability privately
|
|
8
|
+
|
|
9
|
+
Do not open a public GitHub issue for a suspected vulnerability.
|
|
10
|
+
|
|
11
|
+
Use [GitHub private vulnerability reporting](https://github.com/AKzar1el/mcp-web-validator/security/advisories/new). If that form is unavailable, email `tomi.seregi99@gmail.com` with the subject `Security report: mcp-web-validator`. Do not include secrets or unrelated personal data.
|
|
12
|
+
|
|
13
|
+
Include, where possible:
|
|
14
|
+
|
|
15
|
+
- the affected surface (local npm server, hosted Worker, website, or packaging metadata);
|
|
16
|
+
- the affected version, commit, endpoint, and tool name;
|
|
17
|
+
- reproducible steps or a minimal proof of concept;
|
|
18
|
+
- the expected and observed impact;
|
|
19
|
+
- any suggested mitigation; and
|
|
20
|
+
- whether the issue has been disclosed elsewhere.
|
|
21
|
+
|
|
22
|
+
Please avoid accessing data that is not yours, disrupting the public service, or including credentials or personal data in the report. We aim to acknowledge complete reports within three business days and will coordinate remediation and disclosure with the reporter.
|
|
23
|
+
|
|
24
|
+
## Security boundaries
|
|
25
|
+
|
|
26
|
+
The local stdio server runs with the permissions of the MCP client that launches it. Its documented features can read user-selected files, make outbound validation and link-check requests, open local files or public URLs in a headless browser, and write screenshot files. Users should review every sensitive tool call and run MCP clients with least privilege.
|
|
27
|
+
|
|
28
|
+
The hosted app cannot access local files. It can process raw HTML or CSS supplied by the user, fetch one authorized public HTML webpage for a focused audit, and perform a bounded sitemap-first same-origin public-site audit. That audit first fetches the seed page to lock the final public origin, then may retrieve `robots.txt`, eligible same-origin XML sitemap documents, and up to eight eligible same-origin public HTML pages per request. It rejects private or reserved addresses, credentialed URLs, custom ports, external sitemap entries, subdomains, and cross-origin redirects for the site audit. It does not authenticate, execute webpage JavaScript, recursively follow arbitrary HTML links, fetch arbitrary linked assets or stylesheets, or perform site-wide broken-link crawling. Supplied or fetched HTML validation payloads may be sent to the external [Nu HTML Checker](https://html5.validator.nu/); focused authorized broken-link checks may contact eligible public link URLs. See the [privacy policy](https://digestseo.com/privacy/) for data-handling details.
|
|
29
|
+
|
|
30
|
+
The following are normally outside this project's vulnerability scope unless they expose a project-specific weakness:
|
|
31
|
+
|
|
32
|
+
- availability or behavior of third-party validation services;
|
|
33
|
+
- social-engineering reports without a technical vulnerability;
|
|
34
|
+
- automated scanner output without a reproducible impact; and
|
|
35
|
+
- denial-of-service testing against the production endpoint without prior written permission.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { auditSeoMetadata, checkBrokenLinks, validateSchemaMarkup } from "./seo-auditor.js";
|
|
4
|
+
import { type ValidationReport } from "./report.js";
|
|
5
|
+
import { readTextFile } from "./network.js";
|
|
6
|
+
import { validateCssContent, validateHtmlContent } from "./w3c-validator.js";
|
|
7
|
+
export declare const SERVER_VERSION: string;
|
|
8
|
+
interface ValidationReportDependencies {
|
|
9
|
+
readTextFile: typeof readTextFile;
|
|
10
|
+
validateHtmlContent: typeof validateHtmlContent;
|
|
11
|
+
validateCssContent: typeof validateCssContent;
|
|
12
|
+
auditSeoMetadata: typeof auditSeoMetadata;
|
|
13
|
+
validateSchemaMarkup: typeof validateSchemaMarkup;
|
|
14
|
+
checkBrokenLinks: typeof checkBrokenLinks;
|
|
15
|
+
}
|
|
16
|
+
export interface GenerateValidationReportOptions {
|
|
17
|
+
htmlFilePath: string;
|
|
18
|
+
cssFilePath?: string;
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Runs independent validation checks without discarding successful results when another check fails. */
|
|
22
|
+
export declare function generateValidationReport({ htmlFilePath, cssFilePath, baseUrl }: GenerateValidationReportOptions, dependencies?: ValidationReportDependencies): Promise<ValidationReport>;
|
|
23
|
+
export declare function createServer(): McpServer;
|
|
24
|
+
export declare function run(): Promise<void>;
|
|
2
25
|
export {};
|