jshis-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jshis-mcp 東京駅(北緯35.6812度、東経139.7671度)で30年以内に震度5強以上の確率を調べて"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
jshis-mcp
防災科研の地震ハザードステーション(J-SHIS)のデータを使い、指定した地点で一定以上の揺れが起きる確率や、地盤による揺れの増幅率を調べます。MCP、CLI、Pythonライブラリで使える照会専用のツールです。APIキーは不要です。
MCP登録 · CLI · Pythonライブラリ
準備
uv と Git が必要です。Python 3.12以上に対応しています。MCPやCLIで使う場合は、リポジトリをクローンして依存関係をインストールします。
git clone https://github.com/koizumikento/jshis-mcp.git
cd jshis-mcp
uv sync --lockedRelated MCP server: queria
MCPクライアントに登録する
設定例の /absolute/path/to/jshis-mcp は、クローン先の絶対パスに置き換えてください。Windowsでは C:/projects/jshis-mcp のように書けます。
Codex
codex mcp add jshis-mcp -- uv --directory "/absolute/path/to/jshis-mcp" run --locked jshis-mcp
codex mcp listcodex mcp list に jshis-mcp が表示されたら、Codexの新しいセッションで /mcp を開いて接続状態を確認してください。Codexの公式設定ガイド
Codexのデスクトップアプリから登録する場合は、設定の「MCP servers」でSTDIOサーバーを追加し、下のJSON例にあるコマンドと引数を指定します。
Claude Desktop / Cursor
次のファイルに設定します。
Claude Desktop(Windows)
%APPDATA%/Claude/claude_desktop_config.jsonClaude Desktop(macOS)
~/Library/Application Support/Claude/claude_desktop_config.jsonCursor
.cursor/mcp.json(プロジェクト内)
{
"mcpServers": {
"jshis-mcp": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/jshis-mcp",
"run",
"--locked",
"jshis-mcp"
]
}
}
}mcpServers がすでにある場合は、その中に jshis-mcp の項目を追加します。保存したらクライアントを再起動し、ツールが表示されることを確認してください。設定ファイルの場所と接続手順
クライアントが uv を見つけられない場合は、command に uv の実行ファイルの絶対パスを指定してください。
登録後は、チャットで次のように聞けます。
東京駅付近(北緯35.6812度、東経139.7671度)で、30年以内に震度5強以上の揺れが起きる確率を調べて。どの年の評価かも教えて。
ツール
いずれも緯度・経度(WGS84)を指定します。
調べたいこと | ツール | 選べる条件 |
今後30年間に、ある震度以上の揺れに見舞われる確率 |
|
|
指定した超過確率に対応する計測震度 |
|
|
工学的基盤から地表までの最大速度増幅率、地形の区分、平均S波速度 |
| 表層地盤モデルV4 |
例えば、東京駅付近の今後30年間の震度5強以上の確率を調べるには、get_earthquake_hazard に次を渡します。
{
"latitude": 35.6812,
"longitude": 139.7671,
"minimum_jma_intensity": "5-upper"
}確率と計測震度の照会には、J-SHISの2024年版(平均ケース・全地震)を使います。約250m四方の区画ごとの長期評価です。結果には評価の版と出典も含まれます。
CLIで使う
準備でクローンしたディレクトリで、調べたい項目に応じて次のコマンドを実行します。
uv run jshis-mcp get-earthquake-hazard --latitude 35.6812 --longitude 139.7671 --minimum-jma-intensity 5-upper
uv run jshis-mcp get-hazard-intensity --latitude 35.6812 --longitude 139.7671 --period-years 50 --exceedance-probability-percent 5
uv run jshis-mcp get-surface-ground-amplification --latitude 35.6812 --longitude 139.7671結果はUTF-8のJSONとして標準出力に書き出します。引数を確認するには、サブコマンドに --help を付けます。たとえば uv run jshis-mcp get-earthquake-hazard --help です。
Pythonライブラリとして使う
自分のPythonプロジェクト(pyproject.toml があるディレクトリ)で依存関係に追加します。
uv add "git+https://github.com/koizumikento/jshis-mcp.git@main"次のコードを example.py に保存し、同じディレクトリで uv run python example.py を実行します。
import asyncio
from jshis_mcp import get_earthquake_hazard
result = asyncio.run(get_earthquake_hazard(latitude=35.6812, longitude=139.7671))
print(result)ツール一覧にある3つのツールは、同じ名前のPython関数として呼び出せます。すでにイベントループが動いている場合は、関数を直接 await してください。
出典と利用条件
コードはMITライセンスです。地震ハザードと表層地盤のデータは、ツールの実行時に防災科研のJ-SHISから取得します。取得したデータにはJ-SHISの利用規約が適用されます。
表層地盤データを資料などに転載・引用する場合は、「表層地盤データ記述ファイル規約」に記載された参考文献を引用してください。
地震動予測地図データをそのまま第三者に配布することは、ファイル形式だけを変えた場合も禁止されています。加工した成果物を販売する場合は、防災科研にお問い合わせください。
J-SHIS利用規約 · データと参考文献の案内 · 地震ハザードAPI · 表層地盤API
開発
uv sync --locked
uv run ruff check .
uv run ty check
uv run pytest
uv buildAvailable Tools
3 toolsget_earthquake_hazardBRead-onlyIdempotent
Read the 30-year probability of meeting or exceeding a JMA intensity at a WGS84 point.
Inputs: latitude (required), longitude (required), minimum_jma_intensity. Returns: object
get_hazard_intensityARead-onlyIdempotent
Read instrumental intensity at a specified exceedance probability at a WGS84 point.
Choose 3% or 6% for 30 years (default 3%), or 2%, 5%, 10% or 39% for 50 years (default 5%).
Inputs: latitude (required), longitude (required), period_years, exceedance_probability_percent. Returns: object
get_surface_ground_amplificationBRead-onlyIdempotent
Read surface ground velocity amplification and geomorphology at a WGS84 point.
Inputs: latitude (required), longitude (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools target distinct outputs: hazard probability, intensity at an exceedance probability, and surface amplification/geomorphology. The first two share the same point-based hazard domain and their names could be momentarily confused, but the descriptions clarify the inverse relationship between the queries.
All tools follow a consistent snake_case get_<resource> pattern: get_earthquake_hazard, get_hazard_intensity, get_surface_ground_amplification. The convention is predictable and readable throughout.
Three tools is a well-scoped surface for a focused point-based seismic hazard lookup server. Each tool provides a distinct hazard or site-amplification product, and no tool appears redundant.
The set covers the core JSHIS-style point queries: probabilistic hazard, intensity at exceedance probabilities, and surface amplification with geomorphology. Minor gaps such as metadata, supported probability/period enumeration as a separate tool, or bulk/point-list operations are not present but can likely be worked around from the descriptions.
Maintenance
Related MCP Connectors
MCP server for Japan geodata: cadastral lot numbers (chiban) and reverse geocoding, for AI agents.
JMA (Japan Meteorological Agency) MCP — keyless weather forecasts, warnings, and earthquake data…
USGS Earthquake Catalog MCP (FDSNWS event API).
Land Price Japan MCP — official Japanese land prices (地価公示 / 地価調査) from MLIT's 不動産情報ライブラリ (Real…
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server that surfaces cited official Japanese government data on Nankai Trough earthquake hazards, building safety standards, and routes users to official hazard maps without inventing numbers.683 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to query Japanese open data (e-Stat, 国土数値情報, EDINET, 気象庁 etc.) from Queria using SQL.1MIT
- FlicenseNot gradedqualityCmaintenanceProvides Japanese station accessibility and hazard data via MCP tools, including toilet information, public toilet locations, and official hazard categories.1-
- AlicenseNot gradedqualityDmaintenanceEnables fetching latest earthquake data from Kandilli Observatory, searching earthquakes by region, and obtaining regional statistics through MCP tools.MIT