met-mcp
met-mcp
Un servidor MCP para pronósticos meteorológicos de MET Norway (Yr). Construido como proyecto de aprendizaje.
Disponible de tres maneras:
npm:
met-mcp— ejecutar localmente sobre stdioRemoto:
https://met-mcp.met-mcp-worker.workers.dev/mcp— HTTP transmisible en Cloudflare Workers, agrégalo como conector de claude.aiRegistro MCP:
io.github.trondbjoroy/met-mcp
Herramientas
geocode_location(name, count)— encuentra coordenadas para un nombre de lugar. Utiliza el geocodificador gratuito de Open-Meteo, porque MET no tiene API de geocodificación.get_forecast(latitude, longitude, hours)— pronóstico por horas de MET Locationforecast 2.0. Funciona en todo el mundo, mejor en los países nórdicos.get_nowcast(latitude, longitude)— precipitación basada en radar para las próximas 2 horas. Solo países nórdicos.get_weather_alerts(latitude?, longitude?)— avisos oficiales de peligro noruegos (MetAlerts). Omite las coordenadas para toda Noruega.get_sun_events(latitude, longitude, date, utc_offset)— amanecer, atardecer y mediodía solar. En todo el mundo.get_ocean_forecast(latitude, longitude, hours)— altura de ola y temperatura del mar a lo largo de la costa noruega.find_weather_stations(latitude, longitude, count)— estaciones meteorológicas oficiales más cercanas (Frost).get_historical_weather(station_id, from, to, elements)— observaciones históricas diarias del archivo Frost; algunas estaciones se remontan a más de 100 años.
Las dos herramientas de Frost necesitan un ID de cliente gratuito de https://frost.met.no/auth/requestCredentials.html, configurado como variable de entorno FROST_CLIENT_ID (o un secreto de Cloudflare para el worker). Las demás herramientas no necesitan nada.
Las definiciones de herramientas están en src/tools.ts, compartidas entre el servidor stdio y el worker.
Related MCP server: OpenWeatherMap MCP Server
Compilar y probar
npm install
npm run build
npm testLa prueba inicia el servidor sobre stdio y llama a ambas herramientas contra las APIs en vivo.
Uso con Claude Code
claude mcp add met-weather -- node C:\Users\trond\met-mcp\dist\index.jsLuego pregunta a Claude: "¿Qué tiempo hará mañana en Bergen?"
Términos de servicio de MET
Envía un User-Agent identificativo con información de contacto. Configura la variable de entorno
MET_USER_AGENT, p. ej.met-mcp/0.1.0 you@example.com.Envía como máximo 4 decimales en las coordenadas. El servidor redondea por ti.
Licencia de datos: NLOD / CC BY 4.0. Da crédito a MET Norway cuando muestres los datos.
Versión remota
worker/ contiene el despliegue de Cloudflare Workers: las mismas dos herramientas servidas sobre MCP Streamable HTTP con createMcpHandler (MCP SDK v2). Desarrolla con npm run dev, publica con npm run deploy (ambos desde worker/).
Cómo funciona
src/index.tses todo el servidor. Habla MCP sobre stdio: JSON-RPC en stdin/stdout.Cada herramienta declara un esquema de entrada con Zod. El cliente MCP (Claude) lee el esquema y valida los argumentos.
Los resultados de las herramientas son bloques
content. Este servidor devuelve JSON como texto, recortado a lo que necesita un LLM: la respuesta cruda de MET tiene ~90 pasos de tiempo con muchos más campos.Nunca escribas a stdout con
console.log. Corrompe el flujo del protocolo. Registra en 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