# invapi-mcp [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/invapi-org/invapi-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 203  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/invapi-mcp

## Description
Extract, create, convert & validate invoices (UBL, CII, XRechnung, ZUGFeRD, PDF, Excel)

## Tools
Capabilities this server exposes over MCP:

- **invapi_convert_json_to_ubl** — Converts an Invoice JSON object to UBL (Universal Business Language) XML format. Optionally saves the XML to a file. Returns the UBL XML string.
- **invapi_convert_json_to_cii** — Converts an Invoice JSON object to CII (Cross-Industry Invoice) XML format. Optionally saves the XML to a file. Returns the CII XML string.
- **invapi_convert_ubl_to_json** — Converts a UBL XML invoice to the Invapi JSON Invoice format. Provide either the XML content as a string or a path to an XML file.
- **invapi_convert_cii_to_json** — Converts a CII XML invoice to the Invapi JSON Invoice format. Provide either the XML content as a string or a path to an XML file.
- **invapi_convert_json_to_xlsx** — Converts one or more Invoice JSON objects to an Excel (.xlsx) file. The output_path is required since Excel files are binary.
- **invapi_create_zugferd_pdf** — Creates a ZUGFeRD/Factur-X PDF by embedding CII XML invoice data into an existing PDF. Requires both a source PDF file and an Invoice JSON object. The invoice is converted to CII XML, validated, and embedded into the PDF.
- **invapi_convert_zugferd_to_json** — Extracts the embedded CII XML from a ZUGFeRD/Factur-X PDF and converts it to the Invapi JSON Invoice format. The PDF must contain embedded XML invoice data.
- **invapi_validate_ubl** — Validates a UBL XML invoice against XRechnung 3.0.2 (EN 16931) rules. Provide either the XML content as a string or a path to an XML file.
- **invapi_validate_cii** — Validates a CII XML invoice against XRechnung 3.0.2 (EN 16931) rules. Provide either the XML content as a string or a path to an XML file.
- **invapi_validate_xml** — Validates an XML invoice against XRechnung 3.0.2 (EN 16931) rules. The format (UBL or CII) is auto-detected. Provide either the XML content as a string or a path to an XML file.
- **invapi_extract_invoice** — Extracts structured invoice data from a PDF or image file using AI. Returns the invoice as a JSON object. Optionally pass known parties for better accuracy, custom instructions for the AI, categories for classification, and enable QR code extraction.
- **invapi_extract_qr** — Scans an image file for QR codes and returns the parsed data as JSON. Useful for extracting payment information from invoice QR codes.
- **invapi_get_user** — Returns the current Invapi user's email, role, and remaining API credits (extraction, conversion, validation, QR). Use this to check your credit balance.
- **invapi_batch_convert** — Process multiple invoice conversion operations in a single request (up to 100). Each operation is processed independently — failures in one do not affect others.

Supported operations:
  - json_to_ubl: Invoice JSON → UBL XML
  - json_to_cii: Invoice JSON → CII XML
  - ubl_to_json: UBL XML string → Invoice JSON
  - cii_to_json: CII XML string → Invoice JSON
  - zugferd_to_json: ZUGFeRD data → Invoice JSON

Each operation needs an 'id' (returned in results), an 'operation' type, and 'input' data.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "invapi-mcp": {
    "command": "npx",
    "args": ["-y","@invapi/mcp-server"],
    "env": {
      "INVAPI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `INVAPI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What invapi-mcp MCP server does

The invapi-mcp MCP server exposes the Invapi E-Invoicing API as MCP tools for invoice conversion, validation, extraction, account lookup, and batch processing. It works with JSON invoice data, UBL XML, CII XML, XRechnung validation, ZUGFeRD PDFs, Excel output, regular PDFs, and images.

Conversion tools translate JSON invoices into UBL XML, CII XML, or Excel files. They also convert UBL and CII documents back into JSON, create a ZUGFeRD PDF from a PDF and JSON invoice, and recover JSON invoice data from a ZUGFeRD PDF. The batch tool can run up to 100 conversion operations in one request.

Extraction tools handle document and image inputs. One extracts structured invoice data from a PDF or image, while another reads QR code data from an image. A separate account tool reports user information and remaining API credits.

## How it works

The server runs as an npm package and forwards MCP tool requests to the Invapi API. Each operation accepts the relevant invoice or document data and returns the conversion, extraction, or validation result supplied by the API. The available validation operations cover UBL and CII separately, plus XML validation with automatic format detection.

UBL and CII validation targets XRechnung 3.0.2 under EN 16931. This makes the validation tools relevant for workflows that need to check those invoice formats against that specification before further processing or delivery.

The server is intended for MCP clients that can launch an npm-based local command. The documented examples configure it for Claude Desktop and Claude Code.

## Setup and configuration

Install the package globally with npm, or run it through `npx` as shown in the client configuration. An Invapi API key is required. Set it in the `INVAPI_API_KEY` environment variable; the key is obtained from invapi.org.

For Claude Desktop, add an MCP server entry that launches `npx -y @invapi/mcp-server` and passes the API key through the entry's environment settings. Claude Code can add the same server with an environment variable and an npm command.

A local development setup can be created by cloning the repository, installing dependencies with `npm install`, and starting the development command with `npm run dev`. API usage depends on the account's available credits, which can be checked through the user information tool.

## Tools and capabilities

The invapi-mcp MCP server groups its tools into four practical areas:

- Conversion between JSON, UBL, CII, Excel, and ZUGFeRD PDF representations.
- Validation of UBL, CII, or automatically detected XML formats.
- Extraction of invoice fields and QR code content from documents or images.
- Account information and remaining credit lookup.
- Batch conversion for up to 100 operations in a single request.

The tool names identify the expected input and output formats, such as `invapi_convert_json_to_ubl`, `invapi_convert_cii_to_json`, and `invapi_create_zugferd_pdf`. This can help an agent select a format-specific operation rather than treating all invoice processing as an undifferentiated request.

## Limitations and notes

The server requires an Invapi API key and depends on the Invapi API for its invoice operations. The documented validation scope is XRechnung 3.0.2 (EN 16931) for UBL and CII. Batch processing is limited to 100 conversion operations per request.

The provided setup documentation shows npm and `npx` usage and names Claude Desktop and Claude Code as client examples. It does not document additional configuration options, alternative authentication methods, or conversion limits beyond the batch limit stated above.

The project is released under the MIT license.

_Full upstream README: https://allmcps.com/mcp/invapi-mcp/readme_

