Why I built it

After the PhD I built Sextante, first for friends and family: a site with calculators for the real Spanish tax system and a portfolio tracker. There were already plenty of FIRE calculators, so I aimed at what none of them covered, which is Spanish tax.

There are 27 calculators. They cover income tax with the regional scales of the 15 common-regime communities, wealth and gift tax, Social Security, and FIRE projections with a seeded Monte Carlo simulation. The portfolio tracker keeps positions held across banks and brokers in one place, with prices, currency conversion, profit and loss, FIFO capital gains and the two-month rule on losses.

It is live at sextante.fpardo.net, self-hosted on my home lab, and open source under the MIT licence since October 2026. I tried ads for ten days and replaced them with optional donations.

Visit SextanteView the code

The MCP server

Once the site worked, I wanted to ask an assistant about my own portfolio, so I added an MCP server. It has 23 tools. All 27 calculators sit behind two of them, which run the same shared code as the website, so the assistant and the site cannot give different numbers.

Most of the work went into permissions. An assistant reading someone's finances has to get exactly the access the person granted, so login uses OAuth 2.1 with separate read and write permissions, checked on every tool. While hardening it before open-sourcing the code, I found that a write-only grant could still read the whole portfolio, and fixed it. The server works as a Claude connector.

How it is built

A pnpm workspace with a Next.js frontend, a NestJS API over PostgreSQL with Drizzle, and a shared TypeScript core that holds the calculators and the tax engine, all running in Docker. It is about 62,000 lines of TypeScript, some 23,000 of them tests, including property-based tests for the tax engine. CI gates every deploy, with health checks, rollback and a database dump before migrations, and the encrypted off-site backups are checked by restoring them.

I directed the build and reviewed the code; Claude Code wrote much of it, and about four in five commits are co-written with it. I try to stay on top of every decision; Claude applies good practice on its own, we argue sometimes, and it often teaches me more than the other way round.