
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
概覽
讓助理查詢西班牙 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 已有可用預設值。需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AENA Flights MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
✈️ AENA Flights MCP
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:
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):
- Settings → Apps → Advanced settings → enable Developer mode
- 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
Config for npm-based clients:
For Claude Code it is one command:
🧰 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
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:
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
airlineIATAfield 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版本歷史
1- v0.1.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分