Repository avatar
AI Tools
v0.1.0
active

validatehtml

io.github.theodcrx/validatehtml

Validate HTML, CSS, JSON, XML and WCAG accessibility from an AI coding agent. No key needed.

Documentation

validatehtml

Validate HTML, CSS, JSON, XML and accessibility from your terminal or your AI coding agent. Errors are spec violations, warnings are best practices, and modern valid code stays clean.

npx validatehtml index.html
npx validatehtml https://example.com
npx validatehtml http://localhost:3000 --type accessibility

No account and no key. Exit code 0 when it passes, 1 when it fails, 2 when it could not run, so it fits in a script or a build.

For AI coding agents (MCP)

Claude Code:

claude mcp add validatehtml -- npx -y validatehtml mcp

Cursor, Windsurf, VS Code and any other MCP client:

{
  "mcpServers": {
    "validatehtml": { "command": "npx", "args": ["-y", "validatehtml", "mcp"] }
  }
}
ToolWhat it doesKey
validate_codeChecks HTML, CSS, JSON, XML, or HTML for WCAG issuesNo
validate_fileThe same on a local file, without reading it into the conversationNo
validate_urlChecks a live page, including a dev server on localhostNo
audit_pageEvery check on one deployed page: HTML, accessibility, meta tags, Open Graph, page weightYes
site_scan_linkA link for you to scan a whole site in your browserNo

Agent skill

skills/validatehtml/SKILL.md tells an agent when to validate and how to read the result (fix errors, report warnings, never claim WCAG compliance). Copy the folder into .claude/skills/ (or your agent's skills folder) next to the MCP server.

Command line

validatehtml <file|url|->  [--type html|css|json|xml|accessibility]
                           [--audit] [--fail-on error|warning] [--format text|json]
validatehtml mcp

- reads standard input. --audit needs a key.

Key

--audit and audit_page use VALIDATEHTML_API_KEY. Create one at https://validatehtml.com/dashboard. A free account includes 100 calls a month; larger allowances are on the pricing page.

What leaves your machine

The code or file you ask to check is sent to validatehtml.com, checked in memory and not stored. A page on localhost is read on your machine and sent the same way. Only .html, .htm, .css, .json, .xml and .svg files can be read, up to 1 MB. Each call also counts the tool used and the package version, never the content.

Licence

MIT for this client. The licence does not cover the ValidateHTML name.

NPM
validatehtml
Install Command
npm install validatehtml