bank-of-japan-mcp-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Overview
Search series metadata in English or Japanese across the Bank of Japan's 50 statistical databases. Retrieve observations in their published frequencies, filter Tankan surveys by industry and firm size, or look up realized overnight call rates and basic discount and loan rate changes. No API key required.
Tools
Tool | Description |
| Find series by text, code, database, or frequency |
| Fetch observations by series code or database branch |
| Retrieve Tankan observations by survey dimension |
| Get realized call rates and basic discount and loan rate history |
| Browse databases, layers, period formats, Tankan codes, rate codes, coverage, and attribution |
| Inspect staged tables, columns, and series metadata |
| Run read-only SQL on staged tables |
| Delete one staged table. Opt-in via |
Related MCP server: mcp-boj
Capability reference
boj_search_series tool
Pass
query(literal words or a series code),db, and/orfrequency. Setactive_only: falseto include discontinued series. Page withlimit(default 25, cap 100) andnext_cursor.Global result pages omit Tankan (
CO) and reportexcluded_co_matcheswhen available. Setdb: "CO"for Tankan catalog matches.A cold catalog may return
catalog_loading. Repeat the query after loading progresses. A stale result identifies the databases served from older catalog data.
boj_get_series_observations tool
Pass
codesusing qualified IDs from search, for example{"codes":["IR01'MADR1Z@D"],"start_date":"2024-01","limit":10}for the basic discount and loan rate. Or pass abranchwithdb,layer, andfrequencyfrom the layer reference. A code request resolves up to 250 unique identifiers and reports additional ones inunprocessed_codes.start_dateandend_dateare inclusive. Accepts calendar dates, months, quarters, halves, or years. Returned periods retain the series' native frequency and calendar convention.series_limitcounts series per roster page (default 1, cap 250).limitcounts inline observations per series (default 25, cap 1,000). Useinclude_nulls: truefor dated nulls inline.If temporary observation storage reaches capacity, start without a cursor and narrow the date range or reduce
series_limit. For contention with other active windows, retry after they expire.On
collecting, resend the original request with the returnedcursor. When ready,next_cursorvisits earlier observations on the same page andnext_selection_cursormoves to the next roster page. Pass either ascursorwith the original filters and limits. Restart the original call if its cursor expires or the source revision changes.When a response includes
staged, its table contains the complete roster-page window, including dated nulls. Carry the returnedcanvas_idto the next roster page to stage another table on the same canvas.
boj_get_tankan tool
{}requests the business conditions DI for large manufacturers and nonmanufacturers, actual and forecast. Browsetankan_codesto selectitem,industries,sizes,horizons,series_type,frequency,aggregation, ordetail_item.Observation windows and continuations work as above, with
series_limitdefault 4 and cap 25. Theunavailablelist reports unpublished combinations and their available frequencies.
boj_get_policy_rates tool
Returns the latest daily overnight call-rate average, high and low, the latest monthly average, and the latest basic discount and loan rate.
The basic rate's effective-date changes are derived from the published series and sorted newest first. Page through changes with
limit(default 25, cap 100) andnext_cursorpassed ascursor.
boj_list_reference tool
For example, call with
{"topic":"layers","db":"IR01"}to browse the basic discount and loan rate database hierarchy. Usetopic: "tankan_codes"with an optionaldimensionfor the codebook.Other topics are
databases,frequencies,policy_rates,coverage_gaps, andattribution. Page withlimit(default 25, cap 100) andnext_cursorpassed ascursor.
boj_dataframe_describe tool
Pass
canvas_idfrom a staged result. The response includes table schema, row count, expiration, and each series' recorded and staged date ranges.Continue a table's series manifest with its
table_name, cursor, and the samelimit(default 25, cap 100).
boj_dataframe_query tool
Pass
canvas_idand a single read-only SELECT, optionally with CTEs. Use the names fromboj_dataframe_describe. For stable paging, add anORDER BYthat uniquely orders the rows.SQL is limited to 65,536 UTF-16 code units. The 30-second query deadline includes time waiting for the canvas. DuckDB may need to finish preparing a statement before it can honor cancellation.
limitdefaults to 25 rows and caps at 1,000. Passnext_cursorascursorwith the same canvas, SQL, and limit.
boj_dataframe_drop tool
Pass
canvas_idandtable_nameto remove a staged table. Requires DuckDB andBOJ_DATAFRAME_DROP_ENABLED=true.
Features
The catalog is cached locally and populated on demand. Start with a database-scoped search for a faster cold lookup. Allow roughly 1 GB of disk space for all 50 databases. Requests to BOJ are paced, so loading the full catalog takes time.
Native installs default to DuckDB for SQL. The portable Claude Desktop bundle uses inline observation continuation and a portable catalog cache.
For Japanese Government Bond yields, use the Ministry of Finance's JGB yield series. For announced policy targets, decisions, and meeting records, use the BOJ Monetary Policy Meetings archive.
Getting started
For Claude Code, using Node.js 24 or later:
claude mcp add bank-of-japan-mcp-server -- npx -y @cyanheads/bank-of-japan-mcp-serverFor another stdio client, add this to its MCP config:
{
"mcpServers": {
"bank-of-japan-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/bank-of-japan-mcp-server"]
}
}
}With Bun 1.4.4 or later, use "command": "bunx" and "args": ["--bun", "@cyanheads/bank-of-japan-mcp-server"]. Or download and open the .mcpb using the Claude Desktop badge above.
Configuration
Variable | Description | Default |
| Writable directory for the persisted series catalog |
|
| Set |
|
| Canvas engine. Set |
|
|
|
|
| Local HTTP address, port, and route |
|
| Public origin for a TLS-terminating proxy | Unset |
|
|
|
| Minimum log level |
|
See .env.example for framework overrides. Claude Code prompts for the two BOJ options when enabling the plugin. For the Codex plugin, set the BOJ variables in the environment that launches Codex.
Running the server
Local development
git clone https://github.com/cyanheads/bank-of-japan-mcp-server.git
cd bank-of-japan-mcp-server
bun install
bun run rebuild
bun run start:httpConnect your client to http://localhost:3010/mcp, or use bun run start:stdio. To preload the catalog, use its CLI after installing the npm package globally:
npm install -g @cyanheads/bank-of-japan-mcp-server
boj-catalog init
boj-catalog verify
boj-catalog refreshinit loads missing or stale databases, verify checks coverage on disk, and refresh forces a reload. Use the same BOJ_CATALOG_DIR as the server. From a source build, use bun run mirror:init, bun run mirror:verify, and bun run mirror:refresh. The HTTP server schedules a refresh for 00:01 UTC each day.
Docker
docker run --rm -p 127.0.0.1:3010:3010 \
-v boj-catalog:/usr/src/app/.mirror \
ghcr.io/cyanheads/bank-of-japan-mcp-server:latestThe image runs HTTP on port 3010 and persists the catalog in the mounted volume. To run it over stdio, use docker run -i --rm -e MCP_TRANSPORT_TYPE=stdio followed by the image name.
Project structure
Path | Purpose |
| Server registration, canvas setup, HTTP catalog refresh, and shutdown |
| Catalog initialization, refresh, and verification |
| MCP tool input, output, and error contracts |
| BOJ transport, catalog backends, observation traversal, rate and Tankan lookups, and canvas |
| Unit and integration tests |
Development guide
See developer rules, the design notes, and the repository tree.
Contributing
Run bun run devcheck and bun run test before submitting changes.
License and data attribution
The server code is licensed under Apache 2.0. The Bank of Japan's terms govern reuse of its data. The site notice requires source credit when copying data and prior permission for commercial reproduction, designated materials, and images. See the Time-Series Data Search site notice, API notice, API manual, and Tankan codebook.
This service uses the API provided by the "Bank of Japan Time-Series Data Search." The Bank of Japan does not guarantee the content of the service.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Japan export and import customs statistics (Ministry of Finance) by code. No API key required.
Query SEC EDGAR filings, XBRL financials, and company data via MCP. STDIO or Streamable HTTP.
Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.
Search Bluesky posts and feeds; read profiles, threads, and trends. STDIO or Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables querying Japanese government statistics from e-Stat, including metadata, data observations, and catalog browsing.61 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides keyless access to Bank of Japan monetary data, including the current policy rate and Japan CPI inflation, with recent monthly history.84 npmMIT
- AlicenseNot gradedqualityAmaintenanceProvides universal access to over 800,000 economic time series through three tools that browse the full catalog by category, release, or source, search by keywords, tags, and filters, and retrieve observations with date ranges, frequency aggregation, and transformations such as percent change or natural log. It also supports stdio, Docker, and Streamable HTTP transports with caching, rate limiting, and retry handling for deployment in AI assistant clients.312 npmAGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables searching Bank of Japan time-series statistics series by name or series code and retrieving time-series data for a specified series code and period through the official BOJ statistics API.MIT