Skip to main content

Norges Bank MCP Server

An MCP (Model Context Protocol) server that gives AI agents direct access to Norges Bank's open data API. Exchange rates, policy rate, government securities, money market data, bank liquidity, and the Regional Network survey.

Built by Gervi Labs as part of an effort to create MCP servers for Norwegian public data sources.

What it does

This server exposes tools for querying data from Norway's central bank, including:

  • Exchange rates for 40+ currencies against NOK (daily, monthly, annual)
  • Policy rate (styringsrenten), overnight lending rate, and reserve rate
  • Nowa (Norwegian overnight weighted average rate)
  • Government securities: prices, yields, zero-coupon curves
  • Government debt key figures and primary/secondary market data
  • Bank liquidity forecasts and statistics
  • Money market aggregates
  • Regional Network enterprise survey data
  • Financial indicators

All data comes from Norges Bank's public SDMX REST API at https://data.norges-bank.no/api/. No authentication required. Data is freely available under open license.

Quick start

Local

pip install -r requirements.txt
python server.py

The server runs on port 8007 using streamable HTTP transport.

Docker

docker build -t norges-bank-mcp .
docker run -p 8007:8007 norges-bank-mcp

Or with docker-compose:

docker compose up

Available tools

Tool Description
nb_get_api_status Verify API connectivity
nb_list_dataflows List all available datasets
nb_get_dataflow_structure Get dimensions and valid codes for a dataset
nb_get_data Fetch data with SDMX key filter
nb_get_exchange_rate Quick exchange rate lookup (accepts common names)
nb_get_policy_rate Current and historical policy rate

Recommended workflow

  1. Discover: nb_list_dataflows() to see all available datasets
  2. Explore: nb_get_dataflow_structure('EXR') to understand dimensions and valid codes
  3. Query: nb_get_data('EXR', 'B.USD.NOK.SP', '2024-01-01', '2026-03-30') to fetch data

Key format

The SDMX key is a dot-separated string of dimension values. Empty positions act as wildcards. Use + for multiple values in one position.

Key Meaning
B.USD.NOK.SP Daily USD/NOK spot rate
B.USD+EUR+GBP.NOK.SP Daily USD, EUR, and GBP vs NOK
B..NOK.SP All currencies vs NOK, daily
M.USD.NOK.SP Monthly USD/NOK
A.USD.NOK.SP Annual USD/NOK

Frequency codes: B (business daily), M (monthly), A (annual).

Available dataflows

ID Name Description
EXR Exchange rates 40+ currencies against NOK
IR Policy rate Key rate, overnight lending, reserve rate
SHORT_RATES Short rates Nowa rate
SEC Government securities Prices and yields at market close
GOVT_GENERIC_RATES Generic interest rates Government bond yield curve
GOVT_ZEROCOUPON Zero coupon yields Nelson-Siegel-Svensson model
GOVT_KEYFIGURES Key indicators Government debt overview
GOVT_PRIMARY_MARKET Primary market Government securities auctions
GOVT_SECONDARY_MARKET Secondary market Turnover by region/investor
GOVT_IRS Interest rate swaps Government debt swaps
MONEY_MARKET Money market Aggregated reporting data
LIQUIDITY_FORECAST Liquidity forecast Bank system liquidity outlook
LIQUIDITY_STATISTICS Liquidity statistics Bank system liquidity data
REGNET Regional Network Enterprise and organisation survey
FINANCIAL_INDICATORS Financial indicators Calculated by Norges Bank
FAUCTION F-auctions Announcements and results
SETTLEMENT_STATISTICS Settlement Settlement system data
ANN_KPRA Policy rate announcements Rate decision announcements
ANN_FX_SPU FX announcements Transactions on behalf of SPU

Exchange rate convenience

The nb_get_exchange_rate tool accepts common currency names in addition to ISO codes:

  • "dollar" or "USD"
  • "euro" or "EUR"
  • "pound" or "sterling" or "GBP"
  • "yen" or "JPY"
  • "swedish" or "SEK"
  • "danish" or "DKK"
  • "swiss" or "franc" or "CHF"
  • "yuan" or "renminbi" or "CNY"
  • "TWI" for trade-weighted index
  • "I44" for import-weighted index
  • ... and 30+ more aliases

Related projects

Part of a growing ecosystem of MCP servers for Norwegian public data:

Data source

All data comes from the public Norges Bank SDMX REST API. No authentication required.

License

MIT

Metadata

Release files for mcp-nb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-nb 0.1.0
File Size Uploaded Provenance
mcp_nb-0.1.0.tar.gz 12.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-nb 0.1.0
File Interpreter ABI Platform
mcp_nb-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 kB

Release files / mcp_nb-0.1.0.tar.gz

Download URL mcp_nb-0.1.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2bee969f87bacb4d08b09b1b6eb2ed2358ea6168b423a01d3eb39ce9f732d6e3
BLAKE2b-256 checksum
How to use checksums
c25a9e10eb3ce19e7c80d3497932da4c3e8197f919cf9d3086323c017502466c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / mcp_nb-0.1.0-py3-none-any.whl

Download URL mcp_nb-0.1.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48004830e9192023d60987d4e352e9a884f136477dd8859e75a520622351b915
BLAKE2b-256 checksum
How to use checksums
0ee3d76f71ad4dac4ce6d2c62ad10ca4d105a674270ed7f4c5af21511dcc2f50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for mcp-nb 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page