# FinFreedom

> A personal finance app for Indonesia: accounts in Rupiah, four budget methods, FIRE planning with Monte Carlo simulation, PPh 21, zakat and BPJS estimates, and an MCP server for the owner's own AI agent.

Global finance apps are built around US banks and US taxes, and many local apps stop at recording income and spending. Neither answers the question people actually ask: when can I stop depending on a salary, and how sure can I be? FinFreedom treats tracking as the input and planning as the output, and lets the AI agent a person already uses read the same numbers through the Model Context Protocol.

- Each FIRE projection runs 1,000 Monte Carlo simulations on the current net worth, next to a 30-year backtest and five stress tests.
- The MCP server is a thin client of the app's own REST API, so the agent and the web app share one set of business rules.
- Agent tokens are shown once and stored only as SHA-256 hashes, with an expiry date and a revoke button.

- 13 MCP tools for your own agent
- 1,000 Monte Carlo runs per plan
- 4 budget methods

- Role: Author and maintainer
- Period: Jul 2026
- Stack: Next.js 15, React 19, TypeScript, Prisma 6, SQLite, MCP TypeScript SDK, Tailwind CSS 4, Recharts
- Code on GitHub: FinFreedom (https://github.com/nugrahalabib/FinFreedom)

## The problem

Global personal finance apps are built around US banks, US taxes and US retirement accounts. Local apps mostly stop at recording income and spending. Neither answers the question people actually ask: **when can I stop depending on a salary, and how sure can I be?**

Indonesian details matter for a real plan: amounts in Rupiah, progressive PPh 21 brackets, BPJS contributions and zakat on savings above the nisab. And apps that add AI usually ship their own assistant inside the app. FinFreedom takes the other route: it opens the user's data to the agent the user already works with, through the Model Context Protocol.

*What changes with FinFreedom*

| Before | With FinFreedom |
| --- | --- |
| Spending tracked in a notes app or a spreadsheet | Accounts, transfers and categories in one place, with a CSV import that skips rows already imported |
| A budget method chosen once and never compared | Switch between Flex, 50/30/20, zero-based and envelope and see the allocations recalculated |
| Retirement as a guess | A FIRE number, 1,000 Monte Carlo runs, a 30-year backtest and five stress tests on the current net worth |
| Tax, zakat and BPJS worked out by hand | Estimates computed from the income and balances already recorded |

## Who it is for

*Who uses FinFreedom and how*

| Who | What they do |
| --- | --- |
| A person planning their money | Records accounts and transactions or imports a CSV, picks a budget method, sets savings and debt goals, and follows FIRE progress on the dashboard |
| That person's AI agent | Connects with a token from the AI Agents page and uses 13 tools, 4 resources and 4 guided prompts, for example a monthly review or a FIRE check-up |
| Developer or contributor | Runs the monorepo offline on SQLite, extends the services or the MCP tools, and checks changes with the API audit script |

## From transactions to a plan

**A month in FinFreedom** (Every number starts empty and comes only from what the user enters.)
1. Register: 16 default categories are added
2. Add money: Accounts, transactions or a CSV
3. Budget: Pick one of four methods
4. Plan: Goals, debts and a FIRE plan
5. Connect agent: A token and an MCP config
6. Ask: The agent answers with real numbers

## Inside the app

The screenshots below come from a local run of the public repository with an invented household: six accounts, about twenty transactions a month from September to November 2026, goals, bills and a FIRE plan. Every amount in them is made up.

**Dashboard**
The dashboard opens with net worth, this month's savings rate, what is safe to spend for the rest of the month and FIRE progress, then this month's cash flow, the Monte Carlo success rate and the latest transactions. Net worth adds account balances and investment holdings, minus cards and loans.

*Dashboard for an invented household in November 2026.*

**Transactions**
Transactions list income, expenses and transfers with category, account and status. Transfers create two linked entries and update both accounts. A CSV with date, payee, amount and type imports into one account; each row gets a hash of account, date, amount and payee, so importing the same file again skips every row.

*Transaction list with transfers, a pending entry and income in green.*

**Budgets and debts**
The budget page applies one of four methods to the month: Flex allocates from spending history, 50/30/20 splits needs, wants and savings, zero-based leaves nothing unallocated, and envelope adds rollover. Safe to spend and a daily amount come from what is left in flexible categories. A simulator compares paying debts by smallest balance (snowball) or highest interest (avalanche).

*November budget with the 50/30/20 method.*

**FIRE planner**
The FIRE number is yearly expenses divided by the withdrawal rate. The planner runs 1,000 Monte Carlo simulations on the current net worth and monthly savings and shows the median year of financial independence with the 10th and 90th percentile. Five stress tests run on demand: a 30 percent market crash, six months without a job, inflation 5 points higher, 4 percent returns, and retiring 5 years earlier.

*Monte Carlo percentiles and the five stress tests.*

**Indonesia toolkit**
Settings hold three estimates built from data already in the app: PPh 21 from the progressive brackets on income recorded this year, zakat at 2.5 percent when savings pass the gold nisab, and BPJS contributions for health, JHT and pension from monthly income. They are estimates, and the app says so: the zakat card points the user to a zakat expert for the final decision.

*Zakat, PPh 21 and BPJS estimates from invented data.*

## Your agent, your data

There is no language model inside FinFreedom. Instead, the repository ships an MCP server that turns the app's REST API into tools any MCP client can call. The agent goes through the same validation and services as the web app, so there is one set of rules and one place to fix a bug.

*A new agent token (masked) with its MCP config, and the active tokens.*

- **13 tools**: accounts, balances, transactions, budget status, goals, net worth, FIRE projection, what-if scenarios, insights, bills, reports and categories.
- **4 resources and 4 prompts**: a monthly review, a FIRE check-up, a debt strategy and an Indonesian tax summary.
- **Tokens**: 32 random bytes shown once with a ready MCP config, stored only as a SHA-256 hash, with an expiry date and a revoke button.
- **One door**: every tool is a call to the REST API with that token, never a direct database query.

Asking an agent how the FIRE plan is doing, for example, calls `get_fire_projection`. The MCP server sends the request with the bearer token, the API finds an unrevoked and unexpired token and its user, and the FIRE service runs the simulations, the backtest and the stress tests on that user's own numbers before the result goes back to the agent.

## How the numbers are made

The FIRE engine is plain TypeScript, not a model. Monthly returns are drawn from a normal distribution with 15 percent yearly volatility, expenses grow with inflation each year, and each stress test runs 500 simulations of its own. The result reports the success rate, the median, 10th and 90th percentile years and five sample paths. Reports flag a category that rises more than 30 percent on last month and a single expense above three times the average.

**Honest by design**
Unfinished features are labelled in the app instead of faked: bank auto-sync shows a not available page that points to CSV import, and investment prices are entered by hand, which the page says. No demo accounts are created, so every number on the dashboard comes from what the user entered.

## How it is built

FinFreedom is an npm workspaces monorepo. The web app is Next.js 15 with React 19 and Tailwind CSS 4, and holds the pages, the REST API and the domain services for finance, budgets, FIRE, investments, reports and the Indonesia toolkit. A database package holds the Prisma 6 schema with 25 models on SQLite, and a third package holds the MCP server.

- SQLite first: npm install and a local file are enough to run every feature, with no database server and no paid key.
- One API for people and agents: The MCP tools call the same REST API as the web app, with Zod schemas on every tool input.
- Sessions that really end: A signed JWT in an httpOnly cookie is checked against a session row, so signing out ends the session on the server.
- Careful passwords: Passwords are hashed with bcrypt at cost 12, and registration needs at least 8 characters.
- Sane limits: Amounts must be positive and at most Rp 500,000,000 per transaction; a missing debt rate defaults to 12 percent a year.
- Checked end to end: An audit script signs up a throwaway user and runs 43 checks across every module; all 43 passed on a local run.

To be clear about what is not there yet: the repository has no unit tests, so the API audit script is the automated check, and there is no Dockerfile, CI workflow or hosted version. It runs on one machine, and moving to PostgreSQL needs the Prisma provider changed as well as the database URL.

**At a glance**
- License: MIT
- Released: 10 July 2026, public release
- Made for: Personal finance in Indonesia, in Rupiah
- Data: SQLite with Prisma 6, 25 models
- For agents: MCP server: 13 tools, 4 resources, 4 prompts
- Checks: 43 of 43 API audit checks passed
- Hosting: Runs locally; no hosted version

**Want software your AI agent can use safely?** I build apps where tested code does the maths and the agent works through the same rules as people.

Source: https://nugrahalabib.com/work/finfreedom
Author: Nugraha Labib Mujaddid (https://nugrahalabib.com)
Published: 2026-11-27. Updated: 2026-11-27.
