Skip to main content
Glama
finanzamt

finanzamt

by aliildan

finanzamt

License: MIT Node.js ≥ 22.13 CI no telemetry

An Austrian L1 return is a puzzle of allowances, the documents that prove them, and the Kennzahl each amount goes into. finanzamt is a local, source-cited knowledge base of the official texts, served to Claude Code as an MCP server and plugin, plus a planner that turns your documents into a reviewed list of boxes. You file; it types: an optional typing aid enters that list into a FinanzOnline tab you logged into yourself, and never logs in, signs or submits.

Proof in 60 seconds (after the one-time ingest):

npm ci && npm run build && npm run ingest     # ingest: once, needs the network
npm run verify                                # no network, none of your documents
PASS  build (tsc -b)
PASS  test suite (vitest)              Tests  183 passed (183)
PASS  check:lang · check:i18n · check:env · check:secrets · check:refs
PASS  knowledge base built
PASS  MCP handshake + tools/list + search_knowledge + kb_status
      search_knowledge("Pendlerpauschale 2025"): covered, 6 hits; first: Erhöhter Verkehrsabsetzbetrag … 2025
        https://www.bmf.gv.at/dam/jcr:436f8c01-38e0-41bf-b904-c0e62a862bf1/251117_Steuerbuch2026_DE_BF.pdf
        sha256 ce97c4f53eef1dc5ed5ea57ceab696d115e6dbc996488c9cde40dba71f5e22df · tax year 2025
        „Bei Anspruch auf ein Pendlerpauschale erhöht sich der Verkehrsabsetzbetrag auf 838 Euro, wenn das Einkommen
         14.812 Euro im Kalenderjahr nicht übersteigt.“
PASS  synthetic case → profile → fill plan (fixtures/case/incoming)
PASS  plugin launcher (FINANZAMT_ROOT unset)
PASS: 11/11 steps passed

What you get

  • A Claude Code plugin with seven commands: /finanzamt:ask, :field, :facts, :check, :update, :fill and :probe (examples).

  • An MCP server (stdio) for any MCP client, with the tools listed below.

  • Your case as a reviewed plan: npm run case and npm run plan (Your case).

  • A typing aid, not a filer: npm run fill and npm run probe (Typing).

  • A curator that re-fetches the sources weekly and quarantines every change for your review (Keeping it current).

Related MCP server: Legal MCP Server

Quality, in numbers

From npm run status and npm test on 2026-11-28; run them to get yours.

What

Today

Command

Tests

183 in 25 files, no network, synthetic data

npm test

Facts

32, all verified (quote found in the fetched text, value written in the quote); 22 for 2025, 10 for 2026

npm run status

Facts citing a source of another tax year

0

npm run status

Sources in the KB

76: 60 unchanged, 8 new, 7 unpublished (2026 forms), 1 skipped; 23 tax-year specific

npm run status

Law texts pinned to FassungVom=<year>-12-31

3 of 10 in the KB; 6 more pinned versions are defined and wait for the curator

npm run status

Freshness

not ok: 1 source update waiting for review

npm run status, /finanzamt:check

Form maps 2025: each box is verified (printed Kennzahl, official Ausfüllhilfe and label agree, and the BMF XSD lists it), unconfirmed (only the printed form names it), conflict (sources disagree; all candidates shown, none picked) or unlabelled (no Kennzahl printed; none is invented).

Form

Fields

verified

unconfirmed

conflict

unlabelled

Map

XSD oracle

L1

75

4

12

0

59

mapped

2025

L1ab

33

0

11

0

22

mapped

2025

L1i

58

0

12

0

46

mapped

2025

L1k

45

0

0

0

45

mapped

2025

L16

167

0

9

0

158

mapped

none

E1

273

0

141

23

109

experimental

none

E1 has no oracle because BMF publishes no separate E1 schema: E1 is one of several declarations in BMF_XSD_Jahreserklaerungen_<year>.xsd, nested in a structure this parser does not read (npm run form-map -- --year 2025 --dry-run prints this per form).

How it decides

official sources ─ fetch: robots.txt, crawl-delay, conditional GET ─▶ data/raw/<id>/<sha256>.pdf|html (never overwritten)
   ▼ extract: PDF text with page numbers, HTML sections, RIS paragraphs
facts.json ─ verify: quote ⊂ fetched text · value written in the quote · source pinned to the fact's tax year
   ▼                                                    └─▶ verified | unverified (refused by every calculation)
form maps ─ printed Kennzahl × Ausfüllhilfe × BMF XSD ─▶ verified | unconfirmed | conflict | unlabelled
   ▼
SQLite FTS5 index ─▶ MCP server (stdio, read-only, no network) ─▶ Claude: cite, then check_numbers on the draft

The rule: a claim without a verbatim quote from a fetched document does not ship. A fact whose quote is not in the source text is unverified (core/test/facts.test.ts), and compute_allowances refuses it (core/test/compute.test.ts); a question the index does not cover returns covered: false, and the answer is "no source" (core/test/kb.test.ts); check_numbers reports every number in a draft that no cited text states (mcp/test/protocol.test.ts).

What it refuses to do

Each line is enforced by the test named.

  • No login, no second factor, no signature, no submission. The fill tool stops on login, second-factor and submission pages and types nothing (browser/test/fill.test.ts). Its DevTools client sends only read, focus, insert-text and screenshot commands, and refuses clicks, key presses and navigation by name.

  • No typing over a non-empty box, including a value you changed by hand (browser/test/fill.test.ts).

  • No invented Kennzahl. A box without a printed number stays unlabelled, and a disagreement stays conflict (core/test/formmap.test.ts).

  • No silent answer on a stale KB. Without a KB, every tool answers only "run npm run ingest" (mcp/test/prereq.test.ts). With stale sources, pending reviews or broken quotes, each command must start its reply with Knowledge base not fresh and the problems. mcp/test/plugin.test.ts checks that this instruction is step 0 of every answering command.

  • No model of its own and no API key. Claude Code is the model.

  • No network from the MCP server. mcp/test/boundary.test.ts fails if mcp/src or core/src gains a network, process or browser import.

Install

Requirements: Node.js ≥ 22.13 (CI runs 22 and 24) on Linux or macOS (Windows: WSL2), and Claude Code.

git clone <this repository> finanzamt && cd finanzamt
npm ci && npm run build
npm run ingest                                 # once; afterwards npm run ingest:offline rebuilds from data/raw
claude plugin marketplace add "$(pwd)"
claude plugin install finanzamt@finanzamt

The knowledge base is not shipped. If you downloaded form PDFs by hand, put them in data/raw/forms/<FORM>_<YEAR>.pdf. The plugin's launcher finds the checkout above the plugin directory (node plugin/bin/finanzamt-mcp.mjs --which prints its choice). If Claude Code runs a copy of the plugin elsewhere, set the plugin option checkout or FINANZAMT_ROOT. Without the plugin: claude mcp add finanzamt -- node "$(pwd)/mcp/dist/server.js", or the same command/args in any MCP client's config. FINANZAMT_DATA_DIR in the clone's .env moves the KB.

Testing it yourself

  1. Build and ingest (above), then npm run verify and expect PASS: 11/11 steps passed. A missing piece fails its step with the command that fixes it.

  2. Try each command in Claude Code:

Command

Example

/finanzamt:ask

/finanzamt:ask Pendlerpauschale 2025 bei 22 km

/finanzamt:field

/finanzamt:field 718

/finanzamt:facts

/finanzamt:facts 2025 familienbonus

/finanzamt:check

/finanzamt:check

/finanzamt:update

/finanzamt:update --dry-run

/finanzamt:fill

/finanzamt:fill 2025 (dry run; --apply only when you ask for it)

/finanzamt:probe

/finanzamt:probe 2025 L1

  1. Put your documents in incoming/ and run npm run plan -- --year 2025 (Your case).

  2. Run the browser steps (Typing the plan into FinanzOnline).

Example

claude -p "/finanzamt:ask Pendlerpauschale 2025" (shortened):

For 2025 the full kleines Pendlerpauschale is 696 € a year for 20 to 40 km, 1.356 € for more than 40 to 60 km
and 2.016 € for more than 60 km [1]. […] You fill in Kennzahl 718 (Pendlerpauschale) and Kennzahl 916
(Pendlereuro) together […] [5].

[1] Kleines Pendlerpauschale – Jahresbetrag 2025 — https://www.bmf.gv.at/dam/jcr:436f8c01-…/251117_Steuerbuch2026_DE_BF.pdf
    sha256 ce97c4f53eef1dc5ed5ea57ceab696d115e6dbc996488c9cde40dba71f5e22df · fetched 2026-11-26 · tax year 2025
    „mind. 20 km bis 40 km 58,00 € 696,00 € mehr als 40 km bis 60 km 113,00 € 1.356,00 € mehr als 60 km 168,00 € 2.016,00 €“

Your case: profile and fill plan

Put your documents in incoming/ (git-ignored; FINANZAMT_INCOMING_DIR moves it): Lohnzettel PDFs, receipts under incoming/receipts/<category>/, and your answers in incoming/stated.json (npm run case -- --keys lists the keys). npm run case builds the profile, in which every value carries its evidence: a document page and quote, your statement, or a receipt sum. npm run plan turns the profile into boxes. Only verified boxes are filled; an unconfirmed one is filled only after you confirm it (--confirm L1:717 --checked "…"). The plan file (incoming/plan-<year>.json) is the single source for filling: the browser tool types exactly its rows and derives nothing at fill time.

The synthetic case in fixtures/case/incoming has two children, 22 km, 40 home-office days, 120 € Gewerkschaft, 696 € Pendlerpauschale, 50 € Pendlereuro and two Fachliteratur receipts. FINANZAMT_INCOMING_DIR=fixtures/case/incoming npm run plan -- --year 2025 prints (trimmed):

fill plan 2025: 3 box(es) to type, 13 left empty. Nothing has been typed.

  form  item     KZ          value unit conf.  field       evidence
  L1    9.1      718        696,00 EUR  high   verified    stated 2026-01-15
  L1    9.2      916         50,00 EUR  high   verified    stated 2026-01-15
  L1    10.2.4   720        135,40 EUR  medium verified    sum of 2 receipt total(s)
                                                             receipts/fachliteratur/rechnung-0042.pdf p.1 "Summe EUR 89,90"
                                                             receipts/fachliteratur/rechnung-0107.pdf p.1 "Gesamtbetrag 45,50"
left empty:
  L1    10.1.1   717  wk.gewerkschaft: field L1:717 is unconfirmed (only the printed form names it). Check the box on
                      the PDF, then: npm run plan -- --year 2025 --confirm L1:717 --checked "<what you checked>"
  L1    10.2.3   719  wk.arbeitsmittel: no value in the case profile
  L1k   -        -    children: the plan does not fill L 1k (Familienbonus Plus) yet: its boxes are not mapped with
                      Kennzahlen; enter the children yourself
  -     -        -    home_office.days: informational; the employer reports Telearbeitstage on the Lohnzettel
checks:
  [OK] werbungskosten_pauschale: Werbungskosten with Anrechnung (L 1 items 10.2.x): 135,40 € exceed the
       Werbungskostenpauschale of 132,00 € (by 3,40 €). Items 10.1.x (120,00 €) are without Anrechnung.
  [INFO] familienbonus: child 2 (born 2007-05-10): 5 month(s) under 18 × 166,68 = 833,40 € for 2025, assuming
       Familienbeihilfe in every month under 18; the 7 month(s) from 18 are not counted: […] state
       familienbeihilfe_months for this child in stated.json if you received it […]
  [WARN] pendlereuro_distance: Pendlereuro 50,00 € vs distance 22 km × 2,00 €/km = 44,00 €: they differ; the
       Pendlerrechner result can be lower for fewer commuting days, check it
  [WARN] employer_pendlerpauschale: the Lohnzettel shows a Pendlerpauschale of 696,00 already considered by the
       employer (lohnzettel-2025.pdf p.1); read the label of L 1 item 9.1 before entering the amount again

Each check prints the sources it relies on, with the verbatim quote (trimmed above). --json prints the same as JSON.

Typing the plan into FinanzOnline

browser/ is a separate package and process; the MCP server cannot reach it. Start a separate Chrome with a throwaway profile. Chrome 136 and later ignore the debugging port on the default profile.

google-chrome --remote-debugging-port=9222 --user-data-dir="$(mktemp -d)"                                  # Linux
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222 --user-data-dir="$(mktemp -d)"   # macOS

In that window, log into FinanzOnline yourself, including the second factor. Open the Arbeitnehmerveranlagung and go to the page with the plan's boxes (L 1 items 9 and 10). The outputs below are from the synthetic page browser/test/pages/form-l1.html in headless Chrome:

$ npm run probe -- --year 2025 --form L1      # structure only: selector, label, Kennzahl, input kind; never a value
probe L1 2025: 6 input(s), 6 Kennzahl(en): 717, 718, 719, 720, 916, 999; page kind form
wrote data/kb/forms/2025/fon-L1.json (labels, Kennzahlen and input kinds; no values)

$ npm run fill -- --year 2025                 # dry run (default): types nothing
  718: would type 6 chars
  916: would type 5 chars
  720: would type 6 chars
dry run: 3 box(es) would be typed, 0 already filled, 0 skipped. Nothing was typed. Run with --apply to type them.

$ npm run fill -- --year 2025 --apply         # types each row into the one empty box with its Kennzahl, reads it back
  718: typed 6 chars, read back ok
  916: typed 5 chars, read back ok
  720: typed 6 chars, read back ok
typed 3, already filled 0, skipped 0, failed 0. Nothing was submitted: check every box, then submit yourself.

What you will see: the FinanzOnline page stays where you left it. Kennzahl 718 holds 696,00, 916 holds 50,00 and 720 holds 135,40, inserted as text input (no key or mouse events). Every other box, checkbox and button is as it was, and nothing has been clicked or sent. incoming/fill/<run>/report.html lists each box (typed, already filled, or skipped with the reason) with a screenshot before and after. A second --apply types nothing. On a login, second-factor or submission page, a tab on another host, or a page without Kennzahlen, the tool stops and says what to do (exit 3). A missing Chrome, tab or plan exits 2 with the fixing command.

Why login is out of scope by design. The FinanzOnline-Verordnung 2006 expires on 31.12.2026 (every paragraph's Außerkrafttretensdatum, RIS NOR40244189). § 4 of the FinanzOnline-Verordnung 2027, in force from 01.01.2027, allows login only with the E-ID, an eIDAS means of level "hoch", or access data plus a second factor (RIS NOR40280689). These texts were checked on RIS on 2026-11-27 and are not yet in the KB. The tool never touches login, so it does not depend on either text.

Limits you should know

  • E1 is experimental: 23 conflicts and no XSD oracle (see the table above). Do not rely on its Kennzahlen without the PDF.

  • Forms arrive slowly: formulare.bmf.gv.at asks for 500 s between requests, so the form PDFs arrive about one per npm run ingest or npm run curate run.

  • Not yet published: a year's forms that BMF has not published show as unpublished (7 for 2026 today, npm run status). The Steuerbuch is discovered from the BMF publication page, so an edition that is not on that page yet is not in the KB.

  • Law is pinned per tax year: a fact for year Y must cite the RIS text as of 31.12.Y. Three pinned texts are in the KB today; the other defined versions arrive as curator reviews.

  • Video is never a source. YouTube is not an ingest source. Most captions are automatic transcripts, not text a claim can quote.

  • Not filled: L 1k (its boxes carry no Kennzahlen), Lohnzettel values (the employer transmits them), and the Pendlerrechner result, which you state.

  • The live form is untested: matching uses the Kennzahl in a box's id, name or label, and runs so far used synthetic pages. Run probe first: if it lists no Kennzahlen, fill skips every row.

Data and privacy

  • At query time, nothing leaves the machine through finanzamt. The MCP server reads local files only. Your Claude Code session sends your question and the tool results to Claude, as any Claude Code use does, and with /finanzamt:fill the plan rows too.

  • Only the fetcher and the DevTools client use the network. The fetcher (ingest/src/fetch.ts) runs on npm run ingest or npm run curate, by hand or from the weekly timer (npm run timer:install, Mondays 06:30 by default). It contacts only the hosts in ingest/sources.json: www.bmf.gv.at, formulare.bmf.gv.at, findok.bmf.gv.at, www.ris.bka.gv.at, ris.bka.gv.at and www.oesterreich.gv.at. The DevTools client (browser/src/cdp.ts) talks only to your Chrome on 127.0.0.1. There is no telemetry.

  • Never stored: credentials (never asked for), cookies, tokens, the HTML of your FinanzOnline session, values in logs (only the Kennzahl and its length), and query strings of URLs.

  • Where your files live: your documents, stated.json, case-<year>.json, plan-<year>.json and the fill reports with their screenshots are in incoming/, which is git-ignored. The screenshots show your form, values included, so delete incoming/fill/ when you are done. Flags and curator reviews live in data/, also git-ignored. Flags are scrubbed of IBANs, tax numbers, social-security numbers and e-mail addresses before they are written (core/test/flags.test.ts).

Keeping it current

npm run curate                 conditional GET of every source → sha256 and text diff → re-extract → re-check every
                               fact quote → each added / changed / re-published / removed source waits in
                               data/kb/_review/<id>.json (+ .diff); the served KB is not touched
npm run curate -- --dry-run    the same, writing nothing
npm run curate -- --only=a,b   check only these sources; no removal verdicts
npm run curate -- --apply      promote exactly the reviewed bytes (sha256 checked), then rebuild facts, form maps,
                               references and index; an item that breaks a fact quote is refused
                               (--accept-quote-breaks makes that fact unverified); --only=<id>@<sha256 prefix> pins
                               the version you reviewed
npm run timer:install          weekly systemd --user timer (--calendar=…, --print, --uninstall)

A page or law text is stale after FINANZAMT_STALE_DAYS (10) days without a check; an annual document (form, Steuerbuch, Ausfüllhilfe, XSD) after FINANZAMT_STALE_DAYS_DOCUMENTS (400). After the first ingest, a live npm run ingest is refused so that updates go through review.

For a new tax year: add the year's facts to plugin/skills/finanzamt/facts.json, each with a verbatim quote, then run npm run ingest:offline or let the curator bring in the sources first. Check the maps with npm run form-map -- --year <YEAR> (--form L1, --dry-run, --pending for a read-only preview with the quarantined reviews), then run npm run refs. Reproducible rebuilds: with SOURCE_DATE_EPOCH set, npm run ingest:offline writes byte-identical manifest, facts, chunk texts and form maps (ingest/test/reproducible.test.ts). index.sqlite and live fetched_at times are not reproducible.

MCP tools

The server reads only the data directory and makes no network calls. Without a KB, every tool except kb_status and flag_knowledge answers with the command that builds it.

Tool

Returns

search_knowledge(query, year?)

Cited hits (source_url, sha256, year, section, page, a verbatim quote) and whether the KB covers the question (covered, year_match).

get_facts(year, topic?) / get_fact(id)

Amounts and limits with status (verified / derived / unverified), verbatim quote and source.

form_fields(year, form)

A form's boxes: kennzahl, status, German label, English gloss, item, page, evidence; experimental for the whole map.

explain_field(kennzahl_or_label, year?)

A box by Kennzahl, item number, German label fragment or English gloss, with status and supporting quotes.

compute_allowances(profile)

Draft amounts (Familienbonus Plus, AVAB/AEAB, Pendler, Telearbeit, …) and the L1/E1 recommendation; fails closed, every amount names its fact.

check_numbers(draft, cited_ids)

Numbers in a draft that no cited hit or fact states.

list_sources()

What the KB holds, with freshness and change status.

kb_status(verify_hashes?)

Integrity and freshness: stale sources, hash drift, fact quotes, year pinning, pending reviews.

flag_knowledge(...)

Records a question the KB cannot answer, scrubbed of personal data, for the curator.

Configuration

Environment variables (or .env in the checkout), validated by core/src/config.ts; a malformed value stops the process with a readable error. .env.example documents each one.

Variable

Default

Purpose

FINANZAMT_USER_AGENT

finanzamt-kb/0.1 (…; polite crawler)

User agent of the fetcher.

FINANZAMT_FETCH_DELAY_MS

1200

Minimum delay per host; a larger robots.txt crawl-delay wins.

FINANZAMT_FETCH_TIMEOUT_MS

30000

Timeout per HTTP request.

FINANZAMT_SOURCE_TIMEOUT_MS

180000

Watchdog per source; a stuck source is skipped, not the run.

FINANZAMT_STALE_DAYS

10

Days since the last check after which a page or law text is stale.

FINANZAMT_STALE_DAYS_DOCUMENTS

400

The same for forms, Steuerbuch, Ausfüllhilfen and XSDs.

SOURCE_DATE_EPOCH

unset

Build time for reproducible rebuilds.

FINANZAMT_CDP_URL

http://127.0.0.1:9222

DevTools endpoint of your Chrome for fill/probe; must be this machine.

FINANZAMT_FON_HOST

finanzonline.bmf.gv.at

The host the tab to type into must be on.

FINANZAMT_ROOT

auto

Checkout root.

FINANZAMT_DATA_DIR

<repo>/data

Sources, KB, index, flags, curator reviews; xdg uses $XDG_DATA_HOME/finanzamt.

FINANZAMT_INCOMING_DIR

<repo>/incoming

Your documents, the case profile, the plan and fill reports.

XDG_DATA_HOME

~/.local/share

Read only when FINANZAMT_DATA_DIR=xdg.

Development

npm run verify         # prove the install: tests, checks, MCP handshake, synthetic case → plan, launcher
npm run ci             # typecheck, lint, tests, check:lang, check:i18n, check:env, check:secrets, check:refs
npm run status         # the KB in numbers (sources, pinning, facts, form maps, freshness); --json
npm test               # vitest on synthetic fixtures; nothing is skipped in a fresh clone
npm run test:local     # extra checks against your local copies of the official PDFs
npm run refs           # regenerate plugin/skills/finanzamt/references/ (check:refs fails on drift)

Path

What

core/

Config, i18n, FTS5 index and coverage, fact verification, year pinning, number checks, KB status, compute, form mapping, case profile and fill plan

ingest/

Polite fetcher, source registry ingest/sources.json, pipeline, curator, the case/plan/status CLIs

mcp/

stdio MCP server (mcp/dist/server.js)

browser/

Typing aid (npm run fill, npm run probe): DevTools client, page model, stop rules; tests on browser/test/pages/

plugin/

Claude Code plugin: manifest, launcher, seven commands, skill with facts.json, form-fields.json, fill-rules.json, case-labels.json

fixtures/

Synthetic test KB and the synthetic case (fixtures/case/incoming)

scripts/

CI checks, verify.mjs, install-timer.mjs

See CONTRIBUTING.md and SECURITY.md.

What it is not

It is not tax advice (keine Steuerberatung), and there is no warranty: check every value against the cited source. You are the filer. What gets submitted is your declaration, entered or checked by you and sent by you.

License

MIT.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      C
      maintenance
      Gives an LLM client BM25 keyword search over a local corpus of Markdown and text files, letting it find ranked passages, fetch exact chunks with source offsets, read whole documents, and list what was indexed. It runs entirely locally over stdio with an in-memory index, calling no model and requiring no API key.
      4
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants and agents to search a legal document collection via hybrid BM25+dense retrieval, read articles with context, and generate full or short citations. It also exposes whole acts as Markdown resources, provides a citation-answering prompt, and supports stdio and streamable HTTP transports.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Serves a locally built knowledge base derived from your own copy of the Elektron Octatrack manual to AI clients over stdio. Exposes tools for semantic and full-text search, retrieving chunks and concepts, listing workflows and usage modes, and comparing approaches, with no generative AI at query time.
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to look up Austrian public holidays for any year, school holidays per federal state for 2026/27, the 2026 small-business VAT threshold, and SVS 2026 contribution rates including a rough estimate from annual profit. Runs locally over stdio with no dependencies.
      5
      MIT