xmlvalid
Validate XML and e-invoices against XSD, DTD, RelaxNG and the Schematron rules of EN 16931, Peppol BIS, XRechnung, Factur-X and national formats; explain parser errors and business rules
Hosted MCP Server
npx add-mcp 'https://xmlvalid.com/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
xmlvalid MCP server
The xmlvalid MCP server lets an AI agent validate XML documents and e-invoices and explain what fails: XSD, DTD and RelaxNG schemas, and the official Schematron business rules of EN 16931, Peppol BIS Billing 3.0, XRechnung, ZUGFeRD / Factur-X, France CTC, KSeF, FatturaPA, Peppol PINT and other national formats (178 schemas, 56 rule sets with 7,751 rules).
It is a hosted server: there is nothing to install or run. Point your client at
https://xmlvalid.com/mcp
(Streamable HTTP). Each finding comes back with its line and column, the business rule's id (such as BR-CO-15) and a link to a page that explains how to fix it.
Tools · Cline · Other clients · Authentication · Example prompts · Privacy and limits
Tools
| Tool | What it does | Account |
|---|---|---|
validate_xml | Validates a document, given as its text (xml) or a public URL (url), against a catalog schema (schema: a slug from search_schemas), one of your saved schemas (@name) or auto (the e-invoice profile the document names in its specification identifier, BT-24). Without a schema it checks well-formedness. | Needed, counts as one API validation |
get_validation | The result of a validation that was still running when validate_xml returned. | Needed |
search_schemas | Finds the catalog slug for a format: "peppol invoice", "xrechnung cii", "pain.001". | Not needed |
explain_error | Explains a parser or validator message from libxml2 (xmllint, PHP, Python lxml), Java (Xerces cvc-*, SAX) or .NET (System.Xml): what it means, why it happens, how to fix it, with an example. | Not needed |
explain_rule | Explains a business rule by its id (BR-CO-15, BR-DE-1, PEPPOL-EN16931-R001, a national CIUS rule): its message, level, the rule set it belongs to and how to fix it. | Not needed |
Every tool carries its MCP annotations: validate_xml is the only one that isn't read-only, and none is destructive.
Cline
Open MCP Servers → Configure → Configure MCP Servers and add xmlvalid to cline_mcp_settings.json:
{
"mcpServers": {
"xmlvalid": {
"type": "streamableHttp",
"url": "https://xmlvalid.com/mcp",
"headers": {
"Authorization": "Bearer xv_your_api_key"
},
"disabled": false,
"autoApprove": ["search_schemas", "explain_error", "explain_rule"]
}
}
}
Replace xv_your_api_key with your key (see Authentication). Or leave out headers and sign in instead: search_schemas, explain_error and explain_rule work without an account, and the first validate_xml makes Cline report that the server requires OAuth authorization. Authorize xmlvalid from Cline's MCP servers (in Cline CLI, cline mcp) and sign in to xmlvalid in the browser.
The same works in Cline CLI, which reads ~/.cline/data/settings/cline_mcp_settings.json; the tools show up as xmlvalid__explain_rule and so on.
Other clients
Claude (claude.ai, desktop and mobile): xmlvalid is in Claude's connector directory. Claude Code:
claude mcp add --transport http xmlvalid https://xmlvalid.com/mcp
then /mcp to sign in.
Gemini CLI: install it as an extension, which also gives Gemini a short guide to the tools:
gemini extensions install https://github.com/xmlvalid/mcp
The first validate_xml call opens the browser to sign in.
Cursor: this repository is also a Cursor plugin (.cursor-plugin/plugin.json: the server and a validate-xml skill). Or add the server alone to .cursor/mcp.json:
{
"mcpServers": {
"xmlvalid": {
"url": "https://xmlvalid.com/mcp"
}
}
}
VS Code (.vscode/mcp.json), asking for the key once instead of storing it in the file:
{
"servers": {
"xmlvalid": {
"type": "http",
"url": "https://xmlvalid.com/mcp",
"headers": {
"Authorization": "Bearer ${input:xmlvalid-key}"
}
}
},
"inputs": [
{ "type": "promptString", "id": "xmlvalid-key", "description": "xmlvalid API key", "password": true }
]
}
Any other client that speaks Streamable HTTP takes the same URL. The server is listed in the official MCP Registry as com.xmlvalid/xmlvalid; server.json is its entry.
Authentication
validate_xml and get_validation run as your xmlvalid account, so the quota and results are those of the API. Two ways to give it:
- API key. Sign up at xmlvalid.com and confirm your email, then create a key under Dashboard → API keys. It starts with
xv_; send it asAuthorization: Bearer xv_…. This is the way for Cline and for scripts. - OAuth. Clients that support MCP authorization (Claude, Claude Code, Cursor, VS Code) ask you to sign in to xmlvalid the first time you validate; no key to copy. The server supports dynamic client registration. Connected apps are listed under Dashboard → API keys, where you can disconnect them.
Example prompts
- "Validate invoice.xml against the official rules and tell me what to fix" (the agent reads the file and sends it with
schema: "auto") - "Check https://example.com/feed.xml against its XSD"
- "My Peppol invoice fails with BR-CO-15. What does it mean and how do I fix it in UBL?"
- "Explain cvc-complex-type.2.4.a: Invalid content was found starting with element 'cbc:Note'"
- "Which schema do I use for a Peppol BIS credit note?"
- "Write a test that generates our XRechnung and validates it with xmlvalid"
When a validation fails, fix the first errors first: later ones often follow from them, and business rules run only once the schema check passes.
Privacy and limits
- Documents sent to
validate_xmlare validated on xmlvalid's servers in Germany and deleted afterwards; findings are kept for 24 hours. See Security and the DPA. - The Free plan includes 100 API validations a month and files up to 10 MB; Pro 10,000 a month and files up to 1 GB.
- To validate without sending the document anywhere, use the web validator: it runs the same engine in the browser (WebAssembly), and nothing is uploaded.
Links
- API and MCP documentation
- Schema catalog · Business rules · Error guide
- Other clients: CLI, GitHub Action, n8n node
- Support: support@xmlvalid.com
This repository holds the server's documentation and registry entry; the server itself runs at xmlvalid.com.
License
MIT