Metadata-Version: 2.5
Name: tallystick-mcp
Version: 1.0.1
Summary: MCP server that reads, validates and writes e-invoices on your own machine. XRechnung, ZUGFeRD, Factur-X, UBL, CII, Peppol.
Project-URL: Homepage, https://tally-stick.com/mcp
Project-URL: Setup, https://tally-stick.com/mcp/setup
Author-email: Tallystick <info@tally-stick.com>
License: MIT
License-File: LICENSE
Keywords: cii,e-invoice,en16931,factur-x,mcp,model-context-protocol,peppol,ubl,xrechnung,zugferd
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Python: >=3.10
Requires-Dist: cryptography>=42.0
Requires-Dist: fastmcp>=2.0
Requires-Dist: tallystick-core>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# Tallystick MCP

Read, check and write e-invoices from inside your agent. Everything runs on your
own machine: there is no upload path in this package.

A UBL or CII invoice is six to nine hundred lines of XML, and a ZUGFeRD invoice
hides its XML inside a PDF where an agent cannot reach it at all. This turns
either one into about forty lines of clean JSON, with every amount as an exact
decimal string rather than a float.

## Install

```
uvx tallystick-mcp
```

That is the whole command, and it is the same in every client. No Python
environment to prepare.

Setup snippets for Claude Desktop, Claude Code, Cursor, VS Code, Windsurf,
Cline, Zed, Gemini CLI and the OpenAI Agents SDK are at
**https://tally-stick.com/mcp/setup**.

Minimal config for a client that uses the common shape:

```json
{
  "mcpServers": {
    "tallystick": {
      "command": "uvx",
      "args": ["tallystick-mcp"],
      "env": { "TALLYSTICK_LICENSE_KEY": "TS-XXXX-XXXX-XXXX-XXXX" }
    }
  }
}
```

## Tools

| Tool | What it does | Licence |
|---|---|---|
| `detect_invoice_format` | Names the syntax, and says whether a PDF carries embedded XML | Free |
| `read_invoice` | One file to canonical JSON: parties, lines, tax, totals | Free |
| `validate_invoice` | Consistency and mandatory-field findings, with codes | Free |
| `read_invoices_table` | A folder as one flat table, one row per invoice | Key |
| `export_invoices` | Excel, CSV, JSON or QBO out of many invoices | Key |
| `build_einvoice` | Structured data to compliant EN 16931 XML | Key |

The three free tools need no key and no account. Install it and they work.

## Formats

Reads UBL 2.x, UN/CEFACT CII, Factur-X, ZUGFeRD, XRechnung, Peppol BIS, and
digital PDFs through per-supplier templates.

Writes UBL 2.1 and CII in nine profiles: `xrechnung-3.0`, `peppol-bis-3.0`,
`en16931`, `nlcius`, `pint-aunz`, `pint-jp`, `pint-my`, `pint-sg`, `pint-ae`.
It refuses to emit XML when a mandatory field is missing and tells you which
one, because a file that is quietly non-compliant is worse than no file.

## Amounts are strings

Every monetary value comes back as a string holding an exact decimal:

```json
{ "totals": { "net": "1000.00", "tax": "190.00", "gross": "1190.00" } }
```

Parse them as decimals. Float arithmetic on invoice totals is how a reconciled
ledger stops reconciling.

## What leaves your machine

One request, once: activation sends your licence key and an opaque hash of the
machine, and gets back a signed token. After that the token is checked locally
against a public key compiled into this package, and the machine can stay
offline until it expires.

No filename, no path and no invoice content is ever sent anywhere. There is no
code here that could send one.

## Licence

MIT for this package. A commercial licence key unlocks the three volume tools:
one seat, one payment, no subscription. https://tally-stick.com/mcp

---

mcp-name: com.tally-stick/tallystick
