met-mcp
met-mcp
MET Norway (Yr) の天気予報を提供する MCP サーバーです。学習プロジェクトとして作られました。
利用方法は次の3つです。
npm:
met-mcp— stdio 経由でローカル実行します。リモート:
https://met-mcp.met-mcp-worker.workers.dev/mcp— Cloudflare Workers 上の Streamable HTTP です。claude.ai のコネクタとして追加できます。MCP レジストリ:
io.github.trondbjoroy/met-mcp
ツール
geocode_location(name, latitude, longitude)— 地名から座標を検索します。MET にはジオコーディング API がないため、無料の Open-Meteo ジオコーダーを使用します。get_forecast(latitude, longitude, hours)— MET Locationforecast 2.0 による1時間ごとの予報。世界中で動作しますが、北欧で最も正確です。get_nowcast(latitude, longitude)— レーダーによる今後2時間の降水予報。北欧のみ。get_weather_alerts(latitude?, longitude?)— ノルウェー政府公認の危険警報 (MetAlerts)。座標を省略するとノルウェー全国の警報を取得できます。get_sun_events(latitude, longitude, date, utc_offset)— 日の出、日の入り、太陽南中時刻。世界的に対応。get_ocean_forecast(latitude, longitude, hours)— ノルウェー沿岸の波の高さと海水温。find_weather_stations(latitude, longitude, count)— 最寄りの公式気象観測所 (Frost) を検索します。get_historical_weather(station_id, from, to, elements)— Frost アーカイブの日単位・過去の観測値。中にはとてつもなく古い観測所もあります。
Frost の2つのツールには、https://frost.met.no/auth/requestCredentials.html で入手できる無料のクライアント ID が必要で、それを FROST_CLIENT_ID 環境変数 (または worker の場合は Cloudflare シークレット) として設定します。他のツールには何も必要ありません。
ツール定義は src/tools.ts にあり、stdio サーバーと worker で共有されます。
Related MCP server: OpenWeatherMap MCP Server
ビルドとテスト
npm install
npm run build
npm testこのテストは、stdio 標準入出力経由でサーバーを起動し、両方のツールを実際の API に対して呼び出します。
Claude Code での使用
claude mcp add met-weather -- node C:\Users\trond\met-mcp\dist\index.jsその後、Claude に「バーゲンの明日の天気は?」と聞いてみます。
MET の利用規約
連絡先を記載した識別可能な User-Agent を送信してください。
MET_USER_AGENT環境変数で設定します (例:met-mcp/0.1.0 you@example.com)。座標は小数第4位までにしてください。サーバーが自動的に丸めます。
データのライセンスは NLOD / CC BY 4.0 です。データを表示する際は MET Norway のクレジットを指示してください。
リモート版
worker/ には Cloudflare Workers へのデプロイが含まれています。createMcpHandler (MCP SDK v2) と MCP Streamable HTTP で、同じ2つのツールを提供します。開発は npm run dev、リリースは npm run deploy (いずれも worker/ から)。
仕組み
src/index.tsがサーバー全体です。stdio 経由で MCP を処理します。つまり stdin/stdout で JSON-RPC を行います。各ツールは Zod で入力スキーマを宣言します。MCP クライアント (Claude) がスキーマを読み取り、引数を検証します。
ツールの結果は
contentブロックです。このサーバーは JSON をテキストとして、LLM が必要とするものだけに絞って返します。素の METAP レスポンスにはタイムステップが約90あり、フィールドもずっと多くなります。console.logで stdout には絶対に出力しないでください。プロトコルストリームが壊れます。ログは stderr に出力します。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides LLM-friendly weather tools and Norwegian place name resolution via MCP, enabling weather forecasts, air quality, marine conditions, and activity planning.1MIT
- AlicenseNot gradedqualityDmaintenanceIntegrates OpenWeatherMap API with MCP to provide weather data, forecasts, air quality, maps, alerts, and geocoding via natural language.10MIT
- AlicenseNot gradedqualityBmaintenanceProvides weather data including current conditions, forecasts, and summaries via Open-Meteo with no API key required, enabling natural language queries through an MCP interface.MIT
- AlicenseNot gradedqualityCmaintenanceEnables access to MET Norway weather data including global forecasts, Nordic nowcast, sunrise/sunset times, air quality, and ocean forecasts via natural language queries.3MIT
Related MCP Connectors
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Visual Crossing Weather MCP — wraps the Visual Crossing Weather Timeline API
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/trondbjoroy/met-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server