# mofa-overseas-safety

> Which danger level (1-4) has Japan's MOFA set for a country and each of its regions, and when did it change? Hosted MCP and HTTP: no install, works from cloud agents. English level labels with MOFA's Japanese region text, issue dates and URLs, and a source and freshness receipt on every answer. Own record of observed changes since 2026-10-12 (JST). Free. Relay only: no danger assessment or travel advice. Not covered: spot and wide-area information, consular e-mails.

Data source: Ministry of Foreign Affairs of Japan (MOFA) Overseas Safety Information Open Data (country XML files: danger information and infectious disease danger information), https://www.ezairyu.mofa.go.jp/html/opendata/index.html . Reused under MOFA's open data terms (commercial use and modification allowed with attribution). Relayed, labelled in English and tracked over time by MK Career Planning; not an official service of MOFA or the Government of Japan.
This service relays danger levels published by the Ministry of Foreign Affairs of Japan (MOFA). It does not assess danger itself and gives no travel advice. 'no_danger_info_published' means MOFA currently publishes no danger information for that place; it is not a statement that the place is safe. 'not_yet_observed' means this service has no record yet; it is not level 0. Always check the MOFA page (danger.url) before relying on a level.
MOFA sets levels per region. regions[] (MOFA's Japanese region text with level) is authoritative; levels_present are MOFA's flags; max_level_derived is computed by this service and is not a country-wide level.
Not covered: spot information, wide-area information, consular e-mails, safety-measure overviews, and Japan itself.
History starts at tracking_since and records changes as observed at this service's polling times (each country is re-read about every 1-2 hours).
Free history window: change history recorded by this service is served for the last 30 days. A since earlier than that returns the last 30 days with history_window.clamped true (requested_since, served_since); older history can be requested as a paid product (not yet offered). tracking_since still shows when recording started.

## Connect

- MCP (streamable HTTP): https://mofa-overseas-safety-production.mk-career-planning.workers.dev/mcp
- OpenAPI: https://mofa-overseas-safety-production.mk-career-planning.workers.dev/openapi.json
- x402 discovery: https://mofa-overseas-safety-production.mk-career-planning.workers.dev/.well-known/x402

## Quickstart

- Developer quickstart (MCP client configs, free curl/TypeScript calls, how to read regions, not_yet_observed and stale, attribution): https://mofa-overseas-safety-production.mk-career-planning.workers.dev/quickstart

## Free tools

- catalog: List the tools of this server with prices, data sources, licensing, daily limits and data freshness.
- mofa_country_levels: Which danger level (1-4) does Japan's MOFA set now for this country, region by region? Look up by ISO 3166-1 alpha-2/alpha-3 or 4-digit MOFA code. Returns region-level entries in MOFA's Japanese text with English level labels, levels present, a derived max level (not a country-wide level), infectious disease danger notices, MOFA issue dates and URLs, previous levels from this service's own history (tracking_since), freshness and sources. Relays MOFA; no danger assessment or travel advice.
- mofa_level_changes: Which countries had their Japan MOFA danger or infectious disease danger levels (or region texts) change since a given time? From this service's own observation record: old and new levels, MOFA info ids and issue dates, when we observed the change and when we last saw the old state, plus polling gaps. Only changes since tracking_since, as observed at our polling times. Free window: last 30 days (an earlier since is clamped; see history_window). Relays MOFA; no advice.
- get_receipt: Re-fetch the stored result of a settled paid call by its receipt_id, for when the response was lost after payment. Free. Unknown or unsettled receipt ids return RECEIPT_NOT_FOUND. Results are kept for 90 days after settlement.
- HTTP: GET https://mofa-overseas-safety-production.mk-career-planning.workers.dev/v1/mofa/country, GET https://mofa-overseas-safety-production.mk-career-planning.workers.dev/v1/mofa/changes return the same data as the MCP tools. GET https://mofa-overseas-safety-production.mk-career-planning.workers.dev/v1/receipts/<receipt_id> is get_receipt.

## Payments

This server offers free tools only. It does not request or accept x402 payments.

## Rate limits

- Free calls (free HTTP endpoints under /v1/ and free MCP tools) are limited to 300 requests per 60 seconds per client (a client is keyed by a one-way hash of its IP address and the first 64 characters of its User-Agent; neither is stored. The User-Agent can be set by anyone, so this split is for fairness between clients behind a shared gateway, not a security control). Over the limit, HTTP returns 429 RATE_LIMITED with a Retry-After header and MCP tools return the error RATE_LIMITED. Paid calls are not rate limited.

## Provenance and fetch_status

Responses carry provenance[] (source, upstream_updated_at, retrieved_at, content_sha256, parser_version, fetch_status). fetch_status values:

- found: The upstream document was retrieved and contains the data used for this answer.
- empty: The upstream was retrieved, but it has no item for this query (for example JMA had no bulletin for that area in its feeds, or the municipality is not in the list). The state is unknown: empty does NOT mean 'none in effect'.
- stale: The data was retrieved but is older than the freshness threshold for its kind; treat it with care.
- unavailable: The upstream could not be retrieved, read or used (network error, withdrawn bulletin, paused source, or data not yet loaded).
- unsupported: The query is outside what this source covers (for example a date JMA does not issue warnings for yet, or a period before the source's records).

## Errors

- RECEIPT_NOT_FOUND (get_receipt)
- RATE_LIMITED (free calls over the per-client limit; HTTP 429 with Retry-After; not charged)

## Terms

- current: re-read within stale_after_hours. stale: older. not_yet_observed: no record yet (unknown, not level 0). unavailable: the record store could not be read.
- regions_parse complete means the levels read from MOFA's text match MOFA's flags; partial or none means read levels_section_ja and the MOFA page.

## Privacy and support

- Operator: MK Career Planning
- Terms of Service: https://mofa-overseas-safety-production.mk-career-planning.workers.dev/terms
- Privacy policy: https://mofa-overseas-safety-production.mk-career-planning.workers.dev/privacy
- Support (free): https://mofa-overseas-safety-production.mk-career-planning.workers.dev/support (mk.career.planning@gmail.com)
