Metadata-Version: 2.4
Name: danish-tax-mcp
Version: 0.4.1
Summary: Danish personal tax figures and calculators, exposed as an MCP server
Keywords: mcp,denmark,tax,skat,forskudsopgørelse,trækprocent
Author: Mikael Bisgaard Dahlsen-Jensen
Author-email: Mikael Bisgaard Dahlsen-Jensen <47351659+mikaelbdj@users.noreply.github.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Natural Language :: Danish
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Dist: mcp>=2.3,<3
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: pydantic>=2.14.2
Requires-Dist: pyyaml>=6.0.3
Requires-Python: >=3.12
Project-URL: Repository, https://github.com/mikaelbdj/danish-tax-mcp
Project-URL: Issues, https://github.com/mikaelbdj/danish-tax-mcp/issues
Description-Content-Type: text/markdown

# danish-tax-mcp

MCP server for Danish personal income tax. It has the yearly rates and thresholds, each
with the official source it came from, calculators for income tax, the skattekort, share
income and property tax, and lookups in SKAT's positivliste and Den juridiske vejledning.

The results are estimates for planning. What you actually owe is set by your årsopgørelse
from Skattestyrelsen.

## Install

You need [uv](https://docs.astral.sh/uv/). For Claude Code:

```sh
claude mcp add dk-tax -- uvx danish-tax-mcp
```

Other MCP clients can run the same command over stdio. To pin a version, use
`uvx danish-tax-mcp@0.4.1`.

## Tools

| Tool | |
|---|---|
| `list_figures(year)` | The figure keys for a year, with name and unit |
| `get_figures(year, keys)` | Values with source, date checked and status |
| `get_kommune(year, kommune)` | Kommuneskat, kirkeskat, skatteloftsnedslag and grundskyld |
| `estimate_salary_tax(...)` | Income tax for an unmarried employee, with take-home pay and marginal rate |
| `estimate_couple_tax(...)` | Income tax for a married couple living together at year end, with what moves between the spouses (personfradrag, kapitalindkomst, underskud) |
| `estimate_payslip(...)` | Trækprocent and månedsfradrag from a forskudsopgørelse, monthly payout, share vests and expected restskat, with an optional spouse (2026 onwards) |
| `estimate_property_tax(...)` | Ejendomsværdiskat and grundskyld for an owner-occupied home, including the years it is bought and sold, with the cap on grundskyld increases (2026 onwards). Enter the valuation for the year before the income year: the 2026 tax uses the 2025 ejendomsværdi and grundværdi |
| `estimate_share_income_tax(...)` | Skat af aktieindkomst (27 % and 42 %) for one person or a married couple, with withheld udbytteskat, losses on listed and unlisted shares, and amounts carried forward |
| `estimate_lager_gains(year, funds)` | The year's taxable gain or loss on ETFs and other investeringsselskaber (lagerbeskatning), split into aktieindkomst and kapitalindkomst |
| `lookup_abis(query, year)` | Whether a fund is on SKAT's list of aktiebaserede investeringsselskaber for a year, read live from skat.dk |
| `get_jv_section(section)` | The current text of a section of Den juridiske vejledning, read live from info.skat.dk |

The two lookups fetch public pages from skat.dk and info.skat.dk and cache them in
`~/.cache/dk-tax`. Your query is matched locally and is not sent anywhere.

Example questions:

- Hvad er topskattegrænsen i 2027?
- How much tax do I pay on 900.000 kr. in Aarhus?
- What happens to my trækprocent if I put my bonus and RSUs in the forskudsopgørelse?
- Hvad bliver ejendomsværdiskatten på en lejlighed vurderet til 4 mio. kr. i Aarhus?
- How much tax do I pay if I sell shares with a gain of 120.000 kr.?
- My spouse is on unpaid parental leave. How much of their personfradrag can I use?
- Is IE00B4L5Y983 on the positivliste, and how is it taxed?
- My ETF was worth 200.000 kr. on 1 January and 230.000 kr. on 31 December, and I bought for 20.000 kr. What is taxed?
- How much interest do I pay on restskat if I pay it in May?

## Coverage

Income years 2025 to 2027, and all 98 kommuner. 2023 is included only because the
official worked example is from that year. Foreign withholding tax on dividends and
business income are not covered yet.

## Testing

The salary calculator reproduces svmn.dk's worked example for 2023 to the øre, and the
skatteloft reduction matches svmn.dk's table for every kommune in 2025 to 2027. The
skattekort formulas reproduce SKAT's examples. Where the law doesn't settle something
(mostly rounding), the assumption is written down in the module docstring in `calc/`.
The aktieindkomst split is checked against the 2026 examples in Den juridiske vejledning
(C.E.3.2.4.1.2).

```sh
uv run pytest
uv run dk-tax     # start the server
```

## Data

One YAML file per year in `src/dk_tax/figures/`:

```yaml
bundskat:
  name: Bundskatteprocent     # term used in the source
  value: 12.01                # as printed: 12.01 means 12,01 %
  unit: percent               # percent or DKK
  source: https://svmn.dk/...
  verified: 2026-11-01
  status: verified            # verified, secondary, unverified or proposed
  note: PSL § 6.
```

Keys are the Danish terms with æ, ø, å written as ae, oe, aa. They follow the law of each
year, so 2025 has the old 15 % topskat and no mellemskat.

New figures come out every autumn. [CONTRIBUTING.md](CONTRIBUTING.md) describes how to add
a year.

## License

MIT
