AENA Flights MCP

io.github.MrGo2由 GitHub 账号 MrGo2 发布v0.1.3更新于 Oct 24, 2026

Flight data for Spain's 50 AENA airports over the public and OAuth2 REST APIs

概览

AI 生成的概览

让助手查询西班牙 50 个 AENA 机场的实时到达、出发和航班状态。

可以做什么
通过三个工具提供 AENA 航班数据:search_flights 查询某机场的到达或出发航班,可按航班号、日期或当地时间区间筛选;get_flight 按航班号查询单个航班;list_airports 列出所有 AENA 机场及其 IATA/ICAO 代码。它同时查询 AENA 的公开网站 API 和 OAuth2 REST API,并把结果统一成同一种航班结构,合并代码共享航班并处理 IATA/ICAO 差异。输出中的时间均为马德里当地时间。
适用场景
适合用自然语言询问西班牙机场航班的情况,例如某天下午从马德里出发的航班、从伦敦抵达巴塞罗那的航班,或某个航班的当前登机口。网站数据源可查约未来 14 天但没有历史数据;REST 数据源可查约过去 54 小时和未来 24 小时,并能显示代码共享背后的实际承运航班。
运行要求
可作为本地 stdio 进程通过 npx mcp-aena 运行(需要 Node.js),也可作为桌面扩展或托管远程端点运行。网站 API 无需凭据;REST API 需要 AENA_CLIENT_SECRET,而 AENA_CLIENT_ID 和 AENA_TENANT_ID 已有可用默认值。需要网络访问。
安装前请注意
REST 数据源需要 AENA_CLIENT_SECRET 凭据;没有它时服务器仅以网站模式运行。公开远程端点被描述为无需身份验证且已配置完整 REST 访问,因此使用者依赖该第三方主机。数据来自 AENA 的 API,仅包含计划和预计时间,不含实际起降时间。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AENA Flights MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

✈️ AENA Flights MCP

[CI] [npm] [License: MIT]

Español: README.es.md

Live flight data for the 50 Spanish airports run by AENA, as an MCP server. Ask Claude things like "what departures leave Santiago this afternoon?" or "is IB0459 delayed?" and it answers from real airport data: times, gates, terminals, aircraft, status and codeshares.

It puts both of AENA's flight APIs behind one clean set of tools, so an agent asks for flights and gets back the same flight shape no matter which API answered.

🚀 Use it in 30 seconds (no install)

The server runs publicly at https://aena-mcp.carlos-ls.workers.dev/mcp. Add it to Claude with one click:

➕ Add to Claude

That link opens claude.ai with the connector prefilled; just confirm. Works on every plan, Free included, and once added it is available in the Claude apps too, phone included. No account, no API key, nothing to configure.

Prefer to add it by hand? Claude → Settings → Connectors → Add custom connector, name it AENA Flights and paste the URL above.

🤖 Also works in ChatGPT

ChatGPT has no one-click install link, but the same server works there (Plus, Pro and Business plans, web only):

  1. Settings → Apps → Advanced settings → enable Developer mode
  2. In the Apps panel press + and add the server with URL https://aena-mcp.carlos-ls.workers.dev/mcp, authentication: none

💬 Things you can ask

  • 🛫 "Departures from MAD between 16:00 and 18:00"
  • 🛬 "What flights arrive at BCN from London tomorrow afternoon?"
  • 🔍 "Where is flight UX7235 right now, which gate?"
  • 🏝️ "List all AENA airports in the Canary Islands"

🖥️ Other ways to run it

HowFor whomSetup
☁️ Remote connector (above)Everyone, iPhone includedOne click
📦 Desktop extensionClaude DesktopDownload aena-mcp.mcpb from the latest release, double click
🟩 npmClaude Code, Cursor, any MCP clientnpx mcp-aena
🔧 From sourceDevelopersSee below

Config for npm-based clients:

json
{  "mcpServers": {    "aena": {      "command": "npx",      "args": ["-y", "mcp-aena"]    }  }}

For Claude Code it is one command:

bash
claude mcp add aena -- npx -y mcp-aena

🧰 Tools

  • search_flights — arrivals or departures for an airport. Filter by flight number, by date, or by a local-time window (afternoon = fromLocal 12:00, toLocal 20:00). Codeshares of the same physical flight collapse into one entry, and every time in the output is local Madrid time.
  • get_flight — one flight by number at an airport.
  • list_airports — every AENA airport with IATA/ICAO codes, fetched live.

🔀 Why two APIs

AENA exposes two ways to read flights, and each covers a gap the other leaves open.

  • 🌐 The website API is public and needs no credentials. It sees roughly 14 days ahead but has no past data. Good for discovery.
  • 🔐 The REST API uses OAuth2 and needs a client secret. It sees about 54 hours into the past and 24 ahead, and tells you the real operating flight behind a codeshare. Good for tracking.

The server picks the right one for you (source: "auto"), or you can force either. Without a secret it runs in website-only mode and still works. The public remote server has full REST access already configured.

🛠️ From source

bash
pnpm installpnpm build      # tsc → dist/pnpm test       # unit tests over captured fixtures, no network, no credentialspnpm inspect    # drive a live stdio session with the MCP inspector

Copy .env.example to .env. The website API needs nothing. For the REST API set AENA_CLIENT_SECRET; AENA_CLIENT_ID and AENA_TENANT_ID already have working defaults.

The public remote server lives in worker/ (Cloudflare Workers, Streamable HTTP, no auth). To host your own:

bash
cd workerpnpm installnpx wrangler deploynpx wrangler secret put AENA_CLIENT_SECRET   # optional, enables the REST source

Parsing lives in pure normalizers (normalizeWebsiteRow, normalizeRestRow) so the mapping is tested without a live call. See CONTRIBUTING.md.

CI runs the tests on Node 20 and 22 plus an MCP inspector smoke. Tagged pushes (v*) publish to npm (OIDC trusted publishing), the MCP Registry, and attach a .mcpb bundle to the GitHub release.

📝 Notes on the data

  • Arrivals is "A" in the REST API but "L" in the website API. The server hides this.
  • The REST airlineIATA field actually carries the ICAO code. The server resolves both.
  • Flight numbers differ by source: the REST API names flights by ICAO (VLG1674), the website by IATA (VY1674).
  • Neither API filters by flight number on the server, so searches pull the whole airport and filter locally.
  • Neither gives real takeoff or landing times, only scheduled and estimated. For wheels-off and wheels-on you need a source like FlightRadar24.

📄 License

MIT

来源:README.md,提交 1c50263

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

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

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分