marselsel/Lexware-MCP-Server

View on GitHub ↗

Self-hostable MCP server with OAuth 2.1 — connect Claude, ChatGPT, or any other MCP-capable AI to your Lexware Office bookkeeping.

27 ★8 forksTypeScriptUpdated 22d ago

What you need to know

Self-hostable MCP server for the Lexware Office accounting API — run your own instance (Docker), connect it to Claude, and let an agent read invoices, vouchers, contacts, and articles, optionally draft new ones, and (opt-in) issue legally binding finalized documents.

Install

git clone https://github.com/marselsel/Lexware-MCP-Server && cd Lexware-MCP-Server
cp .env.example .env && docker compose up --build
npm install && npm run build && LEXWARE_API_KEY=... MCP_AUTH_TOKEN=... npm start

Usage

  • Bring your own Lexware API key; the server is single-tenant per deployment and never stores anyone else's credentials.
  • Auth: OAuth 2.1 (required for web MCP / custom connectors in the Claude app, claude.ai, ChatGPT) or a static bearer token (Claude Code/Claude Desktop only).
  • Feature tiers via env: Read (always on), Drafts (LEXWARE_ENABLE_DRAFTS, default on), Finalize (LEXWARE_ENABLE_FINALIZE, default off); LEXWARE_READ_ONLY=true hard-forces read-only.
  • File receipts without base64 through the model: create-upload-ticket, then drag-and-drop or curl, then get-upload-result.

Key features

  • 62 tools across the three tiers covering profile, contacts/articles, voucherlist, full documents, PDF rendering, file download, payments, and deeplinks.
  • Server-side upload-ticket flow keeps file bytes out of the model transcript (24-byte single-use tickets, 15-min validity).
  • upload-file-from-url with triple SSRF protection: host allow-list, resolved-address checks, and connection pinning (https only, 20 MB / 30 s cap).
  • OAuth 2.1 with dynamic client registration, audience verification, and optional domain allow-list.
  • Rate-limited (~2 req/s, token bucket), retry-aware Lexware client that never retries non-idempotent POSTs.

Best for

German-accounting-focused teams and solo bookkeepers who want an AI agent to read, draft, and file Lexware Office documents and receipts from chat.

Caveats

  • It brokers real accounting data — finalized invoices are legally binding and you are responsible for their tax/legal correctness; MIT, no warranty.
  • Static bearer auth does not work with web custom-connector UIs — OAuth is required for the Claude app, claude.ai web, and ChatGPT.
  • Run a single instance: the rate limiter is per-process and upload tickets live in process memory (a restart voids open tickets).
  • The server refuses to start without either OAUTH_ISSUER or MCP_AUTH_TOKEN unless MCP_ALLOW_UNAUTHENTICATED=true (trusted local use only).
  • Serve over HTTPS; expose GET /status as the health check.
Platforms: Local · RemoteClients: Claude Code · Claude Desktop · Claude · ChatGPT

Reviewed 2026-08-18

Topics

accountingchatgptclaudecloud-runlexofficelexwaremcpmcp-servermodel-context-protocolself-hostedskybridge
Stars
27★
Forks
8
Language
TypeScript
License
MIT
Created
2026-06-02
Last push
2026-08-13