AEMET

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

MCP server exposing AEMET (Spanish weather agency) forecasts, station data and warnings.

已驗證STDIO僅桌面位置與生活

概覽

AI 產生的概覽

讓助理取得西班牙 AEMET 的天氣預報、測站觀測資料與生效中的天氣警示。

可以做什麼
提供三個以 AEMET 官方 OpenData API 為後端的工具:get_municipality_forecast 依 INE 代碼回傳西班牙某市鎮最多七天的逐日預報;get_station_observation 回傳某氣象站最近約十二小時的逐時觀測資料,例如氣溫、風與降水;get_weather_warnings 回傳某地區或全西班牙生效中的 CAP 天氣警示。伺服器在內部處理 AEMET 的兩段式請求流程,工具直接回傳最終資料。
適用情境
當助理需要西班牙的即時或預報天氣、測站觀測資料或官方天氣警示時使用,例如旅遊、農業、活動安排或地方報導等情境。它只涵蓋西班牙與 AEMET 資料,並非全球通用的天氣資料來源。
執行需求
透過 stdio 在本機執行,通常由 MCP 用戶端以 npx 啟動;需要 Node.js 20 以上版本,以及透過 AEMET_API_KEY 環境變數提供的免費 AEMET OpenData API 金鑰。缺少該變數時,伺服器會在啟動時報錯結束。需要能連線至 AEMET OpenData API 的網路。
安裝前請注意
必須提供 AEMET_API_KEY 這組密鑰,它會從環境變數讀取;請勿寫入共用設定檔或提交至版本控制。API 金鑰有速率限制,觸及限制時伺服器會回傳錯誤,不會默默重試。這些工具只讀取公開天氣資料,不會寫入、傳送或刪除任何內容。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

aemet-mcp

MCP server that exposes public weather data from AEMET (Agencia Estatal de Meteorología, Spain) to AI agents and MCP-compatible clients.

Three tools, well-typed, backed by AEMET's official OpenData API:

  • get_municipality_forecast — daily forecast (up to 7 days) for a Spanish municipality, by INE code.
  • get_station_observation — last ~12h of hourly observation data (temperature, wind, precipitation…) from a weather station.
  • get_weather_warnings — active weather warnings (CAP alerts) for a region or all of Spain.

Prerequisites

Installation

No install needed — run it directly with npx:

bash
npx -y @mmillan76/aemet-mcp

The server communicates over stdio, so it's meant to be launched by an MCP client rather than run standalone in a terminal.

Configuration

The server reads the API key from the AEMET_API_KEY environment variable. It exits with an error at startup if it's missing.

Claude Desktop / Claude Code

Add to your MCP client config (e.g. claude_desktop_config.json):

json
{  "mcpServers": {    "aemet": {      "command": "npx",      "args": ["-y", "@mmillan76/aemet-mcp"],      "env": {        "AEMET_API_KEY": "your-api-key-here"      }    }  }}

Any other MCP client that supports stdio servers works the same way — point it at npx -y @mmillan76/aemet-mcp with AEMET_API_KEY set in the environment.

Local development

bash
git clone https://github.com/mmillan76/aemet-mcp.gitcd aemet-mcpnpm installcp .env.example .env   # fill in AEMET_API_KEYnpm run build

Test tool calls interactively with the MCP Inspector:

bash
npx @modelcontextprotocol/inspector node dist/index.js

(the Inspector reads AEMET_API_KEY from your shell environment, so export it — or source .env — before running the command above)

Notes on the AEMET API

AEMET OpenData uses a two-step pattern on every endpoint: the first request returns a JSON envelope with a datos URL, not the actual data; a second request to that URL returns the real payload. This server hides that detail — tools just return the final data. Rate limits apply per API key; if you hit them, the tool returns a clear error instead of retrying silently.

License

MIT — see LICENSE.

來源:README.md,提交 47ffdd6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分