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 分