bank-of-japan-mcp-server

v0.3.0 pre-1.0

Search Bank of Japan statistics and retrieve time series, Tankan surveys, and policy rates via MCP. STDIO or Streamable HTTP.

bank-of-japan.caseyjhand.com/mcp
claude mcp add --transport http bank-of-japan-mcp-server https://bank-of-japan.caseyjhand.com/mcp
codex mcp add bank-of-japan-mcp-server --url https://bank-of-japan.caseyjhand.com/mcp
{
  "mcpServers": {
    "bank-of-japan-mcp-server": {
      "url": "https://bank-of-japan.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http bank-of-japan-mcp-server https://bank-of-japan.caseyjhand.com/mcp
{
  "mcpServers": {
    "bank-of-japan-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://bank-of-japan.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "bank-of-japan-mcp-server": {
      "type": "http",
      "url": "https://bank-of-japan.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://bank-of-japan.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

8

read 7

boj_search_series

open-world

Find BOJ series by code or English and Japanese keywords. Select database CO to search Tankan. Pass qualified_code to boj_get_series_observations.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "boj_search_series",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "Bare code, qualified DB'CODE identifier or literal search words. Each word must match the code or bilingual metadata.",
      "type": "string"
    },
    "db": {
      "description": "BOJ database code, such as FM08 for foreign exchange.",
      "type": "string"
    },
    "frequency": {
      "description": "Native frequency code such as M, Q or D, or a BOJ label such as MONTHLY. W or WEEKLY includes all weekly series.",
      "type": "string"
    },
    "active_only": {
      "default": true,
      "description": "Exclude series marked discontinued.",
      "type": "boolean"
    },
    "limit": {
      "default": 25,
      "description": "Series per page, capped at 100.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cursor": {
      "description": "Next cursor from the same search.",
      "type": "string"
    }
  },
  "required": [
    "active_only",
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

boj_get_series_observations

open-world

Retrieve published BOJ observations by series codes or database branch. Returns the latest observations in each requested window, with cursors for more results. May create or reuse a canvas table with the complete window for SQL.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "boj_get_series_observations",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "codes": {
      "description": "Ordered series codes. Supply either codes or branch.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "description": "Bare series code or qualified DB'CODE identifier."
      }
    },
    "branch": {
      "description": "Database branch. Supply either branch or codes.",
      "type": "object",
      "properties": {
        "db": {
          "description": "Database code from boj_list_reference.",
          "type": "string",
          "enum": [
            "IR01",
            "IR02",
            "IR03",
            "IR04",
            "FM01",
            "FM02",
            "FM03",
            "FM04",
            "FM05",
            "FM06",
            "FM07",
            "FM08",
            "FM09",
            "PS01",
            "PS02",
            "MD01",
            "MD02",
            "MD03",
            "MD04",
            "MD05",
            "MD06",
            "MD07",
            "MD08",
            "MD09",
            "MD10",
            "MD11",
            "MD12",
            "MD13",
            "MD14",
            "LA01",
            "LA02",
            "LA03",
            "LA04",
            "LA05",
            "BS01",
            "BS02",
            "FF",
            "OB01",
            "OB02",
            "CO",
            "PR01",
            "PR02",
            "PR03",
            "PR04",
            "PF01",
            "PF02",
            "BP01",
            "DER",
            "BIS",
            "OT"
          ]
        },
        "layer": {
          "anyOf": [
            {
              "minItems": 1,
              "maxItems": 5,
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "description": "One-based layer position."
                  },
                  {
                    "type": "string",
                    "const": "*"
                  }
                ],
                "description": "Positive layer number or wildcard."
              },
              "description": "Layer positions in order from the root."
            },
            {
              "type": "string",
              "pattern": "^[1-9]\\d*(?:\\s*,\\s*(?:[1-9]\\d*|\\*)){0,4}$",
              "description": "Comma-separated layer positions, such as 1,2,*."
            }
          ],
          "description": "One to five layer positions as an array or comma-separated path. Start with a positive number. Omit trailing positions to include descendants."
        },
        "frequency": {
          "description": "Native frequency code or BOJ label such as MONTHLY. W or WEEKLY selects every weekly variant.",
          "type": "string",
          "enum": [
            "CY",
            "FY",
            "CH",
            "FH",
            "Q",
            "M",
            "W",
            "W0",
            "W1",
            "W2",
            "W3",
            "W4",
            "W5",
            "W6",
            "D"
          ]
        }
      },
      "required": [
        "db",
        "layer",
        "frequency"
      ],
      "additionalProperties": false
    },
    "start_date": {
      "description": "Inclusive start in YYYY-MM-DD, YYYY-MM, YYYY-Qn, YYYY-Hn, or YYYY format. Q and H are case-insensitive. Blank or omitted starts at the first published period.",
      "pattern": "^\\s*(?:(\\d{4})(?:-(?:(\\d{2})(?:-(\\d{2}))?|[Qq]([1-4])|[Hh]([1-2])))?)?\\s*$",
      "type": "string"
    },
    "end_date": {
      "description": "Inclusive end in YYYY-MM-DD, YYYY-MM, YYYY-Qn, YYYY-Hn, or YYYY format. Q and H are case-insensitive. Blank or omitted ends at the latest published period.",
      "pattern": "^\\s*(?:(\\d{4})(?:-(?:(\\d{2})(?:-(\\d{2}))?|[Qq]([1-4])|[Hh]([1-2])))?)?\\s*$",
      "type": "string"
    },
    "include_nulls": {
      "description": "Include dated null values in the inline results. Defaults to false. Counts and staged windows retain dated nulls.",
      "type": "boolean"
    },
    "series_limit": {
      "description": "Series per roster page. Defaults to 1 with a cap of 250.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Observations per series per inline slice, newest slice first. Defaults to 25 with a cap of 1,000.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cursor": {
      "description": "Collection, inline, or roster cursor from this tool. Keep the same selection, dates, null policy, applied limits, and stage setting.",
      "type": "string"
    },
    "stage": {
      "description": "Stage the complete roster page on a SQL canvas even when it fits inline. Defaults to false. The inline preview still follows limit and include_nulls.",
      "type": "boolean"
    },
    "canvas_id": {
      "description": "Canvas ID from a prior call. Stages this roster page as a new table on that canvas, even when it fits inline.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$"
    }
  },
  "additionalProperties": false
}
view source ↗

boj_get_tankan

open-world

Retrieve Tankan survey observations by item, industry, enterprise size and horizon. Defaults to four headline business conditions DIs for large manufacturers and nonmanufacturers. Browse published codes with boj_list_reference and topic tankan_codes.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "boj_get_tankan",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "start_date": {
      "description": "Inclusive start in YYYY-MM-DD, YYYY-MM, YYYY-Qn, YYYY-Hn, or YYYY format. Q and H are case-insensitive. Blank or omitted starts at the first published period.",
      "pattern": "^\\s*(?:(\\d{4})(?:-(?:(\\d{2})(?:-(\\d{2}))?|[Qq]([1-4])|[Hh]([1-2])))?)?\\s*$",
      "type": "string"
    },
    "end_date": {
      "description": "Inclusive end in YYYY-MM-DD, YYYY-MM, YYYY-Qn, YYYY-Hn, or YYYY format. Q and H are case-insensitive. Blank or omitted ends at the latest published period.",
      "pattern": "^\\s*(?:(\\d{4})(?:-(?:(\\d{2})(?:-(\\d{2}))?|[Qq]([1-4])|[Hh]([1-2])))?)?\\s*$",
      "type": "string"
    },
    "include_nulls": {
      "description": "Include dated null values in the inline results. Defaults to false. Counts and staged windows retain dated nulls.",
      "type": "boolean"
    },
    "series_limit": {
      "description": "Series per roster page. Defaults to 4 with a cap of 25.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Observations per series per inline slice, newest slice first. Defaults to 25 with a cap of 1,000.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cursor": {
      "description": "Collection, inline, or roster cursor from this tool. Keep the same selection, dates, null policy, applied limits, and stage setting.",
      "type": "string"
    },
    "stage": {
      "description": "Stage the complete roster page on a SQL canvas even when it fits inline. Defaults to false. The inline preview still follows limit and include_nulls.",
      "type": "boolean"
    },
    "canvas_id": {
      "description": "Canvas ID from a prior call. Stages this roster page as a new table on that canvas, even when it fits inline.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$"
    },
    "item": {
      "description": "Survey item code or published label. Defaults to business conditions (601).",
      "type": "string"
    },
    "industries": {
      "default": [
        "1000",
        "2000"
      ],
      "description": "Industries to include; defaults to manufacturing and nonmanufacturing.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "description": "Industry code or label."
      }
    },
    "sizes": {
      "default": [
        "1"
      ],
      "description": "Enterprise sizes: all, large, medium, small, or their BOJ codes.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "description": "Size code or label."
      }
    },
    "horizons": {
      "default": [
        "0",
        "1"
      ],
      "description": "Actual or forecast variants. Defaults to actual (0) and forecast (1). Select a forecast month code for annual projections from boj_list_reference with topic tankan_codes.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "description": "Actual/forecast code or label."
      }
    },
    "series_type": {
      "description": "Series type, e.g. DI, level, or a published code. Defaults to G (DI).",
      "type": "string"
    },
    "frequency": {
      "description": "Quarterly (Q or CQ), fiscal half (FH or SEMIANNUAL(SEP)), or fiscal year (FY or ANNUAL(MAR)). Defaults to Q.",
      "type": "string"
    },
    "aggregation": {
      "description": "Simple aggregate (F, default) or population estimate (G).",
      "type": "string"
    },
    "detail_item": {
      "description": "Three-digit detail item code, default 000.",
      "type": "string"
    },
    "include_discontinued": {
      "default": false,
      "description": "Include series marked discontinued.",
      "type": "boolean"
    }
  },
  "required": [
    "industries",
    "sizes",
    "horizons",
    "include_discontinued"
  ],
  "additionalProperties": false
}
view source ↗

boj_get_policy_rates

open-world

Get realized overnight call rates, the latest basic discount and loan rate, and a newest-first history of basic-rate changes.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "boj_get_policy_rates",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 25,
      "description": "Change events per page, capped at 100.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cursor": {
      "description": "Next cursor from a prior page with the same limit.",
      "type": "string"
    }
  },
  "required": [
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

boj_list_reference

open-world

Browse BOJ databases and layer paths, Tankan dimension codes, period formats, policy-rate identifiers, coverage gaps or source attribution.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "boj_list_reference",
    "arguments": {
      "topic": "<topic>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "topic": {
      "type": "string",
      "enum": [
        "databases",
        "layers",
        "frequencies",
        "tankan_codes",
        "policy_rates",
        "coverage_gaps",
        "attribution"
      ],
      "description": "Choose databases for database codes, layers for branch paths, frequencies for native period formats, tankan_codes for survey dimensions, policy_rates for rate series, coverage_gaps for related sources, or attribution for BOJ source credit."
    },
    "db": {
      "description": "Database code, required for layers.",
      "type": "string"
    },
    "layer": {
      "description": "Parent path for layers. Return only its immediate child headers.",
      "anyOf": [
        {
          "minItems": 1,
          "maxItems": 5,
          "type": "array",
          "items": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "One-based position."
          },
          "description": "Parent positions in order from the root."
        },
        {
          "type": "string",
          "pattern": "^[1-9]\\d*(?:\\s*,\\s*[1-9]\\d*){0,4}$",
          "description": "Comma-separated parent path, such as 1,2."
        }
      ]
    },
    "dimension": {
      "description": "Choose one dimension when browsing tankan_codes.",
      "type": "string",
      "enum": [
        "aggregation",
        "industry",
        "item",
        "series_type",
        "frequency",
        "horizon",
        "size",
        "detail_item"
      ]
    },
    "limit": {
      "default": 25,
      "description": "Reference entries per page, capped at 100.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cursor": {
      "description": "Next cursor for the same topic and filters.",
      "type": "string"
    }
  },
  "required": [
    "topic",
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

boj_dataframe_query

Run one read-only SELECT, optionally with CTEs, over staged BOJ tables. Use boj_dataframe_describe to discover table and column names. Give result columns distinct names and add a top-level ORDER BY with deterministic tie-breakers to page results.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "boj_dataframe_query",
    "arguments": {
      "canvas_id": "<canvas_id>",
      "sql": "<sql>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$",
      "description": "Canvas ID as an earlier response on this server returned it — exactly 10 characters of letters, digits, hyphens, and underscores."
    },
    "sql": {
      "type": "string",
      "minLength": 1,
      "description": "Read-only DuckDB SELECT or WITH ... SELECT, up to 65,536 UTF-16 code units."
    },
    "limit": {
      "default": 25,
      "description": "Result rows per page, capped at 1,000.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cursor": {
      "description": "Continuation from the same canvas, SQL, and limit.",
      "type": "string"
    }
  },
  "required": [
    "canvas_id",
    "sql",
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

boj_dataframe_describe

Describe tables and columns on an existing BOJ canvas, including row counts, expiry, and each series’ recorded and staged ranges. Pass a table_name with its next_cursor to see more series for that table.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "boj_dataframe_describe",
    "arguments": {
      "canvas_id": "<canvas_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$",
      "description": "Canvas ID as an earlier response on this server returned it — exactly 10 characters of letters, digits, hyphens, and underscores."
    },
    "table_name": {
      "description": "Name of one staged table. Omit to list all tables.",
      "type": "string"
    },
    "limit": {
      "default": 25,
      "description": "Manifest entries per table, capped at 100.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cursor": {
      "description": "Continuation for the named table and the same limit.",
      "type": "string"
    }
  },
  "required": [
    "canvas_id",
    "limit"
  ],
  "additionalProperties": false
}
view source ↗

disabled 1

boj_dataframe_drop

Remove a staged table and its series manifest from an existing BOJ canvas.

disabledwould be destructive

Disabled. Removing staged tables is disabled on this deployment.

BOJ_DATAFRAME_DROP_ENABLED=true
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$",
      "description": "Canvas ID as an earlier response on this server returned it — exactly 10 characters of letters, digits, hyphens, and underscores."
    },
    "table_name": {
      "type": "string",
      "minLength": 1,
      "description": "Name of the staged table to remove."
    }
  },
  "required": [
    "canvas_id",
    "table_name"
  ],
  "additionalProperties": false
}
view source ↗

Extensions

1

io.modelcontextprotocol/skills

{
  "directoryRead": true
}