VIES VAT Validator MCP

A Model Context Protocol server for EU VAT identification numbers. It runs a free, offline format pre-check first, then — only when the number is well-formed — calls the European Commission's official VIES service to confirm whether the number is really registered, returning the trader name and address when it is. Four tools, three resources and two prompts over one Streamable HTTP endpoint, with every failure reported as a bilingual error code that names the next action.

Sartbot indexes this server; it does not operate it. The canonical source is the Apify Store listing, and the code is on GitHub under the MIT licence. Endpoint URLs and prices can change — trust those pages over this one.

What it exposes

Four tools: one live validator, one offline format checker and two reference lookups.

  • validate_vat

    The full check: free local format validation, then a live VIES lookup that returns validity plus the registered name and address. Cache hits and format failures never reach the network.

    • live
    • vies
    • structured
    vat · countryCode + vatNumber · live · useCache

    $0.0005 per live call

  • check_vat_format

    Pure regex format validation against the per-country rule — no network, no cost. Reports the pattern it matched and the normalised number.

    • offline
    • regex
    • free
    returns pattern + normalized

    Free

  • list_supported_countries

    Every covered jurisdiction with its Chinese and English name and EU membership flag — the EU 27 plus Great Britain and Northern Ireland.

    • coverage
    • bilingual
    • reference
    29 jurisdictions

    Free

  • get_error_codes

    The whole error table: code, severity, a Chinese and an English explanation, and a remediation step in both languages. Covers input problems, unsupported countries and every VIES failure mode.

    • errors
    • remediation
    • bilingual
    中 / EN

    Free

Resources and prompts

Besides the tools, the server publishes three readable resources and two canned prompts.

  • vat://error-codes

    The error-code table as JSON, for a client that wants to localise or branch on a code without calling the tool.

    Resource

  • vat://supported-countries

    The jurisdiction list as JSON, keyed the same way list_supported_countries returns it.

    Resource

  • vat://spec

    Service metadata: version, upstream data source, pricing model and capability counts.

    Resource

  • vat_compliance_guide

    A five-step cross-border compliance procedure: pre-check the format, verify live, retain the proof, retry on VIES flakiness, consult the error table.

    Prompt

  • explain_vat_result

    Turns a raw validation payload into a plain-language verdict on conclusion, provenance and whether anything else needs doing.

    Prompt

Connect

Two transports: a hosted Streamable HTTP endpoint on Apify Standby, or stdio for local desktop clients.

  • hosted endpoint · mcp-remote
    {
      "mcpServers": {
        "vies-vat-validator-mcp": {
          "command": "npx",
          "args": [
            "-y", "mcp-remote",
            "https://neeenja--vies-vat-validator-mcp.apify.actor/mcp",
            "--header", "Authorization: Bearer ${APIFY_TOKEN}"
          ],
          "env": { "APIFY_TOKEN": "<your-apify-api-token>" }
        }
      }
    }
  • local · stdio
    $ git clone https://github.com/PanStories/vies-vat-validator-mcp
    $ cd vies-vat-validator-mcp && npm ci && npm run build
    
    # then, in your MCP client:
    {
      "mcpServers": {
        "vies-vat-validator-mcp": {
          "command": "node",
          "args": ["dist/index.js"]
        }
      }
    }

In remote mode the server answers POST /mcp for the protocol and recycles after two idle minutes, so an untouched endpoint costs nothing. Requests carry your own Apify API token as a Bearer header; self-hosting puts your endpoint at https://<username>--vies-vat-validator-mcp.apify.actor/mcp.

Pricing

Pay per event on the hosted endpoint. No subscription, no seat count, no charge when nothing calls it.

  • $0.0005 · live VIES validation

    Charged once per validate_vat call that actually reaches the VIES service — 2,000 lookups cost a dollar.

    Primary billable event

  • Always free

    The MCP handshake (initialize), tools/list, check_vat_format, list_supported_countries and get_error_codes cost nothing, as do cache hits within the 24-hour window.

    Discovery is not metered

  • Why it stays cheap

    Upstream VIES itself is a free public service with no API key, and the 24-hour cache means a repeat question about the same number bills once, not every time.

    Free upstream + cache

  • The differentiator

    Every failure comes back as a structured bilingual code with a remediation step in both languages, so an agent can explain a VAT problem to a Chinese-speaking operator without translating anything itself.

  • Coverage

    The EU 27 plus Great Britain (GB) and Northern Ireland (XI) — 29 jurisdictions, each with its own regex rule rather than one shared pattern.

  • Two-stage design

    Format first, network second. A malformed number is rejected locally and free, which is the majority of real-world input errors.

  • Runtime

    Node.js 22 on TypeScript, built on the official @modelcontextprotocol/sdk and shipped as an Apify Docker image. No XML library — the SOAP envelope is hand-built and parsed with regexes.

  • Licence

    MIT. Clone, fork and self-host without a commercial agreement; the hosted endpoint is simply the convenient default.