# Validatehtml

> Validatehtml is a freemium MCP server for developer tools. Validate HTML, CSS, JSON, XML and accessibility from a coding agent. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** CLI, API
- **Repository:** https://github.com/theodcrx/validatehtml-cli
- **MCP Registry name:** io.github.theodcrx/validatehtml
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Errors from this checker are spec violations, warnings are best practices, and modern valid code stays clean. The same package works as a command line tool (`npx validatehtml index.html`) and as an MCP server started with `validatehtml mcp`, so an agent can check its own output before handing it back.

Five tools are listed. Three need no key: one checks code you pass in, one checks a local file without loading it into the conversation, and one checks a live URL, including a dev server on localhost. A fourth, `audit_page`, runs every check on a deployed page (HTML, accessibility, meta tags, Open Graph, page weight) and needs an API key. The fifth returns a link for scanning a whole site in the browser.

Code you submit is sent to validatehtml.com, checked in memory and not stored; each call only counts the tool used and the package version. Local files must be .html, .htm, .css, .json, .xml or .svg and up to 1 MB. The repo also ships an agent skill that tells the agent when to validate and to never claim WCAG compliance.

## Features

- **Multi-format validation:** Checks HTML, CSS, JSON and XML, plus HTML against accessibility rules.
- **Local file checks:** validate_file reads a file on disk so its contents stay out of the conversation.
- **Live URL checks:** validate_url can check a deployed page or a localhost dev server.
- **Full page audit:** audit_page combines HTML, accessibility, meta tags, Open Graph and page weight in one run.
- **Build-friendly exit codes:** The CLI exits 0 on pass, 1 on fail and 2 when it could not run.
- **Bundled agent skill:** A SKILL.md explains when to validate and how to read results.

## Good for

- Check HTML an agent just generated before committing
- Run accessibility checks against a localhost dev server
- Fail a build script when a page has spec errors
- Audit meta tags and Open Graph on a deployed page
- Validate JSON or XML snippets inside a chat

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add validatehtml --env VALIDATEHTML_API_KEY='<VALIDATEHTML_API_KEY>' -- npx -y validatehtml
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add validatehtml --env VALIDATEHTML_API_KEY='<VALIDATEHTML_API_KEY>' -- npx -y validatehtml
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.validatehtml]
command = "npx"
args = ["-y", "validatehtml"]
env = { VALIDATEHTML_API_KEY = "<VALIDATEHTML_API_KEY>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e VALIDATEHTML_API_KEY='<VALIDATEHTML_API_KEY>' validatehtml npx -- -y validatehtml

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "validatehtml": {
      "command": "npx",
      "args": [
        "-y",
        "validatehtml"
      ],
      "env": {
        "VALIDATEHTML_API_KEY": "<VALIDATEHTML_API_KEY>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 3 of 5 tools read data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `validate_code` (name suggests: reads): Checks HTML, CSS, JSON, XML, or HTML for WCAG issues
- `validate_file` (name suggests: reads): Runs the same checks on a local file without reading it into the conversation
- `validate_url` (name suggests: reads): Checks a live page, including a dev server on localhost
- `audit_page`: Runs every check on one deployed page: HTML, accessibility, meta tags, Open Graph, page weight
- `site_scan_link`: Returns a link to scan a whole site in the browser

## FAQ

### Do I need an account?

No for validate_code, validate_file and validate_url. Only audit_page needs a VALIDATEHTML_API_KEY.

### How many audit calls are free?

A free account includes 100 calls a month; larger allowances are on the pricing page.

### Is my code stored?

The README says submitted code is checked in memory and not stored.

### What is the file size limit?

Local files can be up to 1 MB and must be .html, .htm, .css, .json, .xml or .svg.

### How do I add Validatehtml to Claude Code?

Run this command in your terminal: claude mcp add validatehtml --env VALIDATEHTML_API_KEY='<VALIDATEHTML_API_KEY>' -- npx -y validatehtml

### What are the best alternatives to Validatehtml?

The closest alternatives to Validatehtml are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/validatehtml
