Overview
boj-mcp is a specialized MCP (Model Context Protocol) server that provides programmatic access to the Bank of Japan's (BOJ) official statistical flat-file datasets. It serves as a bridge between AI assistants and Japan's central bank data infrastructure, enabling retrieval of critical macroeconomic indicators without requiring API authentication.
Core Usage
The tool operates via CLI commands exposed through the MCP protocol. Users first enumerate available datasets (boj-mcp datasets), search for specific series (boj-mcp search), then retrieve time-series data in tabular or JSON formats (boj-mcp data). The workflow mirrors professional econometric tools but with simplified, AI-native interfaces.
Key Advantages
- Authoritative Source: Direct connection to BOJ's official
stat-search.boj.or.jpportal, ensuring data provenance matches institutional standards - Zero Configuration: No API keys, registration, or rate-limiting concerns; leverages BOJ's public flat-file policy
- Intelligent Caching: Local caching after first download significantly accelerates repeated queries
- Encoding Handling: Automatic Shift_JIS conversion eliminates common Japan-data friction
- Comprehensive Coverage: Includes specialized indices often missing in aggregated APIs (CGPI, SPPI, TANKAN, Flow of Funds)
Limitations & Risks
- Flat-File Latency: BOJ updates may lag real-time; data freshness depends on BOJ's publication schedule (typically monthly with revision cycles)
- No Real-Time Rates: Does not provide live market rates; interest rates are reference/statistical, not executable
- Shift_JIS Dependency: While handled automatically, underlying encoding remains a legacy constraint
- Limited Granularity: Flat-file structure may not support highly granular filtering; often requires client-side processing
- No Historical Metadata: Series definitions and methodology changes require external BOJ documentation cross-reference
Suitable Users
- Macroeconomic researchers analyzing Japanese price indices and monetary transmission
- Financial analysts modeling Japan's balance of payments or international investment position
- AI agents requiring structured, authoritative Japan economic data without API complexity
- Quantitative developers building Japan-specific economic dashboards
Security Considerations
- Data Integrity: Sourced directly from
.boj.or.jpdomain; minimal MITM risk via HTTPS - Local Caching: Cached files stored locally; sensitivity depends on deployment environment
- No Credential Exposure: Zero secrets in configuration reduces attack surface
- Supply Chain: Python package distribution via PyPI/uv; standard package manager risks apply