Skip to main content
Glama
hk-markets-mcp

hk-markets-mcp

by harvey619

hk-markets-mcp

An MCP server that gives an AI agent live Hong Kong monetary data: the HKMA Base Rate, HIBOR fixings, and the USD/HKD peg band with the Aggregate Balance.

Data comes from the Hong Kong Monetary Authority's public Open API. No API key, no registration, no account.

> What is overnight HIBOR doing this week, and has the HKMA been defending the peg?

  get_hibor { history_days: 5 }
  get_peg_status {}

  Overnight HIBOR is 2.03% as of 2026-09-16, having ranged 2.03% to 2.15%
  over the last five business days. The Convertibility Undertaking band is
  7.75 to 7.85 and the Aggregate Balance closed at HKD 56,167 million.

Install

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "hk-markets": {
      "command": "npx",
      "args": ["-y", "hk-markets-mcp"]
    }
  }
}

Claude Code:

claude mcp add hk-markets -- npx -y hk-markets-mcp

Anything else that speaks MCP over stdio: run npx -y hk-markets-mcp.

Related MCP server: censtatd-hk

Tools

Each declares an input and an output schema, so results come back as structured data rather than prose a client has to parse back out.

get_base_rate

The HKMA Base Rate: the floor of the Discount Window and the anchor for Hong Kong dollar rates. Under the Linked Exchange Rate System it tracks the US federal funds target, so it usually moves only when the Fed moves.

Argument

Type

date

YYYY-MM-DD, optional

Business day to report. Omit for the latest.

Returns as_of, base_rate_percent, source.

get_hibor

Hong Kong Interbank Offered Rate. This dataset publishes two tenors, overnight and one month; other tenors are not in it.

Argument

Type

date

YYYY-MM-DD, optional

Business day to report.

history_days

1–365, optional

Also return that many recent business days, newest first.

Returns as_of, overnight_percent, one_month_percent, optional history[], source.

History is where HIBOR is actually informative: overnight can swing several points around month and quarter ends.

get_peg_status

Where the Linked Exchange Rate System stands.

Argument

Type

date

YYYY-MM-DD, optional

Business day to report.

Returns as_of, strong_side, weak_side, aggregate_balance_hkd_millions, trade_weighted_index, note, source.

This dataset does not publish the spot USD/HKD rate, so the tool reports the band the HKMA commits to trade at, plus the Aggregate Balance — which is the better intervention signal anyway. It shrinks when the HKMA buys Hong Kong dollars to defend the weak-side Convertibility Undertaking.

Being a good guest

This is a free public service run by a central bank, so the client:

  • caches for 15 minutes, since the data is daily — an agent asking the same question ten times costs HKMA one request;

  • shares in-flight requests, so ten concurrent callers also make one;

  • serialises upstream calls with a minimum 250 ms gap;

  • sends a descriptive User-Agent pointing back here;

  • times out at 15 seconds rather than hanging.

Two API details worth knowing

Both are handled here, and both bite if you call the API directly:

  1. from and to are silently ignored without choose. The filter only applies when choose=<field> names the column. Without it you get the most recent page and no error — real data for the wrong dates.

  2. Once choose is set, both bounds are required. Half a range is rejected upstream; this client rejects it before the request goes out, with a message that says so.

HKMA publishes on business days, so weekends and Hong Kong public holidays have no rows. Every tool reports the as_of date it actually got, rather than letting an agent present Friday's figures as today's.

Development

npm install
npm test        # 22 tests, no network: the HTTP layer is faked
npm run build
npm run dev     # run the server on stdio

Licence

MIT © Harvey Singh

Available Tools

3 tools
get_base_rateHKMA Base RateA
Read-only

The Hong Kong Monetary Authority Base Rate: the floor of the Discount Window and the anchor for Hong Kong dollar interest rates. Under the Linked Exchange Rate System it tracks the US federal funds target, so it usually moves only when the Fed moves.

Inputs: date. Returns: as_of, source, base_rate_percent

get_hiborHIBOR fixingsA
Read-only

Hong Kong Interbank Offered Rate. This dataset publishes two tenors, overnight and one month; other tenors are not in it. Optionally returns recent history, which is where HIBOR is actually informative, because overnight can swing several points around quarter and month ends.

Inputs: date, history_days. Returns: as_of, source, history, one_month_percent, +1 more

get_peg_statusUSD/HKD peg statusA
Read-only

Where the Linked Exchange Rate System stands: the Convertibility Undertaking levels the HKMA commits to trade at, and the Aggregate Balance, which is the figure that actually shows whether it has been intervening. Note this dataset does not publish the spot USD/HKD rate, so this tool reports the band and the balance rather than guessing where spot sits.

Inputs: date. Returns: note, as_of, source, weak_side, +3 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct piece of HK monetary data: the base rate, HIBOR, and the Linked Exchange Rate System status. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    All three tool names follow the same get_<noun> pattern with clear, descriptive nouns. The naming is consistent and predictable.

    Tool Count5/5

    Three tools is a tight, well-scoped set for the server's purpose of exposing HK money market indicators. Each tool earns its place and the count is not padded.

    Completeness4/5

    The set covers the core HKMA policy rates and the peg status, which are the main published indicators. Minor gaps exist, such as no direct USD/HKD spot rate or historical base rate data, but the tools explicitly note these limitations and the domain is well covered for a focused server.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides access to Hong Kong Monetary Authority public open data via MCP, enabling natural language queries without an API key.
      73 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables querying Hong Kong Census and Statistics Department open data via natural language or direct tool calls through the Pipeworx gateway.
      59 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to search and verify Hong Kong official registry data, retrieve merged agent profiles with citation-safe recommendedUse, and access verified Agent Cards through a remote streamable HTTP endpoint.
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to retrieve live Hong Kong banking data—ATM and branch locations, HIBOR/HKD rates, and bank legitimacy checks—from official HKMA public APIs, with no credentials or scraping.
      1
      MIT