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 分