Met Mcp

io.github.trondbjoroy由 GitHub 帳號 trondbjoroy 發布v0.2.0更新於 Oct 24, 2026

Weather forecasts from MET Norway (Yr): geocoding plus hourly forecasts worldwide.

已驗證Streamable HTTP可網頁執行位置與生活資料與分析

概覽

AI 產生的概覽

用於 MET Norway(Yr)天氣資料的 MCP 伺服器:地理編碼、逐小時預報、即時降水、警報、日出日落、海洋預報與歷史觀測。

可以做什麼
依地名查出座標,再搭配其他工具使用。取得全球逐小時天氣預報(北歐涵蓋最佳),以及北歐地區未來兩小時的雷達分鐘級降水。查詢挪威官方危險警報,可省略座標取得全國警報;計算任意日期與地點的日出、日落與太陽正午。取得挪威沿岸的浪高、浪向與海溫。尋找最近的官方氣象站,並從 Frost 檔案取得每日歷史觀測,部分測站資料可追溯百年以上。
適用情境
適合讓助理回答天氣問題、依挪威與北歐的降雨或警報安排行程,或查詢特定氣象站的歷史觀測。若需要北歐以外地區的詳細天氣資訊,除基本逐小時預報與日出日落外幫助有限。
執行需求
可作為遠端 Streamable HTTP 端點使用,也可透過 npm 套件 met-mcp 在本機以 stdio 執行(需要 Node.js)。兩個 Frost 工具需要免費的 Frost 用戶端 ID,透過 FROST_CLIENT_ID 環境變數設定;其他工具無需憑證。需要連線至 MET Norway 與 Open-Meteo 介面的網路。MET 條款要求設定含聯絡方式的 MET_USER_AGENT。
安裝前請注意
歷史與氣象站工具需要 Frost 用戶端 ID,屬於須保密的憑證。請求會送往第三方介面(MET Norway、Open-Meteo);MET 條款要求送出含聯絡方式的識別 User-Agent,並在展示資料時標註 MET Norway。警報文字為挪威語。專案自述為學習專案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Met Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.trondbjoroy%2Fmet-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "met": {
      "type": "http",
      "url": "https://met-mcp.met-mcp-worker.workers.dev/mcp"
    }
  }
}

README

met-mcp

An MCP server for weather forecasts from MET Norway (Yr). Built as a learning project.

Available three ways:

  • npm: met-mcp — run locally over stdio
  • Remote: https://met-mcp.met-mcp-worker.workers.dev/mcp — Streamable HTTP on Cloudflare Workers, add it as a claude.ai connector
  • MCP registry: io.github.trondbjoroy/met-mcp

Tools

  • geocode_location(name, count) — find coordinates for a place name. Uses the free Open-Meteo geocoder, because MET has no geocoding API.
  • get_forecast(latitude, longitude, hours) — hourly forecast from MET Locationforecast 2.0. Works worldwide, best in the Nordics.
  • get_nowcast(latitude, longitude) — radar-based precipitation for the next 2 hours. Nordics only.
  • get_weather_alerts(latitude?, longitude?) — official Norwegian danger warnings (MetAlerts). Omit coordinates for all of Norway.
  • get_sun_events(latitude, longitude, date, utc_offset) — sunrise, sunset, and solar noon. Worldwide.
  • get_ocean_forecast(latitude, longitude, hours) — wave height and sea temperature along the Norwegian coast.
  • find_weather_stations(latitude, longitude, count) — nearest official weather stations (Frost).
  • get_historical_weather(station_id, from, to, elements) — daily historical observations from the Frost archive; some stations go back over 100 years.

The two Frost tools need a free client ID from https://frost.met.no/auth/requestCredentials.html, set as the FROST_CLIENT_ID env var (or a Cloudflare secret for the worker). The other tools need nothing.

Tool definitions live in src/tools.ts, shared between the stdio server and the worker.

Build and test

bash
npm installnpm run buildnpm test

The test spawns the server over stdio and calls both tools against the live APIs.

Use with Claude Code

bash
claude mcp add met-weather -- node C:\Users\trond\met-mcp\dist\index.js

Then ask Claude: "What is the weather in Bergen tomorrow?"

MET terms of service

  • Send an identifying User-Agent with contact info. Set the MET_USER_AGENT env var, e.g. met-mcp/0.1.0 [email protected].
  • Send at most 4 decimals in coordinates. The server rounds for you.
  • Data license: NLOD / CC BY 4.0. Credit MET Norway when you show the data.

Remote version

worker/ holds the Cloudflare Workers deployment: the same two tools served over MCP Streamable HTTP with createMcpHandler (MCP SDK v2). Develop with npm run dev, ship with npm run deploy (both from worker/).

How it works

  • src/index.ts is the whole server. It speaks MCP over stdio: JSON-RPC on stdin/stdout.
  • Each tool declares an input schema with Zod. The MCP client (Claude) reads the schema and validates arguments.
  • Tool results are content blocks. This server returns JSON as text, trimmed to what an LLM needs — the raw MET response has ~90 timesteps with far more fields.
  • Never write to stdout with console.log. It corrupts the protocol stream. Log to stderr.

來源:README.md,提交 c147c1b

工具

8

geocode_location

Geocode a place name

Find latitude and longitude for a place name. Use the coordinates with the other tools.

輸入參數name必填count

get_forecast

Get weather forecast

Get an hourly weather forecast from MET Norway (Yr) for a coordinate. Works worldwide, best coverage in the Nordics.

輸入參數hourslatitude必填longitude必填

get_nowcast

Get precipitation nowcast

Minute-by-minute precipitation for the next 2 hours, radar-based. Nordic region only. Answers 'do I need an umbrella right now?'

輸入參數latitude必填longitude必填

get_weather_alerts

Get weather alerts

Official danger warnings (wind, flood, ice, forest fire...) from MET Norway. Covers Norway and its waters. Omit coordinates to get all current alerts. Alert text is in Norwegian.

輸入參數latitudelongitude

get_sun_events

Get sunrise and sunset

Sunrise, sunset, and solar noon for a coordinate and date. Works worldwide.

輸入參數date必填latitude必填longitude必填utc_offset

get_ocean_forecast

Get ocean forecast

Wave height, wave direction, and sea temperature. Covers the Norwegian coast and nearby seas.

輸入參數hourslatitude必填longitude必填

find_weather_stations

Find weather stations

Find the nearest official weather stations (Frost). Use the station id (e.g. SN50540) with get_historical_weather.

輸入參數countlatitude必填longitude必填

get_historical_weather

Get historical weather

Daily historical observations from a weather station (Frost archive, some stations go back over 100 years). Find station ids with find_weather_stations.

輸入參數to必填from必填elementsstation_id必填

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分