DEV Community

atu ino
atu ino

Posted on

Japan Weekly Weather Forecast API — Free JSON with High/Low Temps and Precipitation Probability

If you want Japan's weekly weather forecast as JSON, the data is free and authoritative — it comes from the Japan Meteorological Agency (JMA, 気象庁). The problem is the shape: the JMA publishes it as deeply nested JSON with parallel arrays, one file per prefecture (130000 for Tokyo, 270000 for Osaka…), and the field meanings are only documented in Japanese.

This post shows a free MCP server that normalizes it into a flat, predictable structure you can call from an AI agent or plain Python.

  • Free — no API key, no signup
  • Authoritative — JMA is the official source
  • Cited — every response carries sources and reports failures in data_gaps instead of silently dropping them

What you actually get

Calling japan_weekly_forecast(prefecture="東京都") returns this (real output, trimmed):

{
  "retrieved_at": "2026-10-12T11:54:22+00:00",
  "sources": ["https://www.jma.go.jp/bosai/forecast/data/forecast/130000.json"],
  "data_gaps": [],
  "data": {
    "prefecture": "東京都",
    "area_code": "130000",
    "blocks": [
      {
        "time_defines": ["2026-10-13T00:00:00+09:00", "..."],
        "areas": [
          {"area": "東京地方", "weathers": ["くもり 時々 晴れ"]}
        ]
      },
      {
        "areas": [{"area": "東京地方", "pops": ["0", "0", "0", "10", "10"]}]
      },
      {
        "areas": [{"area": "東京", "temps": ["17", "25"]}]
      },
      {
        "areas": [
          {
            "area": "東京",
            "tempsMin": ["", "18", "18", "16", "15", "16", "18"],
            "tempsMax": ["", "27", "23", "24", "24", "24", "25"],
            "reliabilities": ["", "", "A", "A", "A", "A", "B"]
          }
        ]
      }
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

The last block is the one most people want: 7 days of high/low temperatures plus a reliability grade (A/B/C) so you can tell how much to trust day 6 and 7.

Why bother with a wrapper

Three things the raw JMA feed makes painful:

  1. Parallel arrays. Weather, precipitation probability, and temperature arrive in separate blocks whose time_defines do not line up 1:1. You have to join them yourself.
  2. Sub-areas. Tokyo is not one series — it is 東京地方, 伊豆諸島北部, 伊豆諸島南部, and 小笠原諸島, each with different period lengths. Naive zipping breaks.
  3. Encoding and terminology. Everything is Japanese. reliabilities (信頼度) is an A/B/C grade most consumers never notice.

The wrapper preserves the block structure (so nothing is lost) but keeps each series keyed by area, which is what makes it joinable.

Using it from an AI agent

The server speaks MCP over stdio, so Claude Code, Cursor, or any MCP client can call it directly.

{
  "mcpServers": {
    "japan-intel-mcp": {
      "command": "japan-intel-mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Then ask your agent something like "what's the forecast for Tokyo this week?" and it will call:

japan_weekly_forecast(prefecture="東京都")
Enter fullscreen mode Exit fullscreen mode

The other 7 tools

Weather is one of eight read-only tools in the same server — all free, all keyless:

Tool What it returns Source
japan_earthquakes Recent quakes: epicenter, magnitude, max intensity, depth JMA
japan_weather_warnings Active warnings/advisories by prefecture JMA
japan_weather_overview Narrative weather summary JMA
japan_weekly_forecast 7-day high/low temps, precipitation %, reliability JMA
japan_typhoons Active typhoon tracking JMA
japan_edinet_filings Statutory corporate disclosures EDINET
japan_postal_lookup Postal code → address (kanji and kana) zipcloud
japan_watch_summary One-call cross-source summary JMA

Install

pip install -e .
japan-intel-mcp          # stdio mode
Enter fullscreen mode Exit fullscreen mode

Source and releases: github.com/atushi1841/japan-intel-mcp

Also on the official MCP registry as io.github.atushi1841/japan-intel-mcp.

Design contract

  • Always cite — sources lists every upstream URL used
  • Never hide gaps — unavailable sources appear in data_gaps
  • Free only — no paid API keys anywhere in the stack

If you are building anything that needs current Japanese conditions — logistics, travel, event planning, or just an agent that should know it is typhoon season — this keeps you off scraped HTML.


Data used in this post

The datasets behind this analysis are available on Apify (pay-per-result, free tier to start):

Top comments (0)