ourairports-mcp-server
Allows the MCP server to be deployed and run on Cloudflare Workers for edge execution.
Enables distributed tracing and structured logging via OpenTelemetry for observability.
Provides Supabase as a swappable storage backend, enabling persistent data storage using Supabase's PostgreSQL database.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Public Hosted Server: https://ourairports.caseyjhand.com/mcp
Overview
Airports, runways, navaids, and radio frequencies worldwide from the public-domain OurAirports dataset, bundled for offline use. Resolve an airport by any code, search by name or facets, and find the airports and navaids nearest a coordinate.
Tools
Tool | Description |
| Search exact airport codes, names, keywords, and facets. Ranked summaries with offset continuation; closed airports excluded by default. |
| Search runways by surface, dimensions, lighting, and airport facets, optionally nearest-first from a coordinate. One row per matching runway. |
| Full record for one airport resolved by any code (IATA/ICAO/GPS/local/ident), with its runways and radio frequencies inline. |
| Airports within a radius of a coordinate, ranked nearest-first by great-circle distance, with distance and bearing. |
| Navigation aids near a coordinate, serving an airport, or sharing an exact navaid ident. |
| Countries with airport counts and optional nested regions, filtered by country and/or continent. The lookup table for valid |
Resources
Resource | Description |
| Single airport record by any code (IATA/ICAO/GPS/local/ident), with runways and frequencies inline. |
All data is also reachable via ourairports_get_airport — tool-only clients lose nothing. Not exposed as a resource list (enumerating 85k airports is a dump, not a discovery aid); discovery is ourairports_search_airports.
The OurAirports guide covers ambiguous codes and multi-tool airport, navaid, and runway queries. Plugin installs include it; MCP clients can read skill://ourairports-guide/SKILL.md.
Related MCP server: mcp-metar
Capability reference
The four search/find tools accept offset (default 0). When more rows remain, pass nextOffset as the next request's offset, keeping the query and data snapshot unchanged. totalCount counts all filtered matches; truncated, shown, and cap describe a page with more results after it. A past-end page is empty but retains its total.
Page ceilings are 100 rows for search and 50 for find. Explicit positive integer limits above the ceiling clamp with a notice, request log, and counter increment. Set OURAIRPORTS_CLAMP_LIMITS=false to restore strict rejection. Omitted limits use OURAIRPORTS_DEFAULT_SEARCH_LIMIT (20), bounded by the tool's ceiling.
ourairports_search_airports tool
Free-text search over name, municipality, and keywords; tokens are AND-matched (word order and partial words handled)
Exact codes match across IATA, ICAO, GPS, local code, and ident; a code-only query ranks its holders before incidental text matches. Hyphenated codes match whole. Name tokens also accept
intl,rgnl,muni,fld, andmemalongside their full spellings. Stopword-only or punctuation-only queries retain their no-searchable-terms result; useourairports_get_airportfor an explicit codeFaceted filters:
country(two letters),region(two letters followed by one or two hyphen-separated segments of 1–3 letters/digits), andtype. Codes are case-insensitive with surrounding whitespace ignored; literal""is unset, whitespace-only is invalid. Malformed codes fail argument validation; codes absent from the bundled tables raiseunknown_country/unknown_regionwith discovery guidance. Valid codes with no matching airports remain empty successesClosed airports excluded by default; opt in with
include_closedResults carry the full code set, coordinates, and recorded keywords for chaining into
ourairports_get_airport; operational/larger-airport ranking applies within the code-match tier
ourairports_search_runways tool
Airport facets (
country,region,type) narrow the airports first; runway facets (surface,min_length_ft,min_width_ft,lighted) then filter their runwaysCountry/region facets follow the same shape, empty-string, normalization, and bundled-membership rules as
ourairports_search_airports; valid empty selections remain successfulsurfaceaccepts a case-insensitive substring or a nonempty array of substrings matched with OR. Raw values have no controlled vocabulary:aspmatches ASP, ASPH, and Asphalt;conandpemcover other recorded surfacesOptional
latitude+longituderanks qualifying runways by the parent airport's coordinates, withradius_kmfrom 1–20,016 (default 100). Both coordinates are required together; a radius alone is invalidReturns one flat
{ airport, runway, distanceKm, bearingDeg }row per matching runway — an airport with three matching runways contributes three rows. Distance and bearing arenullwithout coordinates; rows then retain dataset traversal orderlengthFtandmin_length_ftare the full runway surface as OurAirports records it, including displaced thresholds and overruns — not usable takeoff or landing distance; each runway also carriesleDisplacedThresholdFt/heDisplacedThresholdFt(nullwhen none is recorded)A runway whose length or width is unknown is excluded when the matching
min_*_ftfilter is set — never assumed to meet a threshold the data can't confirmClosed airports and closed runways are both excluded unless
include_closed_airports/include_closed_runwaysis setEach runway also carries its end-center coordinates and elevation above mean sea level, distinct from displaced thresholds
ourairports_get_airport tool
Resolves a single
codecase-insensitively across all five identifier spaces (priority: ident → ICAO → IATA → GPS → local); surrounding whitespace is ignoredRunways and radio frequencies inline;
includetrims the response to a subset, and the output'sincludedfield distinguishes a relation omitted byincludefrom one that genuinely has no recordsEchoes the airport's complete code set plus a
resolvedVia/resolutionNote; when other airports carry the same code, the note names each one (ident, country, code space) and says whether resolution priority or dataset row order picked this airport, so a wrong resolution is self-correcting — pass the other airport's identRunways carry full-surface
lengthFt, per-end displaced thresholds, and each end center's latitude, longitude, and elevation in feet above mean sea levelAirport detail includes recorded keywords,
wikipediaLink, andhomeLink; valid web links are clickable in text output, and malformed recorded values remain visible as textAbsent codes reported as
null; closed airports always resolveunknown_codeerror with a recovery hint when no identifier space matches
ourairports_find_airports tool
Great-circle (haversine) ranking, nearest-first, each result with
distanceKmandbearingDeg(degrees true) from the query pointradius_km(1–20,016, default 100); optionaltypefilter;include_closedopt-inCoordinate in, ranked airports out — no geocoding; resolve place names to lat/lon upstream first
totalCountis the filtered in-radius count before paging;nextOffsetreaches farther resultsEmpty-radius guidance suggests a wider radius only below the global ceiling
ourairports_find_navaids tool
Coordinate mode:
latitude+longitude(+ optionalradius_km, 1–20,016, default 100) ranks navaids nearest-first with distance and bearingAirport mode:
airport_codereturns the navaids serving that airportIdent mode:
identmatches an exact navaid code, case-insensitively after trimming, and returns all holders in dataset order, including navaids without an associated airport.typecan narrow shared identsExactly one complete mode required — overlapping modes, no mode, or incomplete coordinates raise
mode_conflict; incomplete-coordinate messages name the missing counterpartfrequencyKhzis the stored value for every type (a VOR on 114.5 MHz reads 114500);frequencyMhzcarries the VHF frequency of a VOR or VOR-DME and the paired VHF frequency of a DME, TACAN, or VORTAC, and isnullfor NDB and NDB-DME, which tune in kHz; an upstream-1placeholder reads asnullEach navaid carries its service-volume metadata as recorded upstream:
usageType(HI, LO, BOTH, TERMINAL, RNAV),power,magneticVariationDeg(actual, positive east),slavedVariationDeg(the variation built into the radials), anddmeFrequencyKhz(the DME's paired VHF frequency) —nullwhere the dataset has no valuetotalCountis the match count before paging in every mode. Non-coordinate results have null distance and bearing;airportIdentis populated only in airport modeAirport mode distinguishes "airport not found" (
unknown_codeerror) from "airport found but has no associated navaids" (empty list with a note)Airport mode adds a
resolutionNotewhenairport_codeis also a code of other airports, naming them by ident — the same noteourairports_get_airportreturns
ourairports_list_countries tool
Optional
countryandcontinent(AF, AN, AS, EU, NA, OC, SA) filters combine as AND; optionalinclude_regionsnests regions by their recorded country association (soKS-U-Abelongs toXK)Use
{ "country": "US", "include_regions": true }for one country's regions. Unscopedinclude_regionsreturns the entire region table; unscoped and continent-only requests remain acceptedcountryuses the search tools' shape, normalization, and membership rules;""is unset, whitespace-only is invalid, and an absent code raisesunknown_countryAirport counts exclude closed airports
Countries sorted by name; the lookup table for valid
country/regionfilters used byourairports_search_airportsandourairports_search_runwaysA country/continent mismatch returns an empty success with a notice naming both filters;
totalCountcounts returned countries
airport://{code} resource
Same record as
ourairports_get_airport, including the sameresolutionNote— runways and radio frequencies always inline, so there is noinclude/includedcoderesolves case-insensitively across all five identifier spaces (priority: ident → ICAO → IATA → GPS → local)unknown_codeerror with a recovery hint when no identifier space matches
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
OurAirports-specific:
Bundled, public-domain dataset baked into the package and Docker image — zero runtime API, no key, no rate limit, no upstream outage
In-memory indices built once at startup: id maps, a priority-ordered unified code index, airport-ref joins for runways and frequencies, navaid indices for associated airports and exact idents, a flat
Float64Arrayof coordinates, country/region maps, and a tokenized text-search indexBrute-force haversine nearest-neighbour over the coordinate array — a few milliseconds across 85k airports, no spatial-index dependency
CSVs parsed by header name, not column position, so an upstream column reorder can't silently misalign fields
Ranked queries retain at most
offset + limitcandidates; unranked queries skip to the requested window. Both count every match
Agent-friendly output:
Honest sparsity — absent upstream fields (no IATA, no elevation, null runway dimensions) surface as
null, never fabricatedSelf-correcting resolution — every airport record echoes its full code set and a
resolvedVia/resolutionNotethat names every other airport sharing the code, by identText output that matches the structured output — coordinates render at full precision, and upstream text is Markdown-escaped in
contentonly, so names likeGRASS&GRAVELdisplay as recordedTruncation and empty-result disclosure — total counts, applied caps, and recovery guidance so callers can broaden, narrow, or re-query without parsing prose
Getting started
Connect to the hosted server from Claude Code:
claude mcp add --transport http ourairports-mcp-server https://ourairports.caseyjhand.com/mcpTo run locally:
claude mcp add ourairports-mcp-server -- npx -y @cyanheads/ourairports-mcp-serverFor other clients, add this to the MCP configuration file:
{
"mcpServers": {
"ourairports-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/ourairports-mcp-server"]
}
}
}The package and Docker image include the dataset. For Docker or a source build, see Running the server.
Configuration
Variable | Description | Default |
| Directory holding the six OurAirports CSV files. Overridable to point at a fresher local data drop. | Bundled |
| Default result cap for the search/find tools when the caller omits |
|
| Clamp explicit limits above each tool's page ceiling; |
|
| Transport: |
|
| Port for the HTTP server. |
|
| HTTP endpoint path where the server is mounted. |
|
| Auth mode: |
|
| HTTP session mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). Relative paths resolve from the server's package directory. |
|
| Storage backend (unused on the data path — the index is in-memory). |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Source builds require Bun v1.4.4 or newer. The installed package also runs on Node.js v24 or newer.
Clone and install:
git clone https://github.com/cyanheads/ourairports-mcp-server.git cd ourairports-mcp-server && bun installBuild and run:
# One-time data fetch + build bun run build:data bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker run --rm -p 127.0.0.1:3010:3010 ghcr.io/cyanheads/ourairports-mcp-server:latestThe image serves stateless HTTP at http://localhost:3010/mcp and logs to /var/log/ourairports-mcp-server. For a stdio client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/ourairports-mcp-server:latest"]. To build locally, run docker build -t ourairports-mcp-server .. Use --build-arg OTEL_ENABLED=false to omit OpenTelemetry peers.
Refreshing the data
Run bun run build:data and rebuild to pick up the latest daily CSV snapshot. The build validates country and region codes and airport references before writing the bundle. Use bun run build:data --check to validate an existing bundle, or set OURAIRPORTS_DATA_DIR to use a local data drop without rebuilding.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions. The |
| The bundled-data service — CSV parsing, in-memory indices, code resolution, search, and the haversine geo scan. |
| Build-time fetcher that bundles the six OurAirports CSVs into |
| Project development skills synced from |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources via the barrels in
src/mcp-server/*/definitions/index.tsSurface upstream data as-is: report absent fields as
null, never fabricate missing values
Attribution
Airport, runway, navaid, and frequency data from OurAirports, dedicated to the public domain. Attribution is a courtesy, not a requirement. Source CSVs are published daily at davidmegginson.github.io/ourairports-data.
OurAirports is community-edited; the data is surfaced as-is and is not authoritative for real flight operations — treat it the way you would any crowd-sourced reference.
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unofficial FlightAware MCP — wraps FlightAware AeroAPI v4 (aeroapi.flightaware.com)
Unofficial FlightStats MCP — wraps the Cirium FlightStats Flex API (api.flightstats.com/flex)
Geo MCP — geographic utilities from free public APIs
Geo-based flight search MCP server. Find more flights between any two places on earth
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive flight tracking capabilities using the OpenSky Network API, enabling real-time flight data, geographic searches, historical data, and airport operations through MCP tools.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for fetching METAR and TAF aviation weather data for airports by ICAO code.MIT
- FlicenseNot gradedqualityDmaintenanceEnables flight search, location lookup, and city information retrieval using the AllFlyghts public API through MCP tools.-
- AlicenseNot gradedqualityAmaintenanceGeocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data via MCP.518 npm9Apache 2.0