@cyanheads/astronomy-mcp-server 0.4.3 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/AGENTS.md +28 -15
  2. package/CLAUDE.md +28 -15
  3. package/Dockerfile +11 -4
  4. package/README.md +24 -11
  5. package/changelog/0.5.x/0.5.0.md +29 -0
  6. package/changelog/0.5.x/0.5.1.md +35 -0
  7. package/changelog/template.md +10 -3
  8. package/dist/index.js +2 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.d.ts +4 -2
  11. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.d.ts.map +1 -1
  12. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js +8 -5
  13. package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts +43 -9
  15. package/dist/mcp-server/tools/definitions/find-events.tool.d.ts.map +1 -1
  16. package/dist/mcp-server/tools/definitions/find-events.tool.js +134 -23
  17. package/dist/mcp-server/tools/definitions/find-events.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts +18 -0
  19. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js +27 -6
  21. package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts +20 -8
  23. package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/get-rise-set.tool.js +49 -12
  25. package/dist/mcp-server/tools/definitions/get-rise-set.tool.js.map +1 -1
  26. package/dist/mcp-server/tools/definitions/get-sky-position.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/get-sky-position.tool.js +3 -1
  28. package/dist/mcp-server/tools/definitions/get-sky-position.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/list-visible.tool.js +1 -1
  30. package/dist/mcp-server/tools/definitions/list-visible.tool.js.map +1 -1
  31. package/dist/services/ephemeris/ephemeris-service.d.ts +32 -8
  32. package/dist/services/ephemeris/ephemeris-service.d.ts.map +1 -1
  33. package/dist/services/ephemeris/ephemeris-service.js +192 -35
  34. package/dist/services/ephemeris/ephemeris-service.js.map +1 -1
  35. package/dist/services/ephemeris/meteor-showers.d.ts +49 -0
  36. package/dist/services/ephemeris/meteor-showers.d.ts.map +1 -0
  37. package/dist/services/ephemeris/meteor-showers.js +122 -0
  38. package/dist/services/ephemeris/meteor-showers.js.map +1 -0
  39. package/dist/services/ephemeris/star-catalog.d.ts +6 -8
  40. package/dist/services/ephemeris/star-catalog.d.ts.map +1 -1
  41. package/dist/services/ephemeris/star-catalog.js +7 -4
  42. package/dist/services/ephemeris/star-catalog.js.map +1 -1
  43. package/dist/services/ephemeris/types.d.ts +46 -4
  44. package/dist/services/ephemeris/types.d.ts.map +1 -1
  45. package/dist/services/ephemeris/types.js +2 -1
  46. package/dist/services/ephemeris/types.js.map +1 -1
  47. package/dist/services/horizons/horizons-service.d.ts +8 -4
  48. package/dist/services/horizons/horizons-service.d.ts.map +1 -1
  49. package/dist/services/horizons/horizons-service.js +38 -7
  50. package/dist/services/horizons/horizons-service.js.map +1 -1
  51. package/dist/services/horizons/types.d.ts +14 -1
  52. package/dist/services/horizons/types.d.ts.map +1 -1
  53. package/package.json +11 -10
  54. package/server.json +3 -3
  55. package/skills/astronomy-guide/SKILL.md +62 -0
@@ -2,20 +2,33 @@
2
2
  * @fileoverview Domain types for the JPL Horizons small-body ephemeris extension.
3
3
  * @module services/horizons/types
4
4
  */
5
+ import type { ConstellationRef } from '../ephemeris/types.js';
5
6
  /**
6
7
  * One step of a Horizons OBSERVER ephemeris, normalized to the wire units. Every
7
8
  * numeric value present is finite — a row that cannot supply a required one is
8
9
  * discarded during the parse rather than carried with a sentinel the output schema
9
- * would reject.
10
+ * would reject. RA/Dec are astrometric ICRF (J2000), Horizons quantity 1.
10
11
  */
11
12
  export interface EphemerisPoint {
12
13
  altitudeDegrees?: number;
13
14
  azimuthDegrees?: number;
15
+ /** The constellation of the row's own J2000 RA/Dec, the frame `Constellation()` reads. */
16
+ constellation: ConstellationRef;
14
17
  decDegrees: number;
15
18
  distanceAu: number;
16
19
  magnitude: number | null;
17
20
  raHours: number;
21
+ /**
22
+ * Horizons quantity 23 (S-O-T), in degrees, from the request's vantage: the observer when
23
+ * one was supplied, Earth's center otherwise. Null when the column carries no number.
24
+ */
25
+ sunElongationDegrees: number | null;
18
26
  timeUtc: string;
27
+ /**
28
+ * The side of the Sun from the S-O-T `/r` code: `/L` (leads) is morning, `/T` (trails)
29
+ * evening. Null for `/?` (aligned with the Sun's center) or no code.
30
+ */
31
+ visibility: 'morning' | 'evening' | null;
19
32
  }
20
33
  export interface EphemerisResult {
21
34
  designation: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/horizons/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;OASG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/horizons/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,aAAa,EAAE,gBAAgB,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;OASG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/astronomy-mcp-server",
3
- "version": "0.4.3",
3
+ "version": "0.5.1",
4
4
  "mcpName": "io.github.cyanheads/astronomy-mcp-server",
5
5
  "description": "What's in the sky, computed offline — planet and moon positions, rise/set, phases, eclipses, and seasons for any place and time via MCP. STDIO or Streamable HTTP.",
6
6
  "type": "module",
@@ -18,7 +18,8 @@
18
18
  "CLAUDE.md",
19
19
  "AGENTS.md",
20
20
  "Dockerfile",
21
- "server.json"
21
+ "server.json",
22
+ "skills/"
22
23
  ],
23
24
  "scripts": {
24
25
  "build": "bun run scripts/build.ts",
@@ -81,27 +82,27 @@
81
82
  "license": "Apache-2.0",
82
83
  "packageManager": "bun@1.4.4",
83
84
  "engines": {
84
- "bun": ">=1.4.0",
85
+ "bun": ">=1.4.4",
85
86
  "node": ">=24.0.0"
86
87
  },
87
88
  "publishConfig": {
88
89
  "access": "public"
89
90
  },
90
91
  "dependencies": {
91
- "@cyanheads/mcp-ts-core": "^0.13.16",
92
+ "@cyanheads/mcp-ts-core": "^0.13.22",
92
93
  "astronomy-engine": "^2.1.19",
93
94
  "pino-pretty": "^13.2.0",
94
- "satellite.js": "^7.1.0",
95
+ "satellite.js": "^7.2.0",
95
96
  "zod": "^4.6.7"
96
97
  },
97
98
  "devDependencies": {
98
- "@biomejs/biome": "2.6.2",
99
+ "@biomejs/biome": "2.6.7",
99
100
  "@socketsecurity/bun-security-scanner": "^1.1.3",
100
- "@types/node": "^26.6.5",
101
+ "@types/node": "^26.6.6",
101
102
  "depcheck": "^1.4.7",
102
- "ignore": "^7.0.13",
103
- "tsc-alias": "^1.9.8",
103
+ "ignore": "^7.0.14",
104
+ "tsc-alias": "^1.9.10",
104
105
  "typescript": "^7.0.2",
105
- "vitest": "^5.0.5"
106
+ "vitest": "^5.1.0"
106
107
  }
107
108
  }
package/server.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/cyanheads/astronomy-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.4.3",
9
+ "version": "0.5.1",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",
@@ -19,7 +19,7 @@
19
19
  "registryBaseUrl": "https://registry.npmjs.org",
20
20
  "identifier": "@cyanheads/astronomy-mcp-server",
21
21
  "runtimeHint": "npx",
22
- "version": "0.4.3",
22
+ "version": "0.5.1",
23
23
  "environmentVariables": [
24
24
  {
25
25
  "name": "MCP_LOG_LEVEL",
@@ -58,7 +58,7 @@
58
58
  "registryBaseUrl": "https://registry.npmjs.org",
59
59
  "identifier": "@cyanheads/astronomy-mcp-server",
60
60
  "runtimeHint": "npx",
61
- "version": "0.4.3",
61
+ "version": "0.5.1",
62
62
  "environmentVariables": [
63
63
  {
64
64
  "name": "MCP_TRANSPORT_TYPE",
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: astronomy-guide
3
+ description: Chain the astronomy_* tools for observing questions — what is up tonight from a place, whether and when a planet can be seen, the next eclipse from a place and how long totality lasts, meteor showers and whether the Moon washes them out, when a bright star rises or transits, satellite passes, comet or asteroid positions. Covers anchoring dates to the observer's local night, what each tool means by visible, the Moon's interference, the 1900–2100 span, and the opt-in Horizons and satellite tools.
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: cyanheads
7
+ version: "1.1"
8
+ ---
9
+
10
+ ## Scope
11
+
12
+ - In-process and keyless: the Sun, the Moon, Mercury through Neptune, Pluto, and a 32-star bright-star catalog, for 1900–2100.
13
+ - Not covered: deep-sky objects (galaxies, nebulae, clusters), cloud cover, light pollution, aurora. Pair with a weather server for cloud cover and a space-weather server for aurora.
14
+ - Two network tools exist only where the deployment enables them: `astronomy_get_ephemeris` (JPL Horizons: asteroids, comets, spacecraft, and major bodies by Horizons ID number) and `astronomy_get_satellite_passes` (CelesTrak element sets).
15
+
16
+ ## Gates
17
+
18
+ - **Check the tool list before promising an extension answer.** When `astronomy_get_ephemeris` or `astronomy_get_satellite_passes` is not listed, it is switched off on this deployment and a call fails with "Tool … not found". Tell the user the question needs that tool; never approximate a comet position or a satellite pass from the core tools.
19
+ - **Anchor a date to the observer's local day.** A bare date (`2026-10-28`) or a UTC-midnight start resolves to 00:00 UTC, which west of Greenwich is the previous local afternoon, so `astronomy_get_rise_set` returns the previous evening's sunset. Pass local midday of the target date, converted to UTC, as `start`: the first Sun cycle then carries that evening's sunset and dusk and the next morning's dawn. Pass `timezone` and confirm the night from the `*_local` fields.
20
+ - **Dark starts at astronomical dusk, not sunset.** The dark-sky window runs from astronomical (−18°) dusk to astronomical dawn. In `astronomy_list_visible`, `civil_twilight`, `nautical_twilight`, and `astronomical_twilight` are all brighter than `dark`.
21
+ - **`astronomy_list_visible` lists what is above the horizon, not what can be seen.** It returns the Sun in daylight and a planet beside the Sun alike; judge each from `sky_condition` and its `visibility_note` ("daylight, not naked-eye visible", "lost in glare"), never from membership in the list. It never includes Uranus, Neptune, or Pluto, and includes stars only with `include_stars` — ask `astronomy_get_sky_position` for the outer planets.
22
+ - **Moon phase does not say whether the Moon is up.** The phase is geocentric. Before calling a night moon-washed or moon-free, get the Moon's rise and set with `astronomy_get_rise_set` over the same night and compare them with the dark window.
23
+ - **Outside 1900–2100 every core tool fails `time_out_of_range`.** Where `astronomy_get_ephemeris` is listed, it reaches other dates for a major body by its Horizons ID number — `301` for the Moon, `499` for Mars — returning position, distance, magnitude, constellation, and angle from the Sun (altitude and azimuth with an observer), but no phase name, rise/set, or event search. Its RA/Dec are J2000 (astrometric ICRF), so they differ from `astronomy_get_sky_position`'s apparent of-date values, by more the further the date is from 2000 — about 4° for Mars in 1700. Without it, the date is out of reach.
24
+
25
+ Magnitude runs backwards: lower is brighter, negative is very bright, and about 6 is the naked-eye limit under a dark sky.
26
+
27
+ ## Workflows
28
+
29
+ ### Tonight's sky from a place
30
+
31
+ The `astronomy_stargazing_plan` prompt templates this chain for users.
32
+
33
+ 1. Resolve coordinates and an IANA timezone upstream.
34
+ 2. `astronomy_get_rise_set` for `sun`, `start` at local midday: sunset, astronomical dusk, and the next astronomical dawn.
35
+ 3. `astronomy_get_moon_phase` for the illuminated fraction, and `astronomy_get_rise_set` for `moon` with `count` 2 — when the Moon is already up at the start, the first cycle holds only its set and the next rise is in the second — for the hours the Moon is up inside the dark window.
36
+ 4. `astronomy_list_visible` at an instant after astronomical dusk, with `include_stars` set and a `min_altitude` of about 10 to drop horizon-grazers. It evaluates one instant; a second call before astronomical dawn finds the objects that rise late.
37
+ 5. `astronomy_find_events` with `meteor_shower` at the observer's coordinates, `start` about four weeks before the night: keep the showers whose activity dates cover it (Meteor showers, below).
38
+ 6. Cloud cover and transparency from a weather server.
39
+
40
+ ### Can I see a planet this week?
41
+
42
+ - `astronomy_get_rise_set` for the planet with `count` 7, read against the Sun's dark window: it shows whether the planet is an evening object, a morning object rising after midnight, or up only in daylight.
43
+ - `astronomy_find_events` places it in its cycle: `conjunction` with `body` alone is when it sits beside the Sun, lost in its glare for weeks around that date; `opposition` (Mars through Pluto) is when it is up all night; `max_elongation` is the best showing for Mercury and Venus.
44
+ - Confirm a chosen time with `astronomy_list_visible` or `astronomy_get_sky_position`.
45
+
46
+ ### Eclipses
47
+
48
+ - **From a place**, pass `latitude` and `longitude` to `astronomy_find_events`. `kind`, the times, and the contacts are then what that place sees: an eclipse that is total elsewhere can be partial here. With a `timezone`, the contact times on the local clock are in `contacts_local`. To find the next total eclipse from a place, page through the results and keep those whose `kind` is `total`; a notice that the search reached the end of the supported span before one appears means none through 2100, not never.
49
+ - **Totality lasts** from `total_begin_utc` to `total_end_utc` in `contacts`; subtract them. For an annular eclipse the same pair bounds the ring phase; for a partial one both are null.
50
+ - **Where it is total**: the global search (no observer) returns at most the point of greatest eclipse. No tool returns the path of totality, so test a specific place with the local search instead of judging from that point.
51
+
52
+ ### Meteor showers
53
+
54
+ - `astronomy_find_events` with `event` `meteor_shower` returns the maxima of nine major annual showers, each with `zhr`, the radiant, activity dates, and the Moon's illuminated fraction; `shower` narrows it to one by IMO code or name. A latitude and longitude together add the radiant's and the Sun's altitude at the maximum, which can fall in daylight.
55
+ - A shower counts when its maximum is at or after `start`, so a search from tonight skips one already past its maximum but still active. To check a night, start about four weeks before it and keep the showers whose `activity_start_date` to `activity_end_date` covers that night, as the `astronomy_stargazing_plan` prompt does.
56
+ - `moon_illuminated_fraction` is geocentric. Moon interference across the night still comes from the Moon's rise and set (`astronomy_get_rise_set` for `moon`) against the dark window.
57
+
58
+ ### Satellites and small bodies
59
+
60
+ - Tell the user where to look from the visible stretch — `visible_start_utc` to `visible_end_utc` with their altitudes and azimuths — not from rise and set: the satellite can rise in Earth's shadow and only appear partway through the pass.
61
+ - `start` must fall within 30 days of the current element set's epoch, before or after it — in practice, roughly the past month or the next month from today. Passes from earlier or further ahead fail `time_out_of_range`.
62
+ - For "where will this comet be next month", request a `1d` step across the month with observer coordinates for altitude and azimuth, and confirm `target_name` is the object meant. Each row names its `constellation`, for finding the object on a chart, and carries `sun_elongation_degrees` with `visibility` — how far it sits from the Sun and whether it is a morning or evening object; one close to the Sun stays in twilight.