beliq-mcp
OfficialThis MCP server exposes two beliq e-invoice tools: validate electronic invoices and check the account/API key.
beliq_validate_einvoice— validate a UBL or CII XML invoice (inline viadocument, or a file viadocumentPath) or a Factur-X/ZUGFeRD PDF (bydocumentPath).Optional inputs:
formathint (auto/cii/ubl) andfranceCtcto apply the French CTC rule overlay.Returns
valid, detectedformatandprofileDetected, theschematronVersionchecked against, pluserrors/warnings(each withruleId,severity,location,message) anderrorCount/warningCount.beliq_check_account— callsGET /v1/me(no quota drawn) to verify the API key, returningok,status,message, andplan.Both tools are read-only, idempotent, non-destructive, open-world, and do not support long-running tasks.
Scope caveat: validation only — transmission (Peppol, KSeF, SDI), archiving, and tax-authority reporting stay with your access point.
Note: the README also describes parse/generate/convert tools, but the schema exposes only validate and check-account.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@beliq-mcpvalidate this XRechnung invoice file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
beliq-mcp
An MCP server for the beliq e-invoice API. It lets MCP clients (Claude Desktop, Claude Code, Cursor, and others) validate, parse, generate, and convert electronic invoices (XRechnung, ZUGFeRD, Factur-X, Peppol BIS, and the other formats the API carries), and explain exactly what fails. Every verdict carries the check depth the API states for it, or says that none was stated.
beliq produces and checks the document. Transmission (Peppol, plateforme agréée, KSeF, SDI), archiving, and tax-authority reporting stay with your access point.
Tools
beliq_validate_einvoice- validate an invoice XML (inline or by file path) or a Factur-X/ZUGFeRD PDF (by file path). Returns the verdict, how deep the check went, the detected format and profile, the ruleset versions it was checked against, and every error and warning with its rule id, severity, location, and message. For a PDF the verdict is about the embedded XML; the PDF itself is not checked.beliq_parse_einvoice- parse a UBL/CII XML invoice or a Factur-X/ZUGFeRD PDF into a structured EN 16931 invoice (fields such as number, dates, currency, seller, buyer, lines and totals). Returns the detected format and profile, the extracted invoice, and warnings that say what the document holds and the parsed invoice does not.beliq_generate_einvoice- generate a document from an EN 16931 invoice object. XML comes back inline; a PDF is written to theoutputPathyou give. By default (verify) the API validates the document before returning it, and a document that fails comes back as a tool error with the failed rules. The tool description tells the model to ask for missing invoice data instead of making it up.beliq_convert_einvoice- convert a document from one EN 16931 format to another. An XML source comes back as XML, inline, for every target,facturxandzugferdincluded. A hybrid PDF source sent tofacturxorzugferdcomes back as a PDF, written tooutputPath: the PDF as sent, its container not checked, when its embedded XML already is the target; otherwise that PDF re-wrapped around the converted XML and passed by veraPDF against PDF/A-3b. With a test key the PDF is watermarked after any veraPDF check. The convert reference has the detail. Reports how many source elements the engine recorded as having no target equivalent.beliq_check_account- verify the configured API key and report the plan and remaining quota. CallsGET /v1/me, which draws no quota; useful as a connection and credential smoke test.
Related MCP server: invoicehub-mcp
Installation
Requires Node.js >= 20.15. Published to npm, so clients can run it with npx:
npx -y beliq-mcpThe server is configured entirely through environment variables (see below).
Configuration
Variable | Required | Default | Description |
| yes | - | API key from the beliq dashboard (API Keys). |
| no |
| How the key is sent: |
| no |
| Override for a self-hosted deployment; defaults to the production API. |
Client setup
Claude Code
claude mcp add beliq -e BELIQ_API_KEY=your-key -- npx -y beliq-mcpClaude Desktop
Add to claude_desktop_config.json (Settings > Developer > Edit Config):
{
"mcpServers": {
"beliq": {
"command": "npx",
"args": ["-y", "beliq-mcp"],
"env": {
"BELIQ_API_KEY": "your-key"
}
}
}
}Cursor
Add to ~/.cursor/mcp.json (or a project .cursor/mcp.json) using the same mcpServers block shown for Claude Desktop.
Reading a result
beliq_validate_einvoice returns a short text verdict plus a structured result:
validis the API's verdict: the document passed the rule packs and schemas beliq runs for its format, in the versions this result names. It does not mean every recipient, validation tool or tax authority accepts it. Warnings do not make a document invalid, with one case to read beside it:franceCtcBlockingRuleIds.verificationBadgeLabelis the check depth as English display text, and the text verdict prints it besideVALIDorINVALID. How verification works explains each depth. Where the API sends no label, the text sayscheck depth not statedand names no depth.verificationBadgeandverificationTierare the ids behind the label.franceCtcBlockingRuleIdslists the French CTC rule ids the API reports as ending a transmission through a French platform. It can be present wherevalidis true, and the text verdict then leads with it. The result stays a normal result, not a tool error.franceCtcApplied,franceCtcVersionandfranceExtendedCtcAppliedsay which French packs ran.pdfInputis present when the document was a PDF:attachmentName,attachmentFoundByandattachmentCandidatessay which embedded file the verdict is about, andcontainerCheckedis always false because the PDF itself is not checked.formatandprofileDetectedreport the detected syntax and business profile.schematronVersionis the ruleset revision the check ran against. The versions of the other packs and schema bundles that ran come inciusVersion,peppolVersion,facturxProfile,facturxVersion,italyFatturapaXsdBundle,italyFatturapaRuntimeVersion,italySdiMessaggiXsdBundle,italySdiMessaggiXsdVersion,spainFacturaeXsdBundle,spainFacturaeRuntimeVersion,sloveniaEslogXsdBundle,sloveniaEslogRuntimeVersion,polandKsefFa3XsdBundle,polandKsefFa3RuntimeVersion,romaniaRoCiusVersionandnetherlandsNlciusVersion, each present only when it applies.rulesetChannelis present when a ruleset channel was selected, which an organisation whose default channel ispreviousdoes with no input of this tool.rulesetFellBackandrulesetSunsetsOncome with it when they apply.sha256is the hash of the document that was checked,rulesetSha256andrulesetArtifactsfingerprint the rule files that ran, anddriftCheckedAtis when those files were last confirmed to match their upstream sources.verifiedis false only when no ruleset ran, which validate never returns; see generate below.errorsandwarningseach carryruleId,severity,location(an XPath when available), andmessage.errorCountandwarningCountare their lengths.
The structured result carries every field of the API's validation result. Its shape is checked against the SDK's type, so a field the API adds cannot go missing here without failing the build.
beliq_parse_einvoice returns a text summary plus a structured result:
format,profileDetectedandprofileUrnreport the detected syntax and profile;businessProcessIdandfranceCtcDetectedare present when the document states them.invoiceis the extracted invoice object, with EN 16931 fields such as number, dates, currency, seller, buyer, lines and totals. The parse reference lists every field. A field the API holds no value for is left out.warningssays what the document holds and the parsed invoice does not: each entry has acode, amessage, and, by code, afield, theterms(EN 16931 business groups) or theelements(paths with counts) concerned. The text summary lists them.
beliq_generate_einvoice returns a short text summary (with the XML document appended for XML output) plus a structured result:
outputisxmlorpdf, as requested, andcontentTypeis the matching media type (application/xmlorapplication/pdf).xmlis the generated document inline, present only for XML output.outputPathandbytesWrittenare set when the document was written to disk: always for a PDF, and for XML when you setoutputPath. The call never overwrites an existing file, so pick a path that does not exist.pdfKindis present only for PDF output:hybrid(a PDF/A-3 with the XML embedded, for facturx and zugferd) orvisualization(rendered pages with no XML inside, for xrechnung and peppol-bis, whose legal document stays the XML).schematronVersionis the ruleset (Schematron) revision the document was checked against.outputEnvelopeis the envelope the document is wrapped in, when the API names one.sha256is the lowercase-hex SHA-256 of the returned document bytes, sosha256sumon the file atoutputPathreproduces it.rulesetSha256is one combined fingerprint of the rule artifacts the document was checked against, present when a ruleset ran.livemodeis true for ablq_live_key and false for ablq_test_sandbox key, whose output is marked as a specimen and is not a production invoice.validationResultis the API's verdict on the generated document, with every field validate returns, the check depth inverificationBadgeLabelincluded; the text summary names that depth. The verdict is about the invoice XML, so for a PDF the text says so and names the kind of PDF. With the defaultverify: true, a document that fails validation comes back as a tool error that lists the failed rules. Withverify: falseno ruleset runs:verifiedis false,errorsandwarningsare empty because nothing checked the document, and the text saysnot validated.
beliq_convert_einvoice returns a short text summary (with the XML document appended for an XML target) plus a structured result:
outputis what came back, read from the response:xmlfor every target when the source is XML,facturxandzugferdincluded, andpdfwhen a hybrid PDF source went to afacturxorzugferdtarget.contentTypeis the matching media type.xmlis the converted document inline, present only when XML came back.outputPathandbytesWrittenare set when the document was written to disk: always for a PDF, and for XML when you setoutputPath. Like generate, it never overwrites an existing file.sourceFormatis the format the engine read, andtargetFormatthe format it produced (thetargetFormatyou asked for when the API does not name one).profileDetectedis the profile the engine recognised on the source document, when it recognised one.conversionToolsnames the toolchain that did the conversion, when the API names one.livemodeis true for ablq_live_key and false for ablq_test_sandbox key.lostElementsCountandlostElementscount and name the source elements the engine recorded as having no target equivalent. A loss the engine does not detect is not counted, so0does not say that every field of the source arrived.
A successful convert means the API validated the converted XML before returning it. For a facturx or zugferd target at profile en16931 that validation is the one for plain EN 16931 CII: no Factur-X profile schema is checked. It carries no verdict and no check depth. A converted document that fails comes back as a tool error that lists the failed rules.
A PDF (Factur-X / ZUGFeRD) must be passed by documentPath for validate, parse, and convert, not inlined as text.
Agent skill
skill/SKILL.md is a portable agent skill that teaches a model when to validate, how to read errors/warnings, and how to report a verdict with its check depth, using the tools above. Drop it into a skills directory for an agent that should validate invoices on request.
Development
This server depends on the published @beliq/sdk, which carries the request, transport, and result-shaping logic. package-lock.json is committed, and CI and the release build install from it with npm ci.
npm installnpm run build- compile todist/npm run typecheck- src and testsnpm run lint- ESLint with type information, whole repositorynpm test- unit tests (result summary) and an in-memory MCP round-trip with a fake SDK clientBELIQ_API_KEY=your-key npm run test:integration- live smoke tests against the real APInpm run scrub:check- check for em-dashes in source and docs
Run the built server directly for a quick check:
BELIQ_API_KEY=your-key node dist/index.jsLicense
Available Tools
2 toolsbeliq_check_accountbeliq: Check AccountARead-onlyIdempotent
Verify the configured beliq API key and report the plan and remaining quota. Calls GET /v1/me, which draws no quota. Use it as a connection and credential smoke test.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | |
| plan | No | |
| status | Yes | |
| message | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the HTTP endpoint (GET /v1/me) and that it draws no quota, adding valuable behavioral context beyond the annotations' readOnlyHint and idempotentHint. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: the first provides purpose and result, the second gives implementation detail and usage advice. Every word earns its place without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter smoke test tool with an output schema, the description sufficiently covers purpose, implementation, usage, and what is reported (plan and quota). It is complete for the task.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description logically does not need to elaborate on parameters. With 100% schema coverage of an empty object, a baseline of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool verifies the API key and reports plan/quota. It distinguishes from the sibling 'beliq_validate_einvoice' by specifying a different purpose (credential smoke test vs. E-invoice validation).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly recommends use as a 'connection and credential smoke test'. It does not mention when not to use or alternatives, but the simple nature of the tool and differentiation from the sibling make this adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
beliq_validate_einvoicebeliq: Validate E-InvoiceARead-onlyIdempotent
Validate an EU electronic invoice against authority-pinned, drift-checked rules and report whether it is compliant. Accepts a UBL or CII XML document (inline via document, or a file via documentPath), or a Factur-X / ZUGFeRD PDF via documentPath. Returns the verdict (valid or not), the detected format and profile, the ruleset (Schematron) version it was checked against, and every error and warning with its rule id, severity, location, and message. beliq validates the compliant document; transmission (Peppol, PDP, KSeF, SDI), archiving, and tax-authority reporting stay with your access point.
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Source syntax hint. 'auto' (default) detects CII vs UBL from the document. | |
| document | No | The invoice as XML text. Provide this OR documentPath, not both. | |
| franceCtc | No | Apply the French CTC (Factur-X / Chorus Pro) rule overlay during validation. | |
| documentPath | No | Path to an invoice file on disk: a UBL/CII XML, or a PDF carrying embedded XML (Factur-X / ZUGFeRD). Provide this OR document. |
Output Schema
| Name | Required | Description |
|---|---|---|
| valid | Yes | |
| errors | Yes | |
| format | Yes | |
| warnings | Yes | |
| errorCount | Yes | |
| warningCount | Yes | |
| profileDetected | No | |
| schematronVersion | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only, idempotent, non-destructive. Description adds valuable behavioral details: rules are authority-pinned and drift-checked, returns verdict, format, profile, ruleset version, and detailed errors/warnings with rule id, severity, location, message.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, first covers purpose and output comprehensively, second clarifies boundaries. No redundancy, every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given complexity (4 params, output schema present), description covers input formats, action, and output summary. It also sets expectations about what the tool does not do (transmission/archiving). Return values are detailed in output schema, so not needed in description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and parameters are well-described in schema. Description adds context: 'auto' default for format, mutual exclusivity of document vs documentPath, and French CTC overlay. Slight improvement over schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb 'validate' with specific resource 'EU electronic invoice'. Specifies scope (authority-pinned, drift-checked rules) and output (compliance verdict). Distinguishes from sibling tool 'beliq_check_account' by focusing on invoice validation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states the tool validates only, not for transmission/archiving/reporting. Describes accepted input types (UBL, CII, Factur-X/ZUGFeRD PDF). Lacks explicit when-not-to-use or direct comparison to sibling, but context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.1- First observed
beliq_check_account - First observed
beliq_validate_einvoice
TDQS
Scored across 2 tools
The two tools have completely different purposes: one is a simple credential and quota check, the other validates e-invoices. There is no overlap or ambiguity between them.
Both tools follow a consistent 'beliq_verb_noun' pattern (check_account, validate_einvoice), which is clear and predictable.
With only two tools, the server feels very minimal. While the scope is limited to validation and account status, one might expect additional supporting tools (e.g., listing supported formats or checking ruleset versions). However, the count is not extreme.
For the stated goal of validating EU e-invoices, the two tools cover the essential workflow: credential check and document validation. Minor gaps exist, such as no tool to retrieve ruleset metadata or list supported profiles, but the core functionality is present.
Maintenance
Related MCP Connectors
Validiert E-Rechnungen (ZUGFeRD/Factur-X, XRechnung) gegen EN 16931 mit Korrekturvorschlägen.
Validate XRechnung, Peppol BIS 3 and EN 16931 invoices with KoSIT; explain rules; check auto-repair
Validate, generate & convert EU e-invoices (UBL, CII, XRechnung, Factur-X) — EN 16931 pre-validated.
Validate XML and e-invoices (XSD, DTD, RelaxNG, EN 16931, Peppol, XRechnung), explain errors
Related MCP Servers
- AlicenseAqualityDmaintenanceValidates EU electronic invoices (Peppol, XRechnung, FatturaPA, etc.) and explains validation error codes, enabling AI coding agents to check invoice validity and get fixes before rejection.339 npmMIT
- AlicenseNot gradedqualityDmaintenanceEU e-invoice validation, as a developer API. Check whether an electronic invoice conforms to EN 16931 — the European standard behind France, Germany, Belgium, Poland and the 2030 ViDA mandate — with a single REST call. Structured JSON errors mapped to the official BR-* business rules. No enterprise sales call required.MIT
- AlicenseNot gradedqualityDmaintenanceValidates financial documents and payment files (SEPA, UBL/Peppol, camt, ACH) entirely locally.193 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to locally parse, validate, audit, explain, generate, and convert XRechnung and ZUGFeRD/Factur-X e-invoices using official rule sets, fully offline with no API keys required.Apache 2.0