market-mcp

An MCP server (stdio) that wraps a real Vietnamese financial-market API — demo for the talk MCP — Plug Your Agent Into Everything (FIT-HCMUS).

The hook: an LLM cannot know today’s gold price or USD rate (knowledge cutoff, session 1). Ask Claude “giá vàng SJC hôm nay?” without this server — it can’t answer. Plug it in — one thin adapter over an existing REST API — and it can. MCP = reach.

Upstream: https://api-cf.kha.do/public (OKX USDT · VCB/TCB/VPBank forex · SJC/ring/DOJI gold · Visa/MasterCard rates), cached 60 s.

Tool What it returns
get_gold_price SJC / ring / DOJI, VND per tael
get_fx_rate { currency } buy/sell across VCB · TCB · VPBank; USD also gets open market, USDT (OKX), Visa/MasterCard
list_currencies which codes each bank quotes

Run

npm install
npm run inspect        # test in the MCP Inspector first

claude mcp add market -- node /absolute/path/to/server.js
claude

Asks to try

The last two are the money demos: the model calls the tool, then does the comparison math and reasoning itself — API gives data, model gives analysis.

Teaching notes