{"id":"ea40cfef-c2c9-4c3f-8831-335210cae142","slug":"ronfix","kind":"mcp","name":"ronfix","summary":"BNR reference exchange rates: the rate in force on any day since 2005, conversions to and from RON.","owner":"CloudCorpRecords","repoUrl":"https://github.com/CloudCorpRecords/ronfix","license":"MIT","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-11-03T20:44:00.000Z","addedAt":"2026-11-05T20:06:06.584Z","logoUrl":"https://avatars.githubusercontent.com/u/95189389?u=8e277e1a24ff84ae7b49c89e6897fa44178a5c34&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["utilities"],"tags":[],"runtime":"node","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-11-05T22:05:03.799Z","sample":false,"url":"https://conduits.dev/tools/ronfix","language":"TypeScript","transports":["stdio"],"install":{"npm":"@reneturcios/ronfix"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# ronfix\n\nRomanian leu reference rates, straight from the source.\nronfix is a small keyless client for the National Bank\nof Romania (BNR), which publishes its daily reference\nfixings as static XML files. It answers the questions\nthose files support, for any day since 2005: what rate\nwas in force on a given day, what an amount converts to\nor from RON at that rate, how a currency's fixings ran\nover a window, and what a year's average comes to the\nway ANAF computes it.\n\nEvery number is handled in exact decimals. A rate is\nkept as the text BNR published (`4.2440`, never\n`4.244`), amounts reach the arithmetic as the strings\nthey were written as, and each result is rounded\nexactly once, by the rule you name. Nothing is ever\npassed through a float.\n\n## Tools\n\n- `health` — whether BNR answers: the date of its\n  latest fixing and how many currencies that fixing\n  carries, with a warning when the fixing is more\n  than five days old.\n- `rate` — the rate in force on a day (default\n  today). A weekend, a holiday, or today before the\n  ~13:00 Bucharest fixing takes the last fixing\n  before it, including December's last fixing in\n  early January. The answer carries the rate exactly\n  as BNR wrote it, its `multiplier`, and its date as\n  `published_on`; today's rate asked before the\n  fixing also carries a `note` saying so.\n- `convert` — an amount (a decimal string) to or\n  from RON at the rate in force on a day. Name the\n  pair with `currency` alone (amount in that\n  currency, result in RON) or explicitly with\n  `from`/`to`. `places` (0 to 8, default 2) and\n  `rounding` (`half-up` by default, or `half-even`)\n  control the single rounding; `rate_rule` picks\n  `in_force` (default) or `last_before` (the last\n  fixing strictly before the day). The answer\n  carries the rate, its multiplier and date, and a\n  `meaning` line, for example: \"100 EUR = 509.10 RON\n  at BNR's EUR rate 5.0910 RON for 1 EUR, published\n  on 2026-10-16 (in force on 2026-10-16), rounded\n  half-up to 2 places\". Worked check: 10000 HUF at\n  1.2354 per 100 is 123.54 RON.\n- `rates` — one series per currency (up to 50 named\n  via `currencies`, or every currency BNR\n  published), each with its multiplier and its\n  fixings, oldest first. With `date` (or nothing,\n  for today) a series holds the single rate in\n  force that day, dated by its fixing; with `from`\n  and `to` (default today) it holds every fixing\n  in the window, both ends included. A currency\n  BNR published but not in the window is listed in\n  `absent`; a window with no fixings at all\n  answers no series and a note saying so.\n- `annual_average` — a year's average as ANAF uses\n  it: the mean of BNR's twelve monthly averages\n  (each the mean of that month's daily rates), each\n  mean rounded once, half up, to four places, with\n  the monthly averages and their day counts. A\n  year not over yet answers the months so far with\n  `complete: false`. Reference points: USD averaged\n  4.6885 in 2022 and 4.5743 in 2023; EUR averaged\n  4.9315 in 2022.\n\n## Behaviour worth knowing\n\n- Rates are RON per unit, or per 100 units (the\n  `multiplier`) for HUF, JPY, KRW and a few others;\n  conversions divide or multiply by it accordingly.\n- Upstream is BNR's public XML at `curs.bnr.ro`:\n  `/nbrfxrates.xml` for the latest fixing and\n  `/files/xml/years/nbrfxrates<year>.xml` for a\n  whole year. A request is tried up to three times\n  on a 5xx, a 429 or a dropped connection. A past\n  year's file is fetched once per process; the\n  current year's file and the latest fixing are\n  kept ten minutes. Dates are Bucharest dates\n  whatever the host's timezone.\n- Limits: BNR reference rates only, from 2005; no\n  cross rates (one side of a conversion is RON);\n  windows at most 366 days and 2,000 rates.\n\n## Errors\n\nFailures carry one of four classes at the start of\nthe message:\n\n- `input` — the question cannot be answered as\n  asked and nothing was fetched: a date after\n  today or before 2005, a window over 366 days or\n  2,000 rates, or a conversion with no RON side.\n  The message names which.\n- `not_found` — BNR does not publish that currency\n  (\"BNR publishes no ... rate here; it publishes\n  ...\", listing the ones it does), or has no rates\n  file for that year yet.\n- `api` — BNR's server did not answer, even after\n  retries.\n- `drift` — BNR answered with something that is\n  not its rates XML (the old `www.bnr.ro` addresses\n  answer HTML with status 200), or a rate that is\n  not a plain decimal, or a multiplier change\n  inside one month of an annual average. A\n  multiplier change between months of an annual\n  average answers with a `warning` instead.\n\n## CLI\n\nEach tool is a subcommand taking one JSON argument\nstring:\n\n```bash\nnpx @reneturcios/ronfix health '{}'\nnpx @reneturcios/ronfix rate '{\"currency\":\"EUR\",\"date\":\"2026-10-16\"}'\nnpx @reneturcios/ronfix convert '{\"amount\":\"10000\",\"currency\":\"HUF\"}'\nnpx @reneturcios/ronfix rates '{\"currencies\":[\"EUR\",\"USD\"],\"from\":\"2026-10-01\",\"to\":\"2026-10-16\"}'\nnpx @reneturcios/ronfix annual_average '{\"currency\":\"USD\",\"year\":2022}'\nnpx @reneturcios/ronfix --version\n```\n\nOutput is the tool's result as JSON. Exit codes:\n`0` on success, `1` on a runtime error, `2` on a\nusage error.\n\n## MCP server\n\n```bash\nnpx -y @reneturcios/ronfix mcp\n```\n\nMCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"ronfix\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@reneturcios/ronfix\", \"mcp\"]\n    }\n  }\n}\n```\n\nNo key or account is needed; the server reads BNR's\npublic files only.\n\n## Docker\n\n```bash\ndocker run -i ghcr.io/cloudcorprecords/ronfix\ndocker run --rm ghcr.io/cloudcorprecords/ronfix rate '{\"currency\":\"EUR\"}'\n```\n\n## Development\n\n```bash\nnpm install\nnpm run build   # tsc -> dist/\nnpm test        # tsx --test test/*.test.ts (fake fetch only, no network)\nnpm run dev     # run the CLI from source\n```\n\n## License\n\nMIT — Copyright (c) 2026 Rene Turcios\n"}