Skip to main content
Glama

✈️ 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

Related MCP server: flight-tracker

πŸ’¬ 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 aena-mcp.mcpb from the latest release, double click

🟩 npm

Claude Code, Cursor, any MCP client

npx mcp-aena

πŸ”§ 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 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:

cd worker
pnpm install
npx wrangler deploy
npx 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

Available Tools

3 tools
get_flightGet a specific flightA

Find one flight by number at an airport. Convenience wrapper over search_flights that returns the single best match.

ParametersJSON Schema
NameRequiredDescriptionDefault
airportYesAirport IATA code
directionYes
flightNumberYese.g. IB0459, UX7235

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the tool returns a single best match and acts as a wrapper, but it omits details on error behavior, what happens when no match is found, or how 'best match' is determined, leaving some ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose and followed by a useful context statement about being a wrapper. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple lookup tool with three parameters and no output schema, the description covers the essential elements: what it does, how it relates to search_flights, and its single-match behavior. Missing error-case details, but overall sufficient for the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents airport and flightNumber, and direction has an enum but no description. The description adds little to parameter understandingβ€”it only mentions 'by number at an airport' and doesn't clarify the role of direction or the requirement for all three parameters. With 67% schema coverage, it doesn't compensate for the missing direction explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Find one flight by number at an airport' with a specific verb and resource. It distinguishes itself as a convenience wrapper over search_flights that returns a single best match, making its unique purpose evident.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly identifies itself as a wrapper over search_flights and notes that it returns 'the single best match', implying it should be used when a specific flight is needed rather than a broad search. However, it doesn't provide explicit when-not-to-use guidance or compare with list_airports.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_airportsList AENA airportsA

List all Spanish airports in the AENA network with IATA/ICAO codes and city. Fetched live, so always current.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses live fetching ('Fetched live, so always current'), which is useful behavioral context. For a simple read-only list tool, this is adequate, though it doesn't detail return formats or potential limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences. The first sentence front-loads the essential purpose, and the second adds a relevant behavioral note. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity, zero parameters, and no output schema, the description is complete. It provides the core purpose and the live-fetch detail, which is sufficient for an agent to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema is empty. As per baseline, with no parameters the description does not need to add parameter information. It correctly notes that the tool lists airports, which aligns with no input requirements.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List', the resource 'all Spanish airports in the AENA network', and includes specific attributes (IATA/ICAO codes and city). This makes it distinct from sibling tools like search_flights and get_flight, which deal with flights.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies that this tool is for retrieving airport lists, and given context signals, siblings are flight-related. However, it does not explicitly state when to use this tool over alternatives or mention exclusions. The usage context is clear but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoOnly flights on this local date (YYYY-MM-DD). Defaults to today when fromLocal/toLocal is set.
sourceNoauto
airportYesAirport IATA code, e.g. MAD, BCN, SCQ
toLocalNoOnly flights scheduled at or before this local time (HH:MM), e.g. 20:00 for afternoon
directionYes
fromLocalNoOnly flights scheduled at or after this local time (HH:MM), e.g. 12:00 for afternoon
hoursBackNoREST window: hours into the past
flightNumberNoFilter client-side, e.g. IB0459 or UX7235
hoursForwardNoREST window: hours into the future
collapseCodesharesNoCollapse codeshares of the same flight into one entry (default true)

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses several useful behaviors: codeshares are collapsed by default, output times are in local Madrid time, and filtering supports flight number and local-time windows. These go beyond the schema and help the agent anticipate output quirks. Minor omissions like pagination or error behavior exist, but the description is still above average.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the primary action, and every sentence adds distinct information (scope, codeshare behavior, filters, timezone). No padding or repetition. Ideal conciseness for a tool of this complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters and no output schema, the description covers the core use case but omits some important context. It does not explain the two filtering modes (local-time window vs. REST window with hoursBack/hoursForward), nor the 'source' parameter (auto/website/rest). The date fallback behavior is also missing. These gaps may lead to under-utilization or misuse, so completeness is adequate but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is high (80%), so baseline is 3. The description adds semantic value by clarifying how fromLocal/toLocal work together ('afternoon = 12:00 to 20:00'), explicitly mentioning the flightNumber filter, and restating the default codeshare collapse behavior. This supplements the schema descriptions without being redundant.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List flights') and the specific resource ('AENA airport' with arrivals/departures). It also differentiates from siblings: get_flight (likely a single flight lookup) and list_airports (airport list), by explicitly scoping to flights with direction and filters.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use the tool (listing flights for an AENA airport with direction and optional filters). It does not explicitly mention alternatives or exclusion criteria, but the context is strong enough to guide selection among siblings. No misleading usage guidance is present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev0.1.3
    • Changedsearch_flights5 fields changed
      • changedInput schema / properties / airport / description
        Previous value: -"Airport IATA code, e.g. MAD, BCN, LCG"New value: +"Airport IATA code, e.g. MAD, BCN, SCQ"
      • addedInput schema / properties / collapseCodeshares
        Added value: +{
        +  "default": true,
        +  "description": "Collapse codeshares of the same flight into one entry (default true)",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / date
        Added value: +{
        +  "description": "Only flights on this local date (YYYY-MM-DD). Defaults to today when fromLocal/toLocal is set.",
        +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
        +  "type": "string"
        +}
      • addedInput schema / properties / fromLocal
        Added value: +{
        +  "description": "Only flights scheduled at or after this local time (HH:MM), e.g. 12:00 for afternoon",
        +  "pattern": "^\\d{1,2}:\\d{2}$",
        +  "type": "string"
        +}
      • addedInput schema / properties / toLocal
        Added value: +{
        +  "description": "Only flights scheduled at or before this local time (HH:MM), e.g. 20:00 for afternoon",
        +  "pattern": "^\\d{1,2}:\\d{2}$",
        +  "type": "string"
        +}
  2. 3 tool updatesv0.1.1
    • First observedget_flight
    • First observedlist_airports
    • First observedsearch_flights

TDQS

A4.3/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MrGo2/aena-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server