Runnable examples for querying astronomy TAP services with Starfetch, plus an MCP Inspector walkthrough for exploring Starfetch's tools, prompts, and resources through a real MCP client.
The examples cover these TAP and ADQL workflows:
- service, table, and column discovery;
- bounded synchronous ADQL queries;
- explicit asynchronous TAP job lifecycle commands;
- VOTable, CSV, TSV, JSON, and JSONL output;
- Gaia, SIMBAD, VizieR, NASA Exoplanet Archive, and IRSA;
- the Starfetch CLI, TypeScript API, and MCP server.
Node.js 22.13 or newer is required.
Install the exact Starfetch versions recorded in the lockfile:
npm ciEvery example has its exact ADQL in a .sql file, expected output columns, and
a cross-platform Node.js runner:
node 01-gaia-nearby-stars/run.mjsGenerated result files are written to the example's ignored out/ directory.
Run all live examples with:
npm run examples:liveLive examples contact public TAP services. Default CI omits them because remote availability, rate limits, and network conditions are outside this repository's control.
Launch MCP Inspector against the installed Starfetch server:
npm run inspect:mcpFollow the Inspector walkthrough to retrieve Starfetch resources and prompts, inspect metadata, execute a bounded query, and examine failure recovery against public TAP services.
01-gaia-nearby-stars: nearby Gaia DR3 sources.02-gaia-high-proper-motion: high proper-motion Gaia DR3 sources.03-gaia-hr-diagram-table: starter table for downstream HR diagrams.04-simbad-field-object-types: SIMBAD object types in a sky region.05-simbad-identifiers-join: SIMBADbasictoidentjoin.06-vizier-catalog-field-query: VizieR Gaia DR3 field query.07-vizier-filtered-catalog-query: bounded VizieR catalog query.08-exoplanet-target-shortlist: NASA Exoplanet Archive shortlist export.09-exoplanet-transiting-hosts: known transiting exoplanet hosts.10-irsa-wise-region-query: IRSA AllWISE cone query.11-irsa-spatial-query-cookbook: IRSA cone, box, and polygon queries.12-gaia-async-large-query: Gaia TAP async submit/status/wait/fetch/delete.
npm run format:check
npm run lint
npm run typecheck
npm run smokeThe smoke test starts the installed Starfetch MCP server over stdio and checks that representative tools, prompts, and resources are discoverable without querying a remote TAP service.
MIT