Skip to main content
Glama
README.md
# @pipeworx/cbc-tw

Taiwan central bank statistics: policy (discount) rate and its full adjustment history, the New Taiwan dollar and other currencies against the US dollar, money aggregates (M1A, M1B, M2), reserve money, foreign exchange reserves, and money-market and interbank rates, each with units, the observation period and the table's last-updated date.

Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1964+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.

## Tools

- `cbc_tw_series_list()` — the statistical tables this pack documents, with English titles, frequency and column meanings. No upstream call.
- `cbc_tw_policy_rate({ history? })` — current rediscount, secured-loan and short-term accommodation rates (percent per annum), the date the current level took effect, the previous level and the most recent adjustments.
- `cbc_tw_exchange_rate({ currency?, frequency?, date? | start_date?, end_date? | last_n? })` — NTD, JPY, GBP, HKD, KRW, CAD, SGD, CNY, AUD, IDR, THB, MYR, PHP, EUR or VND against the US dollar, daily, monthly or annual. A date with no published rate returns `count: 0` with an `empty_reason` (`after_latest_published` or `no_publication_on_date`), never a silent empty list.
- `cbc_tw_table({ table_id, start_period? | end_period? | last_n? })` — rows of one table by id (for example `EF17M01` for M1B and M2, `EG37D01` for interbank call-loan rates, `EF07M01` for foreign exchange reserves). Values are labelled by column; `null` means the bank published no value for that period.

## Auth

Keyless.

## Data sources

- Central Bank of the Republic of China (Taiwan), Statistical Database — policy rates, exchange rates, monetary and financial statistics. Each call reads the one table it needs from the bank at request time; nothing is stored.

Things worth knowing:

- Quote convention differs by currency: GBP, AUD and EUR are US dollars per one unit; every other currency is units per one US dollar. Responses carry a `quote` field.
- Publication lags. Daily tables can run weeks behind the calendar (some by more than a month) and monthly tables about six weeks; every response carries `latest_observation` and `table_last_updated` so the caller can see how stale a value is.
- The policy-rate table lists only the dates a rate was changed, so the "current" rate is the most recent adjustment and may be years old.
- Column labels without an English translation in this pack come back in the bank's own Chinese labels (`label_zh` is always returned alongside).

## Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

```json
{
  "mcpServers": {
    "cbc-tw": {
      "url": "https://gateway.pipeworx.io/cbc-tw/mcp"
    }
  }
}
```

### What this endpoint actually serves

`tools/list` at `https://gateway.pipeworx.io/cbc-tw/mcp` returns the tools in the table
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's `initialize` response states its exact scope, and
is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
`ask_pipeworx`, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed
directly, instead of just this one's:

```json
{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}
```

Both URLs reach the same gateway and the same 1964+ data sources. The
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
reaches all of them from either one.

## No MCP client? Call it over HTTP

```bash
curl -X POST https://gateway.pipeworx.io/v1/tools/cbc_tw_series_list \
  -H 'Content-Type: application/json' \
  -d '{}'
```

No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/cbc_tw_series_list`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.

## Run it from npm

`@pipeworx/mcp-cbc-tw` is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with `npx`, and it forwards every call to the same
`https://gateway.pipeworx.io/cbc-tw/mcp` endpoint shown above. It needs network access;
there is no offline mode.

```json
{
  "mcpServers": {
    "cbc-tw": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-cbc-tw"]
    }
  }
}
```

Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
`"env": { "PIPEWORX_API_KEY": "<your key>" }` to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.

It lists **only** this pack's tools by default. Set `PIPEWORX_META_TOOLS=1` to
also list `ask_pipeworx` and the other gateway-wide tools.

Behind an HTTPS proxy: Node's built-in `fetch` does not read `HTTPS_PROXY` by
default. Newer Node releases honour it when `NODE_USE_ENV_PROXY=1` is set; check
your Node version's documentation.

## Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English —
this works on the pack endpoint above as well as on the full gateway:

```
ask_pipeworx({ question: "your question about Cbc Tw data" })
```

The gateway picks the right tool and fills the arguments automatically.

## More

- [Docs and guides](https://pipeworx.io/docs)
- [pipeworx.io](https://pipeworx.io)

## License

MIT