Skip to main content
Glama
harvey619

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: mcp-cbr-rates

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

1365, 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoBusiness day to report, YYYY-MM-DD. Omit for the most recent published day.

Output Schema

ParametersJSON Schema
NameRequiredDescription
as_ofYesThe business day these figures are published for, YYYY-MM-DD.
sourceYesWhere the figures came from.
base_rate_percentYesHKMA Base Rate in percent, null if unpublished.

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the agent knows this is a safe read operation. The description adds useful context about the rate's behavior (tracks US federal funds target, moves only when Fed moves), which is beyond the annotations. However, it doesn't disclose details like whether the rate is the current published rate or historical, or any rate limit considerations.

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 two sentences, front-loads the core definition, and adds relevant context without waste. Every sentence earns its place.

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?

The tool has a simple parameter set (one optional date), an output schema exists, and annotations cover safety. The description provides enough context about the rate's behavior and significance. It could mention that the date parameter is optional and defaults to the most recent published day, but the schema already covers that.

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%, so the schema already documents the 'date' parameter well. The description doesn't add much about the parameter beyond what the schema provides, but the schema is sufficient. Baseline 3 is appropriate.

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 identifies the tool as retrieving the HKMA Base Rate, explains its role as the Discount Window floor and anchor for HKD interest rates, and distinguishes it from siblings by focusing on the Base Rate specifically. The verb 'get' plus the specific resource makes the purpose unambiguous.

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 explains the economic context and when the rate typically changes (only when the Fed moves), which helps an agent understand when to call this tool. It doesn't explicitly name alternatives like get_hibor or get_peg_status, but the context of the Linked Exchange Rate System and the focus on the Base Rate implicitly differentiates it from sibling tools.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoBusiness day to report, YYYY-MM-DD. Omit for the most recent published day.
history_daysNoAlso return this many recent business days, newest first.

Output Schema

ParametersJSON Schema
NameRequiredDescription
as_ofYesThe business day these figures are published for, YYYY-MM-DD.
sourceYesWhere the figures came from.
historyNoRecent business days, newest first, present only when history_days was given.
one_month_percentYesOne-month HIBOR fixing in percent.
overnight_percentYesOvernight HIBOR fixing in percent.

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds valuable behavioral context beyond annotations: the dataset only contains two tenors, and overnight HIBOR can swing around quarter and month ends. This helps the agent set expectations about data coverage and volatility without contradicting the annotations.

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?

Three concise sentences with no filler. The key dataset identity is front-loaded, followed by scope limitations and a focused usage tip. Every sentence earns its place.

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?

With an output schema present, no return-value explanation is needed. The description covers the dataset's identity, tenor scope, data caveat, and the value of the history option, which is sufficient for a simple read-only lookup tool.

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%, so both parameters are already documented in the schema. The description adds only general context about returning recent history, which maps to history_days, but does not provide additional detail beyond the schema. Baseline 3 is appropriate.

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 identifies the resource (Hong Kong Interbank Offered Rate) and states the tool's behavior: it publishes two specific tenors and optionally returns recent history. It is distinct from siblings like get_base_rate and get_peg_status by naming a different financial rate and dataset scope.

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 gives clear context for when to use the tool: the dataset covers only overnight and one-month tenors, and other tenors are explicitly excluded. It also advises that recent history is where HIBOR is actually informative, guiding use of the optional history parameter. It does not explicitly name sibling alternatives, but the exclusion alone provides useful when-to-use guidance.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoBusiness day to report, YYYY-MM-DD. Omit for the most recent published day.

Output Schema

ParametersJSON Schema
NameRequiredDescription
noteYesWhat this dataset does and does not say.
as_ofYesThe business day these figures are published for, YYYY-MM-DD.
sourceYesWhere the figures came from.
weak_sideYesHKMA buys HKD at this level, normally 7.85.
strong_sideYesHKMA sells HKD at this level, normally 7.75.
trade_weighted_indexYesTrade-weighted Hong Kong dollar index.
aggregate_balance_hkd_millionsYesClosing Aggregate Balance. It shrinks when the HKMA buys HKD defending the weak side.

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating the tool is read-only and may return unexpected data. The description adds behavioral context by stating that the tool reports the band and balance rather than guessing spot, and clarifies the dataset's scope. It doesn't contradict annotations.

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, information-dense, and front-loaded with the purpose. Every sentence adds value: it defines the tool's scope, explains what it reports, and clearly states its limitations. No wasted words.

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?

With an output schema present and a single optional parameter, the description covers the key functional aspects: what the tool reports, its limitation regarding spot rates, and the optional date. It could be more complete by mentioning what output fields to expect, but the output schema likely covers that, so a 4 is appropriate.

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%, so the date parameter is fully documented with its pattern and meaning. The description reinforces the optional nature of the date but does not add additional semantic detail beyond the schema. Baseline 3 is appropriate since the schema does the heavy lifting.

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's purpose: to report on the Linked Exchange Rate System's Convertibility Undertaking levels and Aggregate Balance, specifically for the USD/HKD peg. It distinguishes itself from potential sibling tools that might report spot rates by explicitly noting that this dataset does not publish the spot rate.

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 explains what the tool does not do (report spot USD/HKD rate) but does not explicitly name alternative tools for getting the spot rate or when to use them. Sibling tools like get_base_rate and get_hibor are different, but the description doesn't guide the agent to use them for spot rates. It does imply usage by stating the dataset's limitation.

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.

  1. 3 tool updatesv0.1.0
    • First observedget_base_rate
    • First observedget_hibor
    • First observedget_peg_status

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables access to Hong Kong government's official open data portal (DATA.GOV.HK) through natural language queries. Supports searching datasets, browsing categories, and retrieving detailed information about Hong Kong's public data resources.
    8
    8
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Central Bank of Russia (CBR) data for AI agents — daily and historical currency rates, key rate, inflation, and macro statistics. Five typed MCP tools, in-memory TTL cache, MIT-licensed, no API key required.
    5
    75 PyPI
    2
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to access SEC EDGAR filings, US Treasury rates, BLS labor statistics, and economic indicators without API keys.
    6
    21 npm
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides LLM agents with live access to Canadian economic and financial data (exchange rates, interest rates, inflation, etc.) through the Bank of Canada Valet API, with no API key required.
    5
    MIT