BNR exchange rates

com.foreverworks由 foreverworks.com 发布v0.1.1更新于 Nov 3, 2026

Look up the National Bank of Romania's rate for any day, and convert amounts to and from RON.

发布方自己的服务:Exchange.news — Crypto offers, campaigns and news

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

只读访问罗马尼亚国家银行(BNR)参考汇率,让助手查询任意日期的汇率、在列伊与外币间换算金额,并计算 D212 申报所用的年度平均汇率。

可以做什么
  • 查询某日生效的 BNR 参考汇率,含发布日与乘数
  • 按当日汇率或此前最近一次定盘价,将金额换算为列伊或从列伊换算,并可指定舍入规则
  • 获取某日多种货币的汇率,或最多 366 天窗口内的全部定盘价
  • 按 ANAF 口径计算某年的年度平均汇率,附十二个月均值与天数
  • 检查当前能否读取 BNR 汇率,返回最新定盘日期与货币数量
适用场景
适合罗马尼亚税务与会计场景:把外币发票换算成列伊、引用某日生效的汇率、取得 D212 所需的年度平均汇率。也便于快速核查 2005 年以来的历史 BNR 汇率。
运行要求
通过 npx 在本地运行,需 Node 22.19 或更高版本;无需账号、密钥或配置。它会联网读取 BNR 的公开 XML,若进程受 MCP_EGRESS_ALLOW 限制,须放行 curs.bnr.ro。
安装前请注意
仅读取:没有任何工具会写入、发送或修改数据,只从 BNR 公开站点取数。提供的是 BNR 参考汇率,而非商业银行或欧洲央行汇率;换算时必有一方为列伊。

安装

在 SourceWeft 中

  1. 打开 控制台中的 BNR exchange rates,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[BNR exchange rates icon] BNR exchange rates MCP server

Look up the National Bank of Romania's reference exchange rates from your AI assistant: the rate in force on any day since 2005, with the date BNR published it; amounts converted to or from RON; several currencies or a window of fixings at once; and the yearly average ANAF converts foreign income at in the D212. It only reads: no tool writes or is money. Rates stay BNR's exact text (4.2440, never 4.244).

You need nothing: no account and no key. The server reads BNR's public XML files at curs.bnr.ro.

What you can ask

  • "What was BNR's euro rate on 14 March 2025?"
  • "Convert an invoice of 1,250.50 EUR dated 3 October 2026 to lei, at the last rate BNR published before that date."
  • "How much is 10,000 HUF in RON today?"
  • "Give me BNR's EUR and USD rates for every banking day of September 2026."
  • "Which annual average USD rate goes into my D212 for 2025?"

Install

[Install in VS Code] [Install in Cursor] [Download for Claude Desktop]

With Claude Code:

bash
claude mcp add bnr -- npx -y @foreverworks/mcp-bnr

Claude Desktop (Settings, Developer, Edit Config) and most other clients read the same command as JSON:

json
{  "mcpServers": {    "bnr": {      "command": "npx",      "args": ["-y", "@foreverworks/mcp-bnr"]    }  }}

Each runs the published package on Node 22.19 or newer. It needs no settings.

From a clone

bash
git clone https://github.com/foreverworks/mcps.git && cd mcpsnpm ci && npm run buildclaude mcp add bnr -- node "$PWD/servers/bnr/dist/index.js"

In a JSON configuration, the command is node and its one argument the full path of servers/bnr/dist/index.js. To share one running copy between several clients over HTTP, see docs/deploying.md.

Configuration

None of its own. The variables every server shares are in docs/configuration.md; a process limited by MCP_EGRESS_ALLOW must allow curs.bnr.ro. Dates are Bucharest dates whatever the host's time zone, so "today" is today in Bucharest.

Tools

Every tool is read: it changes nothing.

ToolAccessWhat it does
healthreadWhether BNR answers: the date of its latest fixing and how many currencies it carries, with a warning when that fixing is more than five days old.
ratereadThe rate in force on a day (default today): BNR's fixing of that day or of the last banking day before it, with its date (published_on) and multiplier.
convertreadAn amount (a decimal string) to or from RON at the rate in force on a day, or the last one before it, rounded once by the rule you name, with the rate and its date.
ratesreadSeveral currencies' rates in force on one day, or every fixing BNR published in a window of up to 366 days, as one series per currency.
annual_averagereadA year's average as ANAF uses it: the mean of BNR's twelve monthly averages, with them and their day counts.

Troubleshooting

input. The question cannot be answered as asked, and nothing was fetched: a date after today or before 2005, a window over 366 days or 2,000 rates (name fewer currencies or a shorter window), or a conversion with no RON side (convert twice and state both rates). The message names which.

not_found: "BNR publishes no ... rate here; it publishes ...". BNR does not publish that currency; the message lists those it does.

not_found: "BNR has no rates file for ... yet". A year's file appears with its first fixing, so in the first days of January the new year has no rates of its own: rate and convert take December's last, but rates over a window in the new year and its annual_average wait for that first fixing.

api. BNR's server did not answer, even after retries (status 0 is no connection). Try again in a few minutes.

drift. BNR answered with something that is not its rates XML, such as an HTML page or a changed format. The server refuses to guess; please report it.

How it works

The source

BNR publishes static XML at curs.bnr.ro, the host its "Curs XML" page names (read 2026-10-18): /nbrfxrates.xml is the latest fixing, and /files/xml/years/nbrfxrates<year>.xml every fixing of a year, the current one included (about 300 KB). A rate is RON per unit, or per 100 units (its multiplier) for HUF, JPY, KRW and a few others.

The old www.bnr.ro addresses answer with the HTML home page and status 200, which a reader that checks only the status takes for a year with no rates. Here any answer that is not BNR's rates document fails as drift, and so does a rate that is not a plain decimal.

Fetching. A past year's file never changes, so it is fetched once per process. The current year's and the latest fixing are kept ten minutes, as is a file first read while its year was current, so a year's average is re-read from the final file once the year ends. A request is tried up to three times on a 5xx, a 429 or a dropped connection.

The rate in force on a day

BNR fixes its rates once per banking day, around 13:00 Bucharest. A day's rate is that day's fixing; a weekend, a public holiday, or today before the fixing takes the last fixing before it (in early January, December's last). Every answer carries published_on, the date of the fixing it gave, so you can say which publication you used; today's rate asked before the fixing also carries a note saying so.

Converting an amount

convert takes the amount as a decimal string, so 1250.50 reaches the arithmetic as written. To RON is amount x rate / multiplier; from RON is amount x multiplier / rate (10000 HUF at 1.2354 per 100 is 123.54 RON). The exact result is rounded once, to places (0 to 8, default 2), half up (halves away from zero, as invoices round) unless rounding is half-even. rate_rule picks the fixing, and the answer says which it took:

  • in_force (the default) is the rate rate answers: the day's fixing, or the last banking day's.
  • last_before is the last fixing strictly before the day. Romania's Fiscal Code converts a foreign-currency invoice at "the last exchange rate communicated by BNR before" the date the VAT is due, so an invoice dated Friday takes Thursday's fixing, and one dated Monday Friday's.

The answer carries the rate as BNR wrote it, its multiplier, its date and a meaning line to paste into a document: "100 EUR = 509.10 RON at BNR's EUR rate 5.0910 RON for 1 EUR, published on 2026-10-16 (in force on 2026-10-16), rounded half-up to 2 places".

Several rates at once

rates answers one series per currency (up to 50 named, or every one BNR published), each with its multiplier and its fixings, oldest first. With date (or nothing, for today), a series holds the rate in force that day, dated by its fixing; with from and to (default today), every fixing in the window, both ends included, or no series and a note saying so. A window is at most 366 days and 2,000 rates (about a year of seven currencies, or every currency for two months), so the answer stays readable. A currency BNR published, but not in the window, is listed in absent; one it never published in the years read is refused, with the codes it does publish.

The annual average

The D212 converts foreign income at "cursul de schimb mediu anual comunicat de Banca Naţională a României". BNR's published annual average ("Serii anuale - valori medii") is the mean of its twelve monthly averages (each the mean of the month's daily rates) at four places, not the mean of the year's daily rates (USD 2022: 4.6885 against 4.6923). The server computes each monthly mean and the annual mean in exact decimals, each rounded once, half up, to four places.

That matches BNR's published values for USD 2020 (4.2440), 2021 (4.1604), 2022 (4.6885) and 2023 (4.5743), and EUR 2022 (4.9315), whether or not the monthly means are rounded first. A year not over yet answers the months so far with complete: false. npx tsx scripts/smoke.ts repeats the USD check against the live files.

Limitations

  • BNR's reference rates only, not the ECB's or commercial banks'.
  • From 2005, when BNR's XML series start.
  • No cross rates. BNR publishes no rate between two other currencies, so one side of a conversion is RON.
  • A multiplier change within a month fails the annual average as drift, rather than averaging that month on two bases; none has happened in the files read. A change between months answers with a warning.

Other servers for BNR

Searched 2026-10-18. BNR publishes none, and one community server exists:

  • @pipeworx/mcp-bnr-ro on npm (0.1.2, 2026-09), served through the Pipeworx gateway beside about 30 shared meta-tools. Its two tools return the latest fixing or a year's fixings, each rate a JavaScript number (4.2440 arrives as 4.244); neither picks the rate in force on a day or computes the annual average.

A second search, on 2026-10-21, found two more that convert an amount to RON:

  • anafpy's MCP tools on PyPI.
  • bnr-converter-mcp-server on PyPI, which also takes the last rate before a date, but takes the amount as a Python float and rounds through one.

Libraries read the same XML without MCP: curs-bnr, bnr-exchange-rate and others on npm, bnrxrate and anafpy's BNR client on PyPI, and itrack/cursbnr and peterlupu/curs-bnr on Packagist.

This one exists for what none of them does: it reads BNR directly, from where its caller runs; it keeps every rate as BNR wrote it; it answers the rate in force on any date, weekends, holidays and the hours before 13:00 included; it converts in exact decimals by a named rounding rule; and it computes the annual average as BNR publishes it and ANAF uses it.

来源:servers/bnr/README.md,提交 cbd1121

工具

5

annual_average

BNR annual average

BNR's annual average rate for a year, as ANAF converts foreign income in the D212 ("cursul de schimb mediu anual comunicat de BNR"): the mean of the twelve monthly averages, each the mean of the month's daily rates, to four places, with the monthly values and their day counts. Not the mean of the daily rates, which differs. A year not over yet answers the months so far with complete: false.

输入参数year必填currency必填

convert

Convert to or from RON

An amount converted to or from RON at BNR's reference rate, computed exactly and rounded once: to RON is amount x rate / multiplier, from RON amount x multiplier / rate. rate_rule picks the fixing: in_force (the day's, or the last banking day's before it, as rate answers) or last_before (the last one strictly before the day, the rule for an invoice in a foreign currency). Answers the result with the rate, its multiplier and the date BNR published it, so the conversion can be stated. One side must be RON; for two other currencies, convert twice.

输入参数to必填datefrom必填amount必填placesroundingrate_rule

health

Health

Whether BNR's rates can be read now: the date of its latest fixing and how many currencies it carries.

无需输入参数。

rate

BNR rate on a day

The National Bank of Romania's reference rate in force on a day: RON per `multiplier` units of the currency (1, or 100 for HUF, JPY, KRW and a few others), as the exact text BNR published, with published_on, the date of the fixing it is. A weekend, a holiday, or today before BNR publishes (about 13:00 Bucharest) takes the last banking day's fixing. Use it for any EUR/RON or other conversion stated on a date.

输入参数datecurrency必填

rates

BNR rates: several currencies, or a window

BNR's reference rates as series, the exact text BNR published. With date (default today): each currency's rate in force that day, from the day's fixing or the last banking day's before it. With from (and to, default today): every fixing BNR published in the window, oldest first, at most 366 days and 2000 rates a call. Without currencies, every currency BNR published. Each series carries its multiplier (RON per 1, or per 100 for HUF, JPY, KRW and a few others).

输入参数todatefromcurrencies

版本历史

2
  1. v0.1.1最新Oct 31, 2026
  2. v0.1.0Oct 26, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Exchange 集成