Skip to main content
Glama
bartosz-kuc

nbp-mcp

nbp-mcp

Local MCP server for the Polish National Bank (NBP) public API — exchange rates and gold fixing, no authentication required.

Part of the honest-mcp family of small, auditable, local-first MCP servers.

Why

Every Polish JDG owner receiving a foreign-currency invoice has to convert it to PLN using the NBP mid-rate from the last business day before the invoice date — that's what the tax code requires. Today that's a manual look-up in a browser tab, once per invoice, every month.

This server puts the NBP API a single tool call away. Ask your AI "convert 500 EUR from an invoice dated 2026-07-15 to PLN" and it does the right thing: fetches the mid-rate for the last publication date before that, computes, returns.

Same trust model as the rest of the family: data flows only between your machine and NBP.

Related MCP server: Local Financial MCP Mock Server

Features

Six tools:

  • get_rate — NBP exchange rate for one currency on a date (or latest). Tables A / B / C.

  • list_rates — the whole table on a date (or latest).

  • get_rate_history — rate history for a currency over a date range (≤367 days).

  • get_gold — gold fixing (PLN per gram of 1000-fineness) on a date (or latest).

  • get_gold_history — gold history over a date range.

  • convert — convert an amount between two currencies using NBP mid-rate. Handles PLN as either side, cross-rates via PLN, Table A/B fallback for exotic currencies.

Data source

  • Endpoint: api.nbp.pl — the National Bank of Poland's public REST API

  • No API key, no registration, no rate limit

  • Table A: daily mid-rate for major currencies (USD, EUR, GBP, CHF, JPY, …) — this is what accounting uses

  • Table B: twice-weekly rates for less common currencies

  • Table C: daily bid/ask spread — use for actual FX transactions, not bookkeeping

Requirements

  • Python 3.10+

Setup

git clone https://github.com/bartosz-kuc/nbp-mcp.git
cd nbp-mcp
python3 -m venv venv
./venv/bin/pip install -r requirements.txt

Register with Claude Code:

claude mcp add nbp /absolute/path/to/venv/bin/python /absolute/path/to/server.py

Claude Desktop claude_desktop_config.json:

{
  "mcpServers": {
    "nbp": {
      "command": "/absolute/path/to/venv/bin/python",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

Example usage

"What was the NBP mid-rate for USD on 2026-03-14?"

get_rate(currency="USD", date="2026-03-14") → mid rate + effective date. If NBP didn't publish on that day (weekend/holiday) the server returns a clear 404 payload so the caller knows to try the previous business day.

"Convert 1240.50 EUR to PLN using the rate from 2026-07-15."

convert(amount=1240.50, from_currency="EUR", rate_date="2026-07-15") → PLN amount, the rate used, and the effective date NBP actually published. Polish tax law: use the last business day before the invoice date; pass that date to rate_date, not the invoice date itself.

"How has EUR/PLN moved this quarter?"

get_rate_history(currency="EUR", start_date="2026-04-01", end_date="2026-06-30") → full daily series.

Data flow

Your AI client
     ↕  MCP stdio
This server (Python, on your machine)
     ↕  HTTPS
api.nbp.pl (National Bank of Poland)

No cloud middle. Nothing to log in to. No telemetry.

For Polish accountants and JDG owners

The important bit for księgowość: the NBP mid-rate you use to book a foreign-currency invoice in PLN is the rate published on the last business day before the invoice date (art. 24 pkt 8 CIT/PIT). Not the invoice date itself. This is a common source of manual mistakes. convert(..., rate_date="YYYY-MM-DD") asks NBP for that specific date — if NBP didn't publish that day, the response tells you and you retry with the prior day.

Author

Bartosz Kuć — Warsaw-based developer, JDG owner running skanfirmy.pl.

Consulting

Available for consulting on Polish tax and business integrations (KSeF, GUS/NFZ/GIOŚ APIs, mBank data), MCP server design, and AI-assisted tooling for JDGs and small teams. See skanfirmy.pl/uslugi for productized packages (audit 3k PLN, setup 8-15k PLN, retainer 2-4k PLN/mo), or reach out via email.

License

MIT — see LICENSE.

Available Tools

6 tools
convertA

Convert an amount from one currency to another using NBP mid-rate (Table A, or B if not in A). Primary use case: converting a foreign-currency invoice to PLN for Polish bookkeeping. Polish tax law requires using the NBP mid-rate from the last business day BEFORE the invoice date — pass that date as rate_date, not the invoice date itself. Returns the amount, the rate used, and the effective date.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesAmount to convert
rate_dateNoOptional YYYY-MM-DD. Defaults to the latest published rate.
to_currencyNoTarget currency (default PLN)PLN
from_currencyYesSource currency, 3-letter ISO 4217

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description fully discloses behavior: uses NBP mid-rate, Table A or B fallback, returns amount/rate/effective date, and special date rule.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise, two sentences plus a crucial note. No wasted words, front-loaded with action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a conversion tool with no output schema. Mentions returns, covers sibling differentiation, and addresses complexity of date rule.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds significant context for rate_date and to_currency default beyond schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool converts currency using NBP mid-rate, specific verb+resource. Distinguishes from sibling tools that only get rates or history.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit primary use case (foreign-currency invoice to PLN for Polish bookkeeping) and critical guidance on rate_date parameter (use date before invoice date).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_goldA

Get the NBP gold fixing (cena złota) in PLN per gram of 1000-fineness gold, on a specific date or the latest. Published daily on business days.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoOptional YYYY-MM-DD. Defaults to the latest published fixing.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds context beyond schema: publishing frequency (daily on business days) and default behavior (latest fixing). However, it does not disclose error handling for missing dates, authentication needs, or rate limits. With no annotations, this is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler. Every word adds value: verb, resource, unit, currency, fineness, date range, and publication frequency. Efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description explains the return value (price in PLN per gram). However, it does not specify the return format (e.g., single number vs. object with metadata), which would be helpful for an agent. Still, the essential info is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter, so baseline is 3. The description reinforces the parameter's purpose (specific date) and default behavior, but adds no additional syntax or constraints beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states "Get the NBP gold fixing" with specific attributes (PLN per gram, 1000-fineness gold) and date handling. It clearly distinguishes from sibling tools like get_gold_history (history) and get_rate (different resource).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description indicates the tool is for a specific date or the latest fixing, and notes publication on business days. It does not explicitly exclude uses or compare to alternatives, but the context from sibling names (e.g., get_gold_history) implies usage scope.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_gold_historyA

Get NBP gold fixing history over a date range. Range must be at most 367 days per NBP API limits.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_dateYesYYYY-MM-DD
start_dateYesYYYY-MM-DD

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the API limit (367 days) but does not mention return format, data structure, or any side effects. Minimal transparency for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences, front-loaded with the action. Every word is necessary, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description should explain what the tool returns (e.g., an array of objects with date and price). It does not, leaving the agent unaware of the response structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters have schema descriptions ('YYYY-MM-DD'), but the description adds important semantic information: the date range must be at most 367 days. This constraint is not in the schema and aids correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets NBP gold fixing history over a date range, using a specific verb and resource. It distinguishes from siblings like 'get_gold' (likely single) and 'get_rate_history' (different rate type) by specifying 'gold fixing history'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for gold history over a date range and includes a constraint (max 367 days). However, it does not explicitly state when to use this tool over alternatives like 'get_gold' or 'get_rate_history', nor does it provide exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_rateA

Get the NBP exchange rate for a single currency vs PLN, on a specific date or the latest available. Table A = daily rates for major currencies (USD, EUR, GBP, CHF, JPY, etc.). Table B = twice-weekly rates for less common currencies. Table C = daily buy/sell rates (bid/ask) for major currencies — use for actual FX transactions, not accounting. For invoice-to-PLN conversion in Polish bookkeeping, use Table A. Note: NBP does not publish on weekends/holidays.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoOptional YYYY-MM-DD. Defaults to the latest published rate.
tableNoNBP table — A (default) for accounting mid-rateA
currencyYes3-letter ISO 4217 code (e.g., USD, EUR, GBP)

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so description carries full burden. It mentions publication schedule but does not disclose error handling (e.g., invalid date, missing currency) or describe the return format/response structure. Partially transparent but missing key behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (~80 words), front-loaded with the primary purpose, and every sentence provides meaningful context without redundancy. Efficiently structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and the presence of sibling tools, the description explains table usage and date behavior well but omits the return value structure (e.g., response fields). Lacks completeness for an agent to fully understand the output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions. The description adds significant value beyond schema by explaining the purpose of each table, default date behavior, and appropriate usage contexts for each table parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it gets the NBP exchange rate for a single currency vs PLN, optionally on a specific date. It distinguishes between table types (A, B, C) with specific purposes, but does not explicitly differentiate from sibling tools like get_rate_history.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear guidance on when to use each table (A for accounting, B for less common, C for FX transactions) and notes weekend/holiday unavailability. However, it does not directly compare with sibling tools or specify when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_rate_historyA

Get the NBP exchange rate history for a currency over a date range. Range must be at most 367 days per NBP API limits.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableNoA
currencyYes3-letter ISO 4217 code
end_dateYesYYYY-MM-DD
start_dateYesYYYY-MM-DD

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries full burden. It discloses the API limit (367 days) but does not mention error behavior, response format, or if the operation is read-only. Minimal but not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose and a key constraint. No extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and moderate complexity (4 parameters), the description covers purpose and a constraint but lacks details on return values, parameter behavior (e.g., table default), and error cases. Adequate but with gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75% (3 of 4 parameters have descriptions). The description adds no additional parameter meaning beyond the schema, such as clarifying the table enum or date format. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets NBP exchange rate history for a currency over a date range, with a specific verb and resource. It distinguishes from sibling tools like get_rate (single rate) and get_rate_history (history).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this vs. alternatives like get_rate or list_rates. Only a constraint (max 367 days) is mentioned, but no context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_ratesA

List all currency rates from an NBP table on a given date (or latest). Useful for seeing what's available and comparing multiple currencies at once.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoOptional YYYY-MM-DD. Defaults to the latest published table.
tableNoA

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It indicates a read operation (list) but does not disclose potential side effects, authorization requirements, rate limits, or what happens if the requested date lacks a published table. The behavior is simple, but missing details on output or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise, front-loaded sentences with no redundant information. Every word serves a purpose, making it efficient for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with no output schema and no annotations, the description covers the purpose and usage context adequately. It could be improved by mentioning the return format or behavior when date is missing, but it remains largely complete given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (date has a description, table only has enum/default but no description). The description adds context like 'currency rates' and 'on a given date (or latest)', but does not explain the meaning of table types A, B, C. It adds marginal value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List', the resource 'all currency rates from an NBP table', and the optional date scope. It distinguishes from sibling tools like 'get_rate' (single rate) and 'get_rate_history' (historical rates) by focusing on listing multiple rates at once.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states usefulness for 'seeing what's available and comparing multiple currencies at once', providing clear context. However, it does not explicitly exclude cases when to use alternatives like 'get_rate' or 'get_rate_history', which are implied but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observedconvert
    • First observedget_gold
    • First observedget_gold_history
    • First observedget_rate
    • First observedget_rate_history
    • First observedlist_rates

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a distinct purpose: getting single rates, rate history, gold price, gold history, listing all rates, and conversion. No overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (get_rate, list_rates, convert, etc.), making them predictable and easy to remember.

Tool Count5/5

With 6 tools, the server is well-scoped for an NBP exchange rate API, covering core operations without being too many or too few.

Completeness4/5

The tool set covers getting current and historical rates, gold prices, listing all rates, and conversion. Minor gap: no explicit tool for bid/ask rates, but get_rate with Table C can retrieve them.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    An MCP server that provides currency rates, conversions, and historical exchange-rate data using the Frankfurter API. It enables users to retrieve latest rates, convert amounts between currencies, and access time-series data for currency pairs.
    3
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A lightweight MCP server that simulates financial data interactions with dummy authentication and static JSON datasets for testing financial applications.
    2
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    MCP server that provides real exchange-rate data from the European Central Bank, including latest rates, currency conversion, historical rates, and time series.
    -
  • A
    license
    A
    quality
    C
    maintenance
    MCP server that provides AI agents with Polish business data tools: identifier validation (NIP, PESEL, REGON, KRS, IBAN), VAT whitelist checks, EU VIES lookups, and NBP exchange rates.
    5
    21
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bartosz-kuc/nbp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server