{
  "markdown": "# ✈️ AENA Flights MCP\n\n[![CI](https://github.com/MrGo2/aena-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/MrGo2/aena-mcp/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/mcp-aena)](https://www.npmjs.com/package/mcp-aena)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n**Español: [README.es.md](README.es.md)**\n\nLive 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.\n\nIt 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.\n\n## 🚀 Use it in 30 seconds (no install)\n\nThe server runs publicly at `https://aena-mcp.carlos-ls.workers.dev/mcp`. Add it to Claude with one click:\n\n**[➕ Add to Claude](https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=AENA%20Flights&connectorUrl=https%3A%2F%2Faena-mcp.carlos-ls.workers.dev%2Fmcp)**\n\nThat 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.\n\nPrefer to add it by hand? Claude → Settings → Connectors → Add custom connector, name it `AENA Flights` and paste the URL above.\n\n### 🤖 Also works in ChatGPT\n\nChatGPT has no one-click install link, but the same server works there (Plus, Pro and Business plans, web only):\n\n1. Settings → Apps → Advanced settings → enable **Developer mode**\n2. In the Apps panel press **+** and add the server with URL `https://aena-mcp.carlos-ls.workers.dev/mcp`, authentication: none\n\n## 💬 Things you can ask\n\n- 🛫 \"Departures from MAD between 16:00 and 18:00\"\n- 🛬 \"What flights arrive at BCN from London tomorrow afternoon?\"\n- 🔍 \"Where is flight UX7235 right now, which gate?\"\n- 🏝️ \"List all AENA airports in the Canary Islands\"\n\n## 🖥️ Other ways to run it\n\n| How | For whom | Setup |\n|---|---|---|\n| ☁️ Remote connector (above) | Everyone, iPhone included | One click |\n| 📦 Desktop extension | Claude Desktop | Download `aena-mcp.mcpb` from the [latest release](https://github.com/MrGo2/aena-mcp/releases/latest), double click |\n| 🟩 npm | Claude Code, Cursor, any MCP client | `npx mcp-aena` |\n| 🔧 From source | Developers | See below |\n\nConfig for npm-based clients:\n\n```json\n{\n  \"mcpServers\": {\n    \"aena\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-aena\"]\n    }\n  }\n}\n```\n\nFor Claude Code it is one command:\n\n```bash\nclaude mcp add aena -- npx -y mcp-aena\n```\n\n## 🧰 Tools\n\n- `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.\n- `get_flight` — one flight by number at an airport.\n- `list_airports` — every AENA airport with IATA/ICAO codes, fetched live.\n\n## 🔀 Why two APIs\n\nAENA exposes two ways to read flights, and each covers a gap the other leaves open.\n\n- 🌐 The **website API** is public and needs no credentials. It sees roughly 14 days ahead but has no past data. Good for discovery.\n- 🔐 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.\n\nThe 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.\n\n## 🛠️ From source\n\n```bash\npnpm install\npnpm build      # tsc → dist/\npnpm test       # unit tests over captured fixtures, no network, no credentials\npnpm inspect    # drive a live stdio session with the MCP inspector\n```\n\nCopy `.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.\n\nThe public remote server lives in [`worker/`](worker/) (Cloudflare Workers, Streamable HTTP, no auth). To host your own:\n\n```bash\ncd worker\npnpm install\nnpx wrangler deploy\nnpx wrangler secret put AENA_CLIENT_SECRET   # optional, enables the REST source\n```\n\nParsing lives in pure normalizers (`normalizeWebsiteRow`, `normalizeRestRow`) so the mapping is tested without a live call. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\nCI 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.\n\n## 📝 Notes on the data\n\n- Arrivals is `\"A\"` in the REST API but `\"L\"` in the website API. The server hides this.\n- The REST `airlineIATA` field actually carries the ICAO code. The server resolves both.\n- Flight numbers differ by source: the REST API names flights by ICAO (`VLG1674`), the website by IATA (`VY1674`).\n- Neither API filters by flight number on the server, so searches pull the whole airport and filter locally.\n- Neither gives real takeoff or landing times, only scheduled and estimated. For wheels-off and wheels-on you need a source like FlightRadar24.\n\n## 📄 License\n\nMIT\n",
  "bytes": 5414,
  "sha": "829f2a66ef4a3c5c88fe0644324533669c7446b029c49eb607857c1f74080b1d",
  "repo_slug": "mrgo2/aena-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_mrgo2_aena_mcp_5823bffa/readme"
}