Validates HTML, CSS, JSON, XML, and WCAG accessibility compliance for local files or live URLs.
Also known as theodcrx/validatehtml-cli, validatehtml-cli
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.1.0
- Last commit
- Nov 10, 2026
- License
- MIT
What is validatehtml MCP?
validatehtml validates HTML, CSS, JSON, XML, and WCAG accessibility compliance for local files or live URLs.
Summary generated from the project's README
About validatehtml MCP server
Checking code syntax and accessibility compliance from within an AI coding agent is what validatehtml enables. Developers can use this tool to verify HTML, CSS, JSON, and XML files, or to test live URLs and local development servers. It works through various MCP clients like Claude Code, Cursor, Windsurf, and VS Code by running via npx.
The server provides specific tools including validate_code, validate_file, and validate_url to handle different validation tasks. For more comprehensive checks, the audit_page tool examines meta tags, Open Graph data, and page weight, though this specific function requires a VALIDATEHTML_API_KEY. While basic validation requires no account, the audit feature is subject to monthly call limits based on your plan.
Files sent for validation, such as .html, .css, .json, .xml, or .svg, are processed in memory and not stored. The system supports files up to 1 MB and can read from standard input. It returns specific exit codes to integrate easily into automated build scripts or terminal workflows.
What you can do with it
- 1Automate build script validationIntegrate validation into a CI/CD pipeline by using exit codes to signal success or failure.
Written from the project's README. Every use case is checked against a quote from it.
How to install validatehtml MCP
Formats verified 10 Nov 2026Install validatehtml MCP in Claude Code
$ claude mcp add --env VALIDATEHTML_API_KEY=<YOUR_VALIDATEHTML_API_KEY> validatehtml-cli -- npx -y validatehtmlInstall validatehtml MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"validatehtml-cli": {
"command": "npx",
"args": [
"-y",
"validatehtml"
],
"env": {
"VALIDATEHTML_API_KEY": "<YOUR_VALIDATEHTML_API_KEY>"
}
}
}
}Install validatehtml MCP in VS Code
.vscode/mcp.json
{
"servers": {
"validatehtml-cli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"validatehtml"
],
"env": {
"VALIDATEHTML_API_KEY": "<YOUR_VALIDATEHTML_API_KEY>"
}
}
}
}Install validatehtml MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"validatehtml-cli": {
"command": "npx",
"args": [
"-y",
"validatehtml"
],
"env": {
"VALIDATEHTML_API_KEY": "<YOUR_VALIDATEHTML_API_KEY>"
}
}
}
}Install validatehtml MCP in Codex
~/.codex/config.toml
[mcp_servers.validatehtml-cli] command = "npx" args = ["-y", "validatehtml"] [mcp_servers.validatehtml-cli.env] VALIDATEHTML_API_KEY = "<YOUR_VALIDATEHTML_API_KEY>"
Install validatehtml MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"validatehtml-cli": {
"command": "npx",
"args": [
"-y",
"validatehtml"
],
"env": {
"VALIDATEHTML_API_KEY": "<YOUR_VALIDATEHTML_API_KEY>"
}
}
}
}Configuration
VALIDATEHTML_API_KEYSecretOptional. Only audit_page needs it. 100 free calls a month.
| Name | Description | |
|---|---|---|
| VALIDATEHTML_API_KEY | Optional. Only audit_page needs it. 100 free calls a month. | Secret |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachabletheodcrx/validatehtml-cli is public and reachablegithub.com/theodcrx/validatehtml-cli ↗Pass
- Package names this repository as its sourcevalidatehtml names theodcrx/validatehtml-cli as sourcenpmjs.com/package/validatehtml ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-10github.com/theodcrx/validatehtml-cli ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from validatehtmlPass
- No critical advisory in the package or its dependencies99 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubvalidatehtml
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"] }
}
}
| Tool | What it does | Key |
|---|---|---|
validate_code |
Checks HTML, CSS, JSON, XML, or HTML for WCAG issues | No |
validate_file |
The same on a local file, without reading it into the conversation | No |
validate_url |
Checks a live page, including a dev server on localhost | No |
audit_page |
Every check on one deployed page: HTML, accessibility, meta tags, Open Graph, page weight | Yes |
site_scan_link |
A link for you to scan a whole site in your browser | No |
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.
validatehtml MCP questions
How do I add validatehtml MCP to Claude Code?
Run claude mcp add --env VALIDATEHTML_API_KEY=<YOUR_VALIDATEHTML_API_KEY> validatehtml-cli -- npx -y validatehtml in your terminal. Add --scope user to make it available in every project.
How do I add validatehtml MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What files can be validated?
The tool can read .html, .htm, .css, .json, .xml, and .svg files up to 1 MB.
Is my code stored on your servers?
Code is checked in memory and is not stored.