AENA Flights MCP
The AENA Flights MCP server provides real-time flight data for all 50 Spanish airports managed by AENA.
Search flights (
search_flights): Query arrivals or departures by IATA code (e.g. MAD, BCN), filter by flight number, date (defaults to today), local time window, and hours back/forward. Automatically collapses codeshares and allows choosing data source:auto,website(up to 14 days ahead), orrest(past 54 hours + 24 hours ahead). Times are local Madrid time.Get flight (
get_flight): Retrieve detailed information for a specific flight by number, airport, and direction (arrivals/departures), including status, gates, terminals, and aircraft.List airports (
list_airports): Get all AENA airports with IATA/ICAO codes and city names.
The server automatically selects the best API source or allows manual override.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AENA Flights MCP Show me departures from Madrid-Barajas."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
βοΈ 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
Related MCP server: FAA Delays MCP
π¬ 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
How | For whom | Setup |
βοΈ Remote connector (above) | Everyone, iPhone included | One click |
π¦ Desktop extension | Claude Desktop | Download |
π© npm | Claude Code, Cursor, any MCP client |
|
π§ From source | Developers | See below |
Config for npm-based clients:
{
"mcpServers": {
"aena": {
"command": "npx",
"args": ["-y", "mcp-aena"]
}
}
}For Claude Code it is one command:
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
pnpm install
pnpm build # tsc β dist/
pnpm test # unit tests over captured fixtures, no network, no credentials
pnpm inspect # drive a live stdio session with the MCP inspectorCopy .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:
cd worker
pnpm install
npx wrangler deploy
npx wrangler secret put AENA_CLIENT_SECRET # optional, enables the REST sourceParsing 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
Available Tools
3 toolsget_flightGet a specific flightA
Find one flight by number at an airport. Convenience wrapper over search_flights that returns the single best match.
Inputs: airport (required), direction (required), flightNumber (required).
list_airportsList AENA airportsA
List all Spanish airports in the AENA network with IATA/ICAO codes and city. Fetched live, so always current.
Inputs: no named parameters.
search_flightsSearch flightsA
List flights for an AENA airport (arrivals or departures). Codeshares of the same physical flight are collapsed into one entry by default. Filter by flight number and/or a local-time window (e.g. afternoon = fromLocal 12:00, toLocal 20:00). Times in the output are local Madrid time.
Inputs: airport (required), direction (required), date, source, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 3 tools
Each tool has a distinct purpose: search_flights returns a list, get_flight returns a single flight, and list_airports provides airport data. While get_flight is a convenience wrapper over search_flights, the intent is clear and the usage patterns are unambiguous.
All tool names use verb_noun snake_case: search_flights, get_flight, list_airports. The verbs vary (search, get, list) but the pattern is consistent and the naming is predictable.
With only 3 tools, the server is tightly focused on flight and airport information. This is a well-scoped count for the domainβneither too sparse nor overloaded, and each tool serves a clear function.
The domain is read-only flight lookup and airport listing. The set covers listing all airports, searching flights with flexible filters, and retrieving a specific flight. There are no obvious dead ends or missing core operations for this purpose.
Maintenance
Related MCP Connectors
Live flight status and scheduled-route search via the official FlightAware AeroAPI.
Unofficial FlightStats MCP β wraps the Cirium FlightStats Flex API (api.flightstats.com/flex)
14 Korean airports flight info + Incheon arrival/departure congestion + facility search.
Unofficial FlightAware MCP β wraps FlightAware AeroAPI v4 (aeroapi.flightaware.com)
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides access to real-time and historical flight data from Flightradar24 API, enabling users to track live aircraft positions, query flight histories, and retrieve comprehensive aviation information including aircraft, airline, and airport details.159 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides live US airport operational status and delay data from the FAA, free and without authentication.70 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides real-time flight status, airport weather, delays, cheap flight deals, and TSA wait times without requiring an API key.28 npmMIT
- AlicenseNot gradedqualityBmaintenanceWraps the AirportGap API to provide airport data without authentication, enabling natural language queries about airports.277 npmMIT