BNM Malaysia MCP Server avatar

BNM Malaysia MCP Server

Pricing

Pay per usage

Go to Apify Store
BNM Malaysia MCP Server

BNM Malaysia MCP Server

MCP server exposing Bank Negara Malaysia's free public Open API as tools: USD/MYR currency conversion, Kijang Emas gold valuation, and an OPR/FX/gold economic snapshot.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

MP K

MP K

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Share

An MCP server that wraps Bank Negara Malaysia's (BNM) free public Open API, exposing Malaysian currency, gold, and interest rate data as tools for AI agents. It runs as an Apify Actor in Standby mode, so it behaves like a normal always-on HTTP API rather than a one-shot batch run, and it is monetized with pay-per-event pricing — you only pay for successful tool calls.

This is an independent, unofficial integration. It is not affiliated with or endorsed by Bank Negara Malaysia. Data is provided as-is from BNM's public API with no guarantee of accuracy or availability; do not use it as the sole basis for financial decisions.

Connecting

Once deployed, the Actor exposes a standard streamable-HTTP MCP endpoint at:

https://<your-username>--bnm-mcp-server.apify.actor/mcp

Add that URL to any MCP-compatible client (Claude, Cursor, etc.) using your Apify API token for authorization. No run input is required — the Actor only serves the MCP endpoint.

Tools

convert_currency

Converts an amount between two currencies.

ParameterTypeDescription
amountnumberAmount to convert
from_currencystring3-letter source currency code (e.g. USD, MYR, EUR)
to_currencystring3-letter target currency code

For USD↔MYR, the rate is BNM's official KL USD Reference Rate for the current date. For any other currency pair, the amount is triangulated through USD: each currency's value is first expressed in USD (using BNM's daily commercial exchange rate table for third currencies, and the KL reference rate for the USD/MYR leg), then converted to the target currency. Returns the converted amount, the effective rate used, and the date the rate was published.

kijang_emas_value

Values a weight of gold in Malaysian Ringgit using BNM's latest Kijang Emas gold coin price.

ParameterTypeDescription
weightnumberWeight of gold
unit"gram" | "oz"Unit of the weight (troy ounce for oz)

The unit price is the average of BNM's published buying and selling price for the 1 oz Kijang Emas denomination, linearly scaled to the requested weight (1 troy oz = 31.1034768 g). Returns the estimated value in MYR, the unit price used, and the price's effective date.

my_economic_snapshot

Takes no input. Returns a single snapshot combining:

  • OPR — the current Overnight Policy Rate and its date
  • USD/MYR reference rate — BNM's KL USD Reference Rate and its date
  • Kijang Emas gold price — the latest 1 oz buying/selling price and its date

Pricing

This Actor uses pay-per-event billing — no charge for idle Standby time, only for successful tool calls:

EventDescriptionDefault price
convert_currency_callOne successful currency conversion$0.01
kijang_emas_callOne successful gold valuation$0.01
snapshot_callOne successful economic snapshot$0.02

Failed calls (e.g. BNM API errors, unsupported currency, markets closed) are not charged. Prices shown are the template defaults defined in .actor/pay_per_event.json; the live prices for the published Actor are managed in Apify Console.

Error handling

BNM's API returns HTTP 404 both for invalid dates and for dates with no data (e.g. weekends and public holidays, when FX/gold markets are closed). All tools catch upstream failures — network errors, non-200 responses, unsupported currency codes — and return a normal MCP tool result with isError: true and a human-readable message, instead of crashing the server or the request.

Data source

All data comes from BNM's public Open API at https://api.bnm.gov.my/public/ (requires the header Accept: application/vnd.BNM.API.v1+json):

  • GET /kl-usd-reference-rate/date/{date} — KL USD/MYR reference rate
  • GET /exchange-rate — daily commercial exchange rates for ~26 other currencies against MYR
  • GET /kijang-emas — Kijang Emas gold coin price
  • GET /opr — Overnight Policy Rate

Local development

npm install
npm run start:dev

The server listens on port 3000 by default (override with APIFY_CONTAINER_PORT), serving the MCP endpoint at POST /mcp. Pay-per-event charging is a no-op outside the Apify platform unless you set ACTOR_TEST_PAY_PER_EVENT=true, which logs charges to a local charging-log dataset instead of billing anyone.

Deployment

$apify push

Standby mode is enabled via "usesStandbyMode": true in .actor/actor.json. After pushing, enable pay-per-event pricing and set live prices for the Actor in Apify Console under the Actor's Monetization settings.