Skip to main content
Glama
dmesh-io

lexoffice-mcp

by dmesh-io

lexoffice-mcp

MCP server (built with FastMCP) for creating invoices in Lexware Office (formerly lexoffice).

Tools

Tool

Purpose

create_invoice

Creates an invoice. Drafts by default; finalize=true creates an open invoice with a binding number.

find_contacts

Looks up customers by name, email or customer number to reference them via contact_id.

get_invoice

Returns the full invoice (line items, totals, status).

create_invoice supports one-time addresses or existing contacts, custom, service, material and text line items, net, gross and vat-free tax types, performance dates and periods, payment terms with early payment discount, and title, introduction and remark texts. It returns the invoice id, number, status, totals and deep links into Lexware.

The client respects the Lexware limit of 2 requests per second and retries 429 responses. Other errors are not retried, so a failing request never creates duplicate invoices.

Related MCP server: sevdesk MCP Server

Example

Ask Claude something like:

Create a draft invoice for Bike & Ride GmbH, Musterstraße 42, 79112 Freiburg, Germany: 8 hours of consulting at 120 EUR net with 19% VAT, payable within 14 days.

Claude calls create_invoice with a payload such as:

{
  "invoice": {
    "address": { "name": "Bike & Ride GmbH", "street": "Musterstraße 42", "zip": "79112", "city": "Freiburg", "country_code": "DE" },
    "line_items": [
      { "name": "Consulting", "quantity": 8, "unit_name": "Stunde", "unit_price": 120, "tax_rate_percentage": 19 }
    ],
    "payment_conditions": { "payment_term_label": "Zahlbar innerhalb von 14 Tagen", "payment_term_duration": 14 }
  }
}

and gets back the invoice number, totals and a link to open the draft in Lexware.

Setup

  1. Create an API key at https://app.lexware.de/addons/public-api.

  2. Clone this repository. No install step is needed: uv run --with resolves the dependencies (fastmcp, httpx) on the fly when the server starts.

Run the server manually to check it starts:

LEXWARE_API_KEY=your-api-key uv run --with "fastmcp>=4" --with httpx /absolute/path/to/lexoffice_mcp/main.py

Install into Claude Code

claude mcp add lexware --scope user \
  -e LEXWARE_API_KEY=your-api-key \
  -- uv run --with "fastmcp>=4" --with httpx /absolute/path/to/lexoffice_mcp/main.py

Check the connection with claude mcp list or /mcp inside Claude Code. The key is stored in plain text in your Claude Code configuration, so use a key dedicated to this integration and revoke it when no longer needed.

Install into Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "lexware": {
      "command": "uv",
      "args": ["run", "--with", "fastmcp>=4", "--with", "httpx", "/absolute/path/to/lexoffice_mcp/main.py"],
      "env": { "LEXWARE_API_KEY": "your-api-key" }
    }
  }
}

Configuration

Variable

Default

Description

LEXWARE_API_KEY

required

Lexware public API key.

LEXWARE_BASE_URL

https://api.lexware.io

API gateway.

LEXWARE_APP_URL

https://app.lexware.de

Used for invoice deep links.

Development

uv sync
uv run pytest

Tests run the server in memory against a mocked Lexware API, so no API key is needed.

License

MIT, see LICENSE.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables the generation of professional PDF invoices and their distribution via email using customizable templates. It allows users to create, manage, and send invoices with standard business fields like tax rates and line items through natural language.
    3
    9 npm
    2
    MIT
  • F
    license
    B
    quality
    F
    maintenance
    Enables integration with sevdesk accounting software for managing contacts, invoices, vouchers, bank accounts, and articles through natural language.
    34
    23
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to create and manage e-invoices through natural language, supporting EU compliance formats like ZUGFeRD and XRechnung, as well as US plain PDF invoices.
    7
    -
  • A
    license
    A
    quality
    B
    maintenance
    Enables MCP-capable assistants to query and manage Lexware Office contacts, sales documents, vouchers, files, payments, webhooks, and reference data via the Lexware Office public API. Adds bank reconciliation tools for matching bank statement CSVs against Lexware vouchers or scanned receipt PDFs.
    4
    MIT