met-mcp
met-mcp
MCP-сервер для прогнозов погоды от MET Norway (Yr). Создан как учебный проект.
Доступен тремя способами:
npm:
met-mcp— запуск локально через stdioRemote:
https://met-mcp.met-mcp-worker.workers.dev/mcp— Streamable HTTP на Cloudflare Workers, добавьте его как коннектор claude.aiMCP registry:
io.github.trondbjoroy/met-mcp
Инструменты
geocode_location(name, count)— найти координаты по названию места. Использует бесплатный геокодер Open-Meteo, потому что у MET нет API геокодирования.get_forecast(latitude, longitude, hours)— почасовой прогноз от MET Locationforecast 2.0. Работает по всему миру, лучше всего в Северной Европе.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; некоторые станции ведут наблюдения более 100 лет.
Для двух инструментов Frost требуется бесплатный идентификатор клиента с https://frost.met.no/auth/requestCredentials.html, задаваемый как переменная окружения FROST_CLIENT_ID (или секрет Cloudflare для воркера). Остальным инструментам ничего не нужно.
Определения инструментов находятся в src/tools.ts, общие для stdio-сервера и воркера.
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: те же два инструмента, обслуживаемые через MCP Streamable HTTP с помощью createMcpHandler (MCP SDK v2). Разрабатывайте с помощью npm run dev, публикуйте с помощью npm run deploy (обе команды из worker/).
Как это работает
src/index.ts— это весь сервер. Он общается по MCP через stdio: JSON-RPC на stdin/stdout.Каждый инструмент объявляет схему ввода с помощью Zod. MCP-клиент (Claude) читает схему и проверяет аргументы.
Результаты инструментов — это блоки
content. Этот сервер возвращает JSON в виде текста, урезанного до того, что нужно LLM — сырой ответ MET содержит ~90 временных шагов с гораздо большим количеством полей.Никогда не пишите в stdout с помощью
console.log. Это повреждает поток протокола. Логируйте в stderr.
Available Tools
8 toolsfind_weather_stationsFind weather stationsAInspect
Find the nearest official weather stations (Frost). Use the station id (e.g. SN50540) with get_historical_weather.
Inputs: latitude (required), longitude (required), count.
geocode_locationGeocode a place nameCInspect
Find latitude and longitude for a place name. Use the coordinates with the other tools.
Inputs: name (required), count.
get_forecastGet weather forecastAInspect
Get an hourly weather forecast from MET Norway (Yr) for a coordinate. Works worldwide, best coverage in the Nordics.
Inputs: latitude (required), longitude (required), hours.
get_historical_weatherGet historical weatherAInspect
Daily historical observations from a weather station (Frost archive, some stations go back over 100 years). Find station ids with find_weather_stations.
Inputs: to (required), from (required), station_id (required), elements.
get_nowcastGet precipitation nowcastAInspect
Minute-by-minute precipitation for the next 2 hours, radar-based. Nordic region only. Answers 'do I need an umbrella right now?'
Inputs: latitude (required), longitude (required).
get_ocean_forecastGet ocean forecastCInspect
Wave height, wave direction, and sea temperature. Covers the Norwegian coast and nearby seas.
Inputs: latitude (required), longitude (required), hours.
get_sun_eventsGet sunrise and sunsetBInspect
Sunrise, sunset, and solar noon for a coordinate and date. Works worldwide.
Inputs: date (required), latitude (required), longitude (required), utc_offset.
get_weather_alertsGet weather alertsAInspect
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.
Inputs: latitude, longitude.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct weather data need: geocoding, hourly forecasts, nowcasting, alerts, solar events, ocean conditions, station lookup, and historical observations. The only potentially overlapping pair (get_forecast vs get_nowcast) is clearly separated by forecast horizon and description.
All tool names follow a consistent verb_noun snake_case pattern, with get_ as the dominant prefix and find_/geocode_ as clear exceptions that still follow the same grammatical structure. This makes the tool surface highly predictable.
Eight tools is well-scoped for a weather data server: each tool handles a specific data type or lookup step without redundancy. The count is large enough to cover the domain but small enough to avoid overwhelming an agent.
The tool set covers the full observation-to-forecast lifecycle: geocoding to obtain coordinates, station discovery for historical data, current conditions, short-term nowcast, forecast, alerts, ocean conditions, and solar events. No critical gaps are apparent for the stated weather domain.
Maintenance
Related MCP Connectors
MET Norway (api.met.no) MCP — global weather, Nordics specials.
Weather MCP — wraps Open-Meteo API (free, no auth)
Unofficial OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Get daily weather forecasts for any place on Earth via a hosted read-only MCP server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides 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.47 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides 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.59 npmMIT