Skip to content

Home

Typed Python clients for Romania's ANAF tax-authority web services — e-Factura (electronic invoicing), e-Transport (goods transport), and the public no-auth registries (VAT/taxpayer lookups, financial statements) — plus a local MCP server that exposes them as Claude Cowork skills.

anafpy is a thin transport client — no persistence, no accounting logic. For e-Factura there are two ways out: bring the invoice XML your own invoicing system produced (the strongly recommended path — anafpy validates, files, tracks, and never re-composes it; ANAF's SPV purges filed messages after ~60 days, so your system of record stays yours), or, with no upstream system at all, compose a complete CIUS-RO invoice or credit note from plain business fields with the authoring models — totals and the VAT breakdown computed for you. Documents you read back come wrapped in a friendly flat read view for easy display. e-Transport is fully translated too: you author declarations, UIT deletions, confirmations, and vehicle changes from structured fields, no XML handling needed.

Requires Python 3.12+. Built on httpx and Pydantic v2. Licensed Apache-2.0 — independent / unofficial, not affiliated with ANAF, provided as-is.

Two ways in

The documentation is organized for two very different readers — pick your track:

You want ANAF operations inside Claude (Claude Desktop, Claude Code, Cowork) — an accountant's track, no programming involved. anafpy ships a local MCP server: Claude can look up business partners, work your e-Factura inbox (list, download, save PDFs), and file e-Transport declarations with a human confirmation step.

You want the Python library — typed async clients over ANAF's APIs, for your own software.

Extras

  • ANAF API reference — a compiled, English-language local reference of ANAF's own APIs (OAuth, e-Factura, e-Transport, public services), with per-section provenance back to ANAF's original documents.
  • Contributing or curious about the internals? The design rationale lives in DESIGN.md in the repository — developer material, kept next to the code.