@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.
- package/AGENTS.md +28 -15
- package/CLAUDE.md +28 -15
- package/Dockerfile +11 -4
- package/README.md +24 -11
- package/changelog/0.5.x/0.5.0.md +29 -0
- package/changelog/0.5.x/0.5.1.md +35 -0
- package/changelog/template.md +10 -3
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.d.ts +4 -2
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.d.ts.map +1 -1
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js +8 -5
- package/dist/mcp-server/prompts/definitions/stargazing-plan.prompt.js.map +1 -1
- package/dist/mcp-server/tools/definitions/find-events.tool.d.ts +43 -9
- package/dist/mcp-server/tools/definitions/find-events.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/find-events.tool.js +134 -23
- package/dist/mcp-server/tools/definitions/find-events.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts +18 -0
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js +27 -6
- package/dist/mcp-server/tools/definitions/get-ephemeris.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts +20 -8
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.js +49 -12
- package/dist/mcp-server/tools/definitions/get-rise-set.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.js +3 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/list-visible.tool.js +1 -1
- package/dist/mcp-server/tools/definitions/list-visible.tool.js.map +1 -1
- package/dist/services/ephemeris/ephemeris-service.d.ts +32 -8
- package/dist/services/ephemeris/ephemeris-service.d.ts.map +1 -1
- package/dist/services/ephemeris/ephemeris-service.js +192 -35
- package/dist/services/ephemeris/ephemeris-service.js.map +1 -1
- package/dist/services/ephemeris/meteor-showers.d.ts +49 -0
- package/dist/services/ephemeris/meteor-showers.d.ts.map +1 -0
- package/dist/services/ephemeris/meteor-showers.js +122 -0
- package/dist/services/ephemeris/meteor-showers.js.map +1 -0
- package/dist/services/ephemeris/star-catalog.d.ts +6 -8
- package/dist/services/ephemeris/star-catalog.d.ts.map +1 -1
- package/dist/services/ephemeris/star-catalog.js +7 -4
- package/dist/services/ephemeris/star-catalog.js.map +1 -1
- package/dist/services/ephemeris/types.d.ts +46 -4
- package/dist/services/ephemeris/types.d.ts.map +1 -1
- package/dist/services/ephemeris/types.js +2 -1
- package/dist/services/ephemeris/types.js.map +1 -1
- package/dist/services/horizons/horizons-service.d.ts +8 -4
- package/dist/services/horizons/horizons-service.d.ts.map +1 -1
- package/dist/services/horizons/horizons-service.js +38 -7
- package/dist/services/horizons/horizons-service.js.map +1 -1
- package/dist/services/horizons/types.d.ts +14 -1
- package/dist/services/horizons/types.d.ts.map +1 -1
- package/package.json +11 -10
- package/server.json +3 -3
- package/skills/astronomy-guide/SKILL.md +62 -0
package/AGENTS.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/server` ^2.
|
|
4
|
+
**Version:** 0.5.1
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
10
10
|
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
@@ -20,12 +20,12 @@ Observational astronomy, computed in-process. The core is keyless and offline
|
|
|
20
20
|
| Tool | What it computes |
|
|
21
21
|
|:-----|:-----------------|
|
|
22
22
|
| `astronomy_get_sky_position` | Apparent topocentric position of one body or named star — equatorial / horizontal / ecliptic, magnitude, angular diameter, phase, Sun elongation, constellation |
|
|
23
|
-
| `astronomy_get_rise_set` | Rise / set / transit cycles (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
23
|
+
| `astronomy_get_rise_set` | Rise / set / transit cycles of one body or named star (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
24
24
|
| `astronomy_get_moon_phase` | Phase longitude, illumination, synodic age, next four quarter phases |
|
|
25
|
-
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee |
|
|
25
|
+
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse (with a `timezone`, contacts also in `contacts_local`), opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee, meteor_shower (nine major showers' maxima from the bundled IMO table; `shower` narrows to one) |
|
|
26
26
|
| `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) above the horizon, ranked, with a sky-condition gate |
|
|
27
27
|
|
|
28
|
-
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow).
|
|
28
|
+
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow). One published skill, `skills/astronomy-guide/SKILL.md`, carries the cross-tool workflows and gates the tool descriptions can't (local-night anchoring, listed ≠ visible, Moon interference, eclipses from a place, meteor showers, the extension gates); `createApp({ skills: 'skills' })` serves it over MCP. A behavior change that falsifies one of its claims updates the skill in the same commit.
|
|
29
29
|
|
|
30
30
|
**Two gated, network-backed extensions** register only when their env gate is on (default deployment is keyless + offline):
|
|
31
31
|
|
|
@@ -239,7 +239,7 @@ Handlers throw — the framework catches, classifies, and formats.
|
|
|
239
239
|
|
|
240
240
|
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
241
241
|
|
|
242
|
-
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range
|
|
242
|
+
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range` and the `body_required` `resolveBody()` / `resolvePair()` raise, which carry none, so each calling tool's declared `recovery` fills it (the `start` tools say "start date", and `get_satellite_passes` names the element set's epoch). Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`body_required` on `get_sky_position`, `get_rise_set`, and `find_events`, `find_events`'s `incomplete_observer`, `invalid_target`, the `get_ephemeris` argument gates, `unknown_body`) are the ones that throw through `ctx.fail`. A contract entry whose hint is written at a service throw site must repeat that string verbatim, since nothing links the two — `tests/tools/error-contract-coverage.test.ts` holds both halves of that line.
|
|
243
243
|
|
|
244
244
|
```ts
|
|
245
245
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -314,9 +314,18 @@ src/
|
|
|
314
314
|
|
|
315
315
|
## Skills
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
Two skill trees live at the project root, written for different readers:
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
| Tree | For | Written by |
|
|
320
|
+
|:-----|:----|:-----------|
|
|
321
|
+
| `framework-skills/` | The agent developing this server — framework skills (`metadata.audience: external`) plus any development-time skills of the server's own | `init` and the `maintenance` sync (framework skills); you (your own) |
|
|
322
|
+
| `skills/` | The agents that install the server and call its tools — tool chains, identifier sources, gates | You, deliberately, with the `add-skill` skill. Absent by default; usually none is needed |
|
|
323
|
+
|
|
324
|
+
Development skills are modular instructions. Read them directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry. Their directory is deliberately not `skills/`: Claude Code and Codex auto-load a plugin's root `skills/`, so a server that ships `.claude-plugin/` or `.codex-plugin/` — this one ships both — would hand them to every agent that installs it.
|
|
325
|
+
|
|
326
|
+
A published skill in root `skills/` reaches plugin installs and the `.mcpb` bundle as-is, ships in the npm package and the Docker image, and reaches MCP clients when the server opts in with `createApp({ skills: 'skills' })`. `lint:packaging` validates the tree.
|
|
327
|
+
|
|
328
|
+
**Agent skill directory:** Copy `framework-skills/` into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `framework-skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
|
|
320
329
|
|
|
321
330
|
Available skills:
|
|
322
331
|
|
|
@@ -328,6 +337,7 @@ Available skills:
|
|
|
328
337
|
| `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
|
|
329
338
|
| `add-resource` | Scaffold a new resource definition |
|
|
330
339
|
| `add-prompt` | Scaffold a new prompt definition |
|
|
340
|
+
| `add-skill` | Author a skill the server publishes in root `skills/` for the agents that use it — when one earns its place, structure, validation, delivery |
|
|
331
341
|
| `add-service` | Scaffold a new service integration |
|
|
332
342
|
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
333
343
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
@@ -375,7 +385,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
375
385
|
| `bun run audit:fix` | `bun audit fix` — upgrade vulnerable packages to the lowest safe version within existing ranges (`--dry-run` previews, `--latest` rewrites ranges). First response when `devcheck` flags a transitive advisory; then `bun update <name>`, then `bun dedupe` |
|
|
376
386
|
| `bun run audit:refresh` | Delete `bun.lock` and reinstall. Last resort after `audit:fix`, `bun update <name>`, and `bun dedupe` — re-resolves every ranged dep (the framework pin included) and rewrites the lockfile as `lockfileVersion: 2` |
|
|
377
387
|
| `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
|
|
378
|
-
| `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
|
|
388
|
+
| `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity, `.mcpbignore` coverage, plugin manifests, the published `skills/` tree (run by devcheck) |
|
|
379
389
|
| `bun run list-skills` | Print the skill registry |
|
|
380
390
|
| `bun run tree` | Generate directory structure doc |
|
|
381
391
|
| `bun run format` | Auto-fix formatting (safe fixes only) |
|
|
@@ -393,7 +403,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
393
403
|
|
|
394
404
|
## Bundling
|
|
395
405
|
|
|
396
|
-
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips
|
|
406
|
+
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files such as `/CITATION.cff` and `/.tsbuildinfo` — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays: the MCP SDK loads its own `dist/ext/skills/` at startup, [cyanheads/mcp-ts-core#794](https://github.com/cyanheads/mcp-ts-core/issues/794)); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp`, which records the packing machine's paths; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases. `tests/scripts/packaging-regexes.test.ts` pins the cleaner's and the linter's matchers against each other. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
397
407
|
|
|
398
408
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
399
409
|
|
|
@@ -460,7 +470,10 @@ import { getMyService } from '@/services/my-domain/my-service.js';
|
|
|
460
470
|
- [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
|
|
461
471
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
462
472
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
463
|
-
- [ ]
|
|
464
|
-
- [ ] `.codex-plugin/
|
|
465
|
-
- [ ] `.
|
|
473
|
+
- [ ] `plugin.json` + `mcp.json` (Agent Plugins 1.0.0 — read by Codex, Cursor, GitHub Copilot, VS Code, Kiro) populated — `plugin.json` `name` = the unscoped repo name (lowercase `a-z`, `0-9`, `-`, `.` only); `version`, `description`, `author`, `homepage`, `repository`, `license`, `keywords` from `package.json`; no other top-level field, `extensions` included. `mcp.json` holds one `"type": "stdio"` entry keyed by the unscoped name, `npx -y <full package name>`, and the same fixed `env` as `.codex-plugin/mcp.json`. Neither file carries a user-supplied variable (no `""`, no `${…}` besides `${PLUGIN_ROOT}`/`${PLUGIN_DATA}`): keys reach Codex through `.codex-plugin/mcp.json` `env_vars`, which works only while `.codex-plugin/plugin.json` keeps `"mcpServers": "./.codex-plugin/mcp.json"`
|
|
474
|
+
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
|
|
475
|
+
- [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable (API key, contact email, instance URL) is listed in `env_vars` so Codex forwards it from the user's environment. Never write `"KEY": ""` into `env` — an empty value replaces the user's exported key and is read as unset
|
|
476
|
+
- [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `author`, `repository`, `license`, `keywords` from `package.json`; inline `mcpServers` entry keyed by the unscoped repo name. Every user-supplied variable is declared under `userConfig` (`type`, `title`, `description`; `sensitive: true` for keys and tokens; `required: true` or `default: ""`) and referenced from `env` as `"KEY": "${user_config.<option>}"` — mirror the `user_config` block in `manifest.json`. Never write `"KEY": ""` into `env`
|
|
477
|
+
- [ ] Any new root dev path has a root-anchored line in `.mcpbignore`; `bun run bundle` and `lint:packaging` pass
|
|
478
|
+
- [ ] If the server publishes a skill in root `skills/`: `lint:packaging` passes, and `field-test` verified every gate and identifier claim in it against live tool behavior
|
|
466
479
|
- [ ] `npm run devcheck` passes
|
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
6
|
-
**Engines:** Bun ≥1.4.
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/server` ^2.
|
|
4
|
+
**Version:** 0.5.1
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
|
|
6
|
+
**Engines:** Bun ≥1.4.4, Node ≥24.0.0
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
|
|
8
8
|
**Zod:** ^4.6.7
|
|
9
9
|
|
|
10
10
|
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
@@ -20,12 +20,12 @@ Observational astronomy, computed in-process. The core is keyless and offline
|
|
|
20
20
|
| Tool | What it computes |
|
|
21
21
|
|:-----|:-----------------|
|
|
22
22
|
| `astronomy_get_sky_position` | Apparent topocentric position of one body or named star — equatorial / horizontal / ecliptic, magnitude, angular diameter, phase, Sun elongation, constellation |
|
|
23
|
-
| `astronomy_get_rise_set` | Rise / set / transit cycles (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
23
|
+
| `astronomy_get_rise_set` | Rise / set / transit cycles of one body or named star (31 per call), plus twilight bands for the Sun and `night_in_progress` when the start falls at night; circumpolar / never-rises notes |
|
|
24
24
|
| `astronomy_get_moon_phase` | Phase longitude, illumination, synodic age, next four quarter phases |
|
|
25
|
-
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse, opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee |
|
|
25
|
+
| `astronomy_find_events` | Next N (20 per call) of: equinox, solstice, moon_quarter, lunar/solar eclipse (with a `timezone`, contacts also in `contacts_local`), opposition, conjunction (with the Sun, or two bodies via `body2`), max_elongation, perigee_apogee, meteor_shower (nine major showers' maxima from the bundled IMO table; `shower` narrows to one) |
|
|
26
26
|
| `astronomy_list_visible` | One-call "what is up now" — naked-eye bodies (+ optional catalog stars) above the horizon, ranked, with a sky-condition gate |
|
|
27
27
|
|
|
28
|
-
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow).
|
|
28
|
+
Plus the `astronomy://body/{body}` resource (static reference card) and the `astronomy_stargazing_plan` prompt (chains the tools for a "plan tonight from <place>" workflow). One published skill, `skills/astronomy-guide/SKILL.md`, carries the cross-tool workflows and gates the tool descriptions can't (local-night anchoring, listed ≠ visible, Moon interference, eclipses from a place, meteor showers, the extension gates); `createApp({ skills: 'skills' })` serves it over MCP. A behavior change that falsifies one of its claims updates the skill in the same commit.
|
|
29
29
|
|
|
30
30
|
**Two gated, network-backed extensions** register only when their env gate is on (default deployment is keyless + offline):
|
|
31
31
|
|
|
@@ -239,7 +239,7 @@ Handlers throw — the framework catches, classifies, and formats.
|
|
|
239
239
|
|
|
240
240
|
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
|
|
241
241
|
|
|
242
|
-
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range
|
|
242
|
+
Most of this server's declared reasons are raised below the handler — `EphemerisService.resolveTime()` / `resolveTimezone()` / `lookupStar()`, `resolveBody()` / `resolvePair()`, and the two extension services — and carry their hint inline because those call sites take no `ctx` — except `resolveTime()`'s `time_out_of_range` and the `body_required` `resolveBody()` / `resolvePair()` raise, which carry none, so each calling tool's declared `recovery` fills it (the `start` tools say "start date", and `get_satellite_passes` names the element set's epoch). Those entries are marked `thrownBy: 'service'`; the handler-local preconditions (`body_required` on `get_sky_position`, `get_rise_set`, and `find_events`, `find_events`'s `incomplete_observer`, `invalid_target`, the `get_ephemeris` argument gates, `unknown_body`) are the ones that throw through `ctx.fail`. A contract entry whose hint is written at a service throw site must repeat that string verbatim, since nothing links the two — `tests/tools/error-contract-coverage.test.ts` holds both halves of that line.
|
|
243
243
|
|
|
244
244
|
```ts
|
|
245
245
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
@@ -314,9 +314,18 @@ src/
|
|
|
314
314
|
|
|
315
315
|
## Skills
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
Two skill trees live at the project root, written for different readers:
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
| Tree | For | Written by |
|
|
320
|
+
|:-----|:----|:-----------|
|
|
321
|
+
| `framework-skills/` | The agent developing this server — framework skills (`metadata.audience: external`) plus any development-time skills of the server's own | `init` and the `maintenance` sync (framework skills); you (your own) |
|
|
322
|
+
| `skills/` | The agents that install the server and call its tools — tool chains, identifier sources, gates | You, deliberately, with the `add-skill` skill. Absent by default; usually none is needed |
|
|
323
|
+
|
|
324
|
+
Development skills are modular instructions. Read them directly when a task matches — e.g., `framework-skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry. Their directory is deliberately not `skills/`: Claude Code and Codex auto-load a plugin's root `skills/`, so a server that ships `.claude-plugin/` or `.codex-plugin/` — this one ships both — would hand them to every agent that installs it.
|
|
325
|
+
|
|
326
|
+
A published skill in root `skills/` reaches plugin installs and the `.mcpb` bundle as-is, ships in the npm package and the Docker image, and reaches MCP clients when the server opts in with `createApp({ skills: 'skills' })`. `lint:packaging` validates the tree.
|
|
327
|
+
|
|
328
|
+
**Agent skill directory:** Copy `framework-skills/` into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `framework-skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
|
|
320
329
|
|
|
321
330
|
Available skills:
|
|
322
331
|
|
|
@@ -328,6 +337,7 @@ Available skills:
|
|
|
328
337
|
| `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
|
|
329
338
|
| `add-resource` | Scaffold a new resource definition |
|
|
330
339
|
| `add-prompt` | Scaffold a new prompt definition |
|
|
340
|
+
| `add-skill` | Author a skill the server publishes in root `skills/` for the agents that use it — when one earns its place, structure, validation, delivery |
|
|
331
341
|
| `add-service` | Scaffold a new service integration |
|
|
332
342
|
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
333
343
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
@@ -375,7 +385,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
375
385
|
| `bun run audit:fix` | `bun audit fix` — upgrade vulnerable packages to the lowest safe version within existing ranges (`--dry-run` previews, `--latest` rewrites ranges). First response when `devcheck` flags a transitive advisory; then `bun update <name>`, then `bun dedupe` |
|
|
376
386
|
| `bun run audit:refresh` | Delete `bun.lock` and reinstall. Last resort after `audit:fix`, `bun update <name>`, and `bun dedupe` — re-resolves every ranged dep (the framework pin included) and rewrites the lockfile as `lockfileVersion: 2` |
|
|
377
387
|
| `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
|
|
378
|
-
| `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
|
|
388
|
+
| `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity, `.mcpbignore` coverage, plugin manifests, the published `skills/` tree (run by devcheck) |
|
|
379
389
|
| `bun run list-skills` | Print the skill registry |
|
|
380
390
|
| `bun run tree` | Generate directory structure doc |
|
|
381
391
|
| `bun run format` | Auto-fix formatting (safe fixes only) |
|
|
@@ -393,7 +403,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
393
403
|
|
|
394
404
|
## Bundling
|
|
395
405
|
|
|
396
|
-
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips
|
|
406
|
+
`bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. `mcpb pack` reads `.mcpbignore`, not `.gitignore`, so every root path the bundle must not ship — source, tests, docs, caches, logs, agent docs, plugin manifests, gitignored local files such as `/CITATION.cff` and `/.tsbuildinfo` — needs a root-anchored line there (`/docs/`, never `docs/`, which also strips `node_modules/*/docs/`); `lint:packaging` names each missing or unanchored line. Root `skills/` ships on purpose. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips four classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs — `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `AGENTS.md`, and `CLAUDE.md` at a package's root, and `SKILL.md` anywhere (a `skills/` deeper in a package is runtime code and stays: the MCP SDK loads its own `dist/ext/skills/` at startup, [cyanheads/mcp-ts-core#794](https://github.com/cyanheads/mcp-ts-core/issues/794)); platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on; node-gyp build output beside a `binding.gyp`, which records the packing machine's paths; and build-only package files — the framework's `changelog/`, `scripts/`, `templates/`, and config bases. `tests/scripts/packaging-regexes.test.ts` pins the cleaner's and the linter's matchers against each other. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
|
|
397
407
|
|
|
398
408
|
**Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
|
|
399
409
|
|
|
@@ -460,7 +470,10 @@ import { getMyService } from '@/services/my-domain/my-service.js';
|
|
|
460
470
|
- [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
|
|
461
471
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
462
472
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
463
|
-
- [ ]
|
|
464
|
-
- [ ] `.codex-plugin/
|
|
465
|
-
- [ ] `.
|
|
473
|
+
- [ ] `plugin.json` + `mcp.json` (Agent Plugins 1.0.0 — read by Codex, Cursor, GitHub Copilot, VS Code, Kiro) populated — `plugin.json` `name` = the unscoped repo name (lowercase `a-z`, `0-9`, `-`, `.` only); `version`, `description`, `author`, `homepage`, `repository`, `license`, `keywords` from `package.json`; no other top-level field, `extensions` included. `mcp.json` holds one `"type": "stdio"` entry keyed by the unscoped name, `npx -y <full package name>`, and the same fixed `env` as `.codex-plugin/mcp.json`. Neither file carries a user-supplied variable (no `""`, no `${…}` besides `${PLUGIN_ROOT}`/`${PLUGIN_DATA}`): keys reach Codex through `.codex-plugin/mcp.json` `env_vars`, which works only while `.codex-plugin/plugin.json` keeps `"mcpServers": "./.codex-plugin/mcp.json"`
|
|
474
|
+
- [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
|
|
475
|
+
- [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable (API key, contact email, instance URL) is listed in `env_vars` so Codex forwards it from the user's environment. Never write `"KEY": ""` into `env` — an empty value replaces the user's exported key and is read as unset
|
|
476
|
+
- [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `author`, `repository`, `license`, `keywords` from `package.json`; inline `mcpServers` entry keyed by the unscoped repo name. Every user-supplied variable is declared under `userConfig` (`type`, `title`, `description`; `sensitive: true` for keys and tokens; `required: true` or `default: ""`) and referenced from `env` as `"KEY": "${user_config.<option>}"` — mirror the `user_config` block in `manifest.json`. Never write `"KEY": ""` into `env`
|
|
477
|
+
- [ ] Any new root dev path has a root-anchored line in `.mcpbignore`; `bun run bundle` and `lint:packaging` pass
|
|
478
|
+
- [ ] If the server publishes a skill in root `skills/`: `lint:packaging` passes, and `field-test` verified every gate and identifier claim in it against live tool behavior
|
|
466
479
|
- [ ] `npm run devcheck` passes
|
package/Dockerfile
CHANGED
|
@@ -29,6 +29,11 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
|
29
29
|
# Copy the rest of the source code
|
|
30
30
|
COPY . .
|
|
31
31
|
|
|
32
|
+
# The skills a server publishes (`createApp({ skills: 'skills' })`) are read at
|
|
33
|
+
# runtime from the application root. Created when the project has none, so the
|
|
34
|
+
# production stage's copy below holds with or without one.
|
|
35
|
+
RUN mkdir -p skills
|
|
36
|
+
|
|
32
37
|
# Build the application
|
|
33
38
|
RUN bun run build
|
|
34
39
|
|
|
@@ -94,10 +99,11 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
|
|
|
94
99
|
fi
|
|
95
100
|
|
|
96
101
|
# `--os`/`--cpu` have no libc counterpart, so a native dependency published in
|
|
97
|
-
# glibc and musl variants installs both. The
|
|
98
|
-
# never loads the musl copy; the script
|
|
99
|
-
# admits only musl. It follows every
|
|
100
|
-
# restores what it removes.
|
|
102
|
+
# glibc and musl variants (DuckDB's bindings, for one) installs both. The
|
|
103
|
+
# runtime image is Debian (glibc) and never loads the musl copy; the script
|
|
104
|
+
# deletes every package whose own `libc` admits only musl. It follows every
|
|
105
|
+
# install, since a later `bun install` restores what it removes. A server on a
|
|
106
|
+
# musl (Alpine) runtime image drops these two lines.
|
|
101
107
|
COPY scripts/prune-musl-packages.ts ./scripts/
|
|
102
108
|
RUN bun scripts/prune-musl-packages.ts
|
|
103
109
|
|
|
@@ -135,6 +141,7 @@ COPY --from=deps /usr/src/app/node_modules ./node_modules
|
|
|
135
141
|
|
|
136
142
|
# Copy the compiled application code from the build stage
|
|
137
143
|
COPY --from=build /usr/src/app/dist ./dist
|
|
144
|
+
COPY --from=build /usr/src/app/skills ./skills
|
|
138
145
|
|
|
139
146
|
# The 'oven/bun' image already provides a non-root user named 'bun'.
|
|
140
147
|
# We will use this existing user for enhanced security.
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>@cyanheads/astronomy-mcp-server</h1>
|
|
3
3
|
<p><b>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.</b>
|
|
4
|
-
<div>7 Tools • 1 Resource • 1 Prompt</div>
|
|
4
|
+
<div>7 Tools • 1 Resource • 1 Prompt • 1 Skill</div>
|
|
5
5
|
</p>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/astronomy-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/astronomy-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -36,9 +36,9 @@ Observational astronomy for any place and time: sky positions, rise/set and twil
|
|
|
36
36
|
| Tool | Description |
|
|
37
37
|
|:---|:---|
|
|
38
38
|
| `astronomy_get_sky_position` | Apparent position of one body or named star: RA/Dec, alt/az, ecliptic, magnitude, phase, Sun elongation, constellation |
|
|
39
|
-
| `astronomy_get_rise_set` | Rise, set, and transit times for a body, plus civil, nautical, and astronomical twilight for the Sun |
|
|
39
|
+
| `astronomy_get_rise_set` | Rise, set, and transit times for a body or named star, plus civil, nautical, and astronomical twilight for the Sun |
|
|
40
40
|
| `astronomy_get_moon_phase` | Illuminated fraction, phase name, synodic age, and the next four quarter phases |
|
|
41
|
-
| `astronomy_find_events` | Next eclipses, equinoxes, solstices, moon quarters, oppositions, conjunctions, greatest elongations, or
|
|
41
|
+
| `astronomy_find_events` | Next eclipses, equinoxes, solstices, moon quarters, oppositions, conjunctions, greatest elongations, apsides, or meteor-shower maxima |
|
|
42
42
|
| `astronomy_list_visible` | What's up now: naked-eye bodies (and optional bright stars) above the horizon, ranked, with a sky-condition gate |
|
|
43
43
|
| `astronomy_get_ephemeris` | Small-body or spacecraft ephemeris from JPL Horizons (opt-in) |
|
|
44
44
|
| `astronomy_get_satellite_passes` | Visible satellite passes from a CelesTrak element set propagated with SGP4 (opt-in) |
|
|
@@ -57,6 +57,14 @@ Tool-only clients get the same type, radius, and naked-eye fields inline from `a
|
|
|
57
57
|
|:---|:---|
|
|
58
58
|
| `astronomy_stargazing_plan` | Plan a night of stargazing from a place, chaining the astronomy tools with geocoding and weather steps |
|
|
59
59
|
|
|
60
|
+
### Skills
|
|
61
|
+
|
|
62
|
+
| Skill | Description |
|
|
63
|
+
|:---|:---|
|
|
64
|
+
| [`astronomy-guide`](./skills/astronomy-guide/SKILL.md) | Chaining the tools for observing questions: anchoring dates to the observer's local night, what "visible" means per tool, Moon interference, eclipses from a place, and the opt-in Horizons and satellite tools |
|
|
65
|
+
|
|
66
|
+
Plugin installs load it from `skills/`; MCP clients that support the Skills extension read it as `skill://astronomy-guide/SKILL.md`.
|
|
67
|
+
|
|
60
68
|
Design reference: [`docs/design.md`](./docs/design.md).
|
|
61
69
|
|
|
62
70
|
## Capability reference
|
|
@@ -71,8 +79,9 @@ Design reference: [`docs/design.md`](./docs/design.md).
|
|
|
71
79
|
|
|
72
80
|
### `astronomy_get_rise_set` <sub>tool</sub>
|
|
73
81
|
|
|
74
|
-
- One `body` searched forward from `start` (default now) for the next `count` cycles, default 1; 31 are served per call, and a `count` up to 366 returns the first 31 with a notice naming the `start` and `count` that continue the series
|
|
75
|
-
-
|
|
82
|
+
- One `body` or `star` searched forward from `start` (default now) for the next `count` cycles, default 1; 31 are served per call, and a `count` up to 366 returns the first 31 with a notice naming the `start` and `count` that continue the series
|
|
83
|
+
- `star` takes the same catalog names as `astronomy_get_sky_position` and wins over `body`; `body` echoes the catalog name (`Sirius` for `α CMa`), a miss fails as `star_not_found`, and a star gets no twilight
|
|
84
|
+
- Each cycle carries `rise_utc`, `set_utc`, `transit_utc`, and `transit_altitude_degrees`; a circumpolar or never-rising body or star gets `null` rise/set and a `note` instead of an error
|
|
76
85
|
- For `body: "sun"`, `twilight` holds civil, nautical, and astronomical dusk/dawn pairs for the night after each cycle's day. When the first day begins after `start`, `night_in_progress` holds the preceding night, including polar nights without a sunset; the first cycle otherwise carries its own night. Each pair stays within that night, and times before `start` remain included
|
|
77
86
|
|
|
78
87
|
---
|
|
@@ -86,10 +95,13 @@ Design reference: [`docs/design.md`](./docs/design.md).
|
|
|
86
95
|
|
|
87
96
|
### `astronomy_find_events` <sub>tool</sub>
|
|
88
97
|
|
|
89
|
-
- One `event` (`solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`) and the next `count` occurrences, default 1; 20 are served per call, and a `count` up to 200 returns the first 20 with a notice naming the `start` and `count` that continue the series; searches stop at the end of 2100
|
|
98
|
+
- One `event` (`solar_eclipse`, `lunar_eclipse`, `equinox`, `solstice`, `moon_quarter`, `opposition`, `conjunction`, `max_elongation`, `perigee_apogee`, `meteor_shower`) and the next `count` occurrences, default 1; 20 are served per call, and a `count` up to 200 returns the first 20 with a notice naming the `start` and `count` that continue the series; searches stop at the end of 2100
|
|
90
99
|
- Body-relative events require `body` (`body_required`); a body the event doesn't apply to fails as `body_not_supported`, and `conjunction` with `body2` takes the Moon or a planet different from `body` (`invalid_body_pair` otherwise) and reports `separation_degrees`
|
|
91
|
-
- Eclipses take an optional observer (`latitude` and `longitude` together, else `incomplete_observer`)
|
|
92
|
-
-
|
|
100
|
+
- Eclipses and meteor showers take an optional observer (`latitude` and `longitude` together, else `incomplete_observer`); for eclipses it adds `local_visible` and `contact_altitudes_degrees`
|
|
101
|
+
- With a `timezone`, each eclipse also carries `contacts_local`: the `contacts` phases keyed `<phase>_local`, each with the zone offset in force at that contact's own instant, and null where `contacts` is null
|
|
102
|
+
- `meteor_shower` returns the maxima of nine major annual showers (Quadrantids, April Lyrids, η-Aquariids, Southern δ-Aquariids, Perseids, Orionids, Leonids, Geminids, Ursids) with `zhr`, the J2000 radiant, activity dates, and the Moon's geocentric `moon_illuminated_fraction`; an observer adds `radiant_altitude_degrees` and `sun_altitude_degrees` at the maximum. `shower` narrows the search to one by IMO code or name, and a miss fails as `shower_not_found`. Maxima are the calendar's nominal ones, with no outburst predictions
|
|
103
|
+
- Eclipses and meteor showers are included when their peak is at or after `start`; eclipse contacts and shower activity dates may precede `start`
|
|
104
|
+
- Meteor shower table: International Meteor Organization, [2026 Meteor Shower Calendar](https://www.imo.net/files/meteor-shower/cal2026.pdf), ed. Jürgen Rendtel, DOI [10.13140/RG.2.2.36179.08480](https://doi.org/10.13140/RG.2.2.36179.08480)
|
|
93
105
|
|
|
94
106
|
---
|
|
95
107
|
|
|
@@ -103,6 +115,7 @@ Design reference: [`docs/design.md`](./docs/design.md).
|
|
|
103
115
|
### `astronomy_get_ephemeris` <sub>tool</sub>
|
|
104
116
|
|
|
105
117
|
- `designation` is passed to Horizons verbatim (`"433;"` for a numbered asteroid, `"DES=1P;CAP"` for a periodic comet, a negative SPK-ID for a spacecraft); `start` defaults to now, `stop` to 24 h later, and `step` to `"1h"` (a count plus `m`, `h`, `d`, `mo`, or `y`); `latitude` and `longitude` together add alt/az
|
|
118
|
+
- Each row carries `ra_hours`/`dec_degrees` as astrometric ICRF (J2000), not the apparent of-date values `astronomy_get_sky_position` returns, plus `distance_au`, `magnitude`, `constellation`, `sun_elongation_degrees`, and `visibility` (`morning`, `evening`, or null); with an observer, the elongation is measured from that place
|
|
106
119
|
- Up to 200 rows per call; when `truncated` is true the notice names the `start` to resume from. `target_name` is the object Horizons resolved
|
|
107
120
|
- Fails as `ambiguous_designation`, `observer_is_target`, `body_not_found`, `invalid_step`, `invalid_elevation`, `time_out_of_range`, or `request_rejected`, each naming the input to correct
|
|
108
121
|
- Registered only when `ASTRONOMY_ENABLE_HORIZONS=true`
|
|
@@ -128,7 +141,7 @@ Design reference: [`docs/design.md`](./docs/design.md).
|
|
|
128
141
|
### `astronomy_stargazing_plan` <sub>prompt</sub>
|
|
129
142
|
|
|
130
143
|
- Arguments: `location` required; `date` (`YYYY-MM-DD`) optional, defaults to tonight
|
|
131
|
-
- Returns one user message that chains `astronomy_get_rise_set` (sun, then moon), `astronomy_get_moon_phase`,
|
|
144
|
+
- Returns one user message that chains `astronomy_get_rise_set` (sun, then moon), `astronomy_get_moon_phase`, `astronomy_list_visible` with `include_stars`, and `astronomy_find_events` for `meteor_shower` (searched from four weeks before the night, keeping the showers active that night), plus the geocoding and weather steps this server doesn't cover
|
|
132
145
|
|
|
133
146
|
## Features
|
|
134
147
|
|
|
@@ -249,7 +262,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
|
|
|
249
262
|
|
|
250
263
|
### Prerequisites
|
|
251
264
|
|
|
252
|
-
- [Bun v1.4.
|
|
265
|
+
- [Bun v1.4.4](https://bun.sh/) or higher (or Node.js v24+).
|
|
253
266
|
- No API key. The core is offline, and both extensions (JPL Horizons, CelesTrak) are keyless.
|
|
254
267
|
|
|
255
268
|
### Installation
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Publishes the astronomy-guide skill over MCP and in every install surface, and moves to mcp-ts-core 0.13.18, which stops the HTTP transport retaining memory for every request (a leak 0.4.3 shipped with on Bun, the Docker runtime) and trims the .mcpb to the files the server runs."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.5.0 — 2026-10-28
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`astronomy-guide` skill** (`skills/astronomy-guide/SKILL.md`): chains the `astronomy_*` tools for observing questions — anchoring dates to the observer's local night, what each tool means by visible, Moon interference, eclipses from a place, the 1900–2100 span, and the opt-in Horizons and satellite tools. Served over MCP as `skill://astronomy-guide/SKILL.md` with the `skill://{+path}` template through `createApp({ skills })` (mcp-ts-core 0.13.18), and ships in the npm package, the Docker image, the `.mcpb`, and plugin installs.
|
|
12
|
+
- **Root Agent Plugins manifest pair**, `plugin.json` + `mcp.json` (template from mcp-ts-core 0.13.18).
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **The `.mcpb` carries only the runtime files**: the root `README.md`, `LICENSE`, `CHANGELOG.md`, `manifest.json`, `package.json`, and `server.json`, plus `dist/`, `skills/`, and `node_modules/`. 0.4.3's bundle also shipped `src/`, `scripts/`, `changelog/`, `docs/`, `.github/`, `.vscode/`, the `.claude-plugin/` and `.codex-plugin/` directories, `CLAUDE.md`, `AGENTS.md`, `CITATION.cff`, `devcheck.config.json`, `.gitattributes`, `.dockerignore`, and the framework package's build-only files. The root-anchored `.mcpbignore` and the `clean-mcpb` build-only stripping (mcp-ts-core 0.13.18) account for it. The bundle cleaner keeps the MCP SDK's `dist/ext/skills/` runtime, which a skills-serving bundle needs at startup, as a local workaround for open upstream [cyanheads/mcp-ts-core#794](https://github.com/cyanheads/mcp-ts-core/issues/794).
|
|
17
|
+
- **`visibility_note` output-field description**: the example uses an 8-point compass label (`W`), the precision the server emits (it showed `WSW`). `docs/design.md` corrects its star-catalog description (a 32-star in-source table) and its `astronomy_list_visible` bounds and field notes.
|
|
18
|
+
- **Repo upkeep**: framework skills and scripts resynced (`add-skill` new), issue templates, and the `bunfig.toml` `minimumReleaseAge` guard at 1 day (template, mcp-ts-core 0.13.17).
|
|
19
|
+
|
|
20
|
+
## Fixed
|
|
21
|
+
|
|
22
|
+
- On mcp-ts-core 0.13.16, which 0.4.3 shipped with, the HTTP transport retained memory for every request, so an HTTP deployment running under Bun — the runtime of the Docker image — grew until it ran out of memory. mcp-ts-core 0.13.17 releases each request's resources when its response ends ([cyanheads/mcp-ts-core#786](https://github.com/cyanheads/mcp-ts-core/issues/786)).
|
|
23
|
+
|
|
24
|
+
## Dependencies
|
|
25
|
+
|
|
26
|
+
- `@cyanheads/mcp-ts-core` ^0.13.16 → ^0.13.18 (brings `@modelcontextprotocol/server` ^2.3.1 → ^2.4.0).
|
|
27
|
+
- `@biomejs/biome` 2.6.2 → 2.6.3 (dev).
|
|
28
|
+
- `ignore` ^7.0.13 → ^7.0.14 (dev).
|
|
29
|
+
- `tsc-alias` ^1.9.8 → ^1.9.9 (dev).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adds meteor-shower maxima to astronomy_find_events, rise/set/transit for catalog stars on astronomy_get_rise_set, observer-local eclipse contact times, and constellation, Sun elongation, and visibility on astronomy_get_ephemeris rows, which now label their RA/Dec as J2000."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.5.1 — 2026-11-16
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`meteor_shower` event class on `astronomy_find_events`** ([#71](https://github.com/cyanheads/astronomy-mcp-server/issues/71)): the maxima of nine major annual showers from a bundled IMO table, each with `zhr`, the J2000 radiant, activity dates, and `moon_illuminated_fraction`. A `shower` input narrows the search to one by code or name (`shower_not_found` on a miss), and an observer adds `radiant_altitude_degrees` and `sun_altitude_degrees` at the maximum. The `astronomy_stargazing_plan` prompt gains a step that checks showers around the night.
|
|
12
|
+
- **`star` input on `astronomy_get_rise_set`** ([#70](https://github.com/cyanheads/astronomy-mcp-server/issues/70)): rise, set, and transit for a catalog star, taking the names `astronomy_get_sky_position` accepts (`star_not_found` on a miss). It wins over `body` and returns no twilight.
|
|
13
|
+
- **`contacts_local` on `astronomy_find_events` eclipses** ([#69](https://github.com/cyanheads/astronomy-mcp-server/issues/69)): with a `timezone`, each contact keyed `<phase>_local`, using the zone offset in force at that contact's own instant.
|
|
14
|
+
- **`constellation`, `sun_elongation_degrees`, and `visibility` on each `astronomy_get_ephemeris` row** ([#72](https://github.com/cyanheads/astronomy-mcp-server/issues/72)): elongation is measured from the observer when `latitude` and `longitude` are given, else from Earth's center; `visibility` is `morning`, `evening`, or null.
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
|
|
18
|
+
- **`astronomy_get_rise_set` with neither `body` nor `star`** now fails with reason `body_required` (was `invalid_arguments`; still -32602).
|
|
19
|
+
- **`astronomy-guide` skill 1.0 → 1.1**: adds meteor-shower guidance, rise/set for stars, and the J2000 note for ephemeris RA/Dec.
|
|
20
|
+
|
|
21
|
+
## Fixed
|
|
22
|
+
|
|
23
|
+
- **`astronomy_get_ephemeris` RA/Dec frame** ([#68](https://github.com/cyanheads/astronomy-mcp-server/issues/68)): `ra_hours` and `dec_degrees` were unlabeled astrometric ICRF (J2000) values, unlike `astronomy_get_sky_position`'s apparent of-date coordinates. The field descriptions, tool description, and `content[]` header (`RA/Dec astrometric ICRF (J2000)`) now say so; values are unchanged.
|
|
24
|
+
- `astronomy_find_events` `content[]` shows a null eclipse phase as `none` instead of dropping it.
|
|
25
|
+
- A one-row `astronomy_get_ephemeris` header reads `— 1 point`, not `— 1 points`.
|
|
26
|
+
|
|
27
|
+
## Dependencies
|
|
28
|
+
|
|
29
|
+
- `@cyanheads/mcp-ts-core` ^0.13.18 → ^0.13.22.
|
|
30
|
+
- `satellite.js` ^7.1.0 → ^7.2.0 (keeps the element-set epoch's microseconds: `astronomy_get_satellite_passes` altitudes and azimuths move by at most 0.0003°; pass times are unchanged).
|
|
31
|
+
- `@biomejs/biome` 2.6.3 → 2.6.7 (dev).
|
|
32
|
+
- `@types/node` ^26.6.5 → ^26.6.6 (dev).
|
|
33
|
+
- `tsc-alias` ^1.9.9 → ^1.9.10 (dev).
|
|
34
|
+
- `vitest` ^5.0.5 → ^5.1.0 (dev).
|
|
35
|
+
- `engines.bun` >=1.4.0 → >=1.4.4.
|
package/changelog/template.md
CHANGED
|
@@ -116,14 +116,21 @@ security: false
|
|
|
116
116
|
resolves to whatever real item already owns 42, and timeline previews pull
|
|
117
117
|
in that unrelated item's metadata.
|
|
118
118
|
|
|
119
|
+
Outside reporters: when the issue or PR came from outside the project
|
|
120
|
+
(`git-wrapup` step 5 says how to tell), thank its author in the same
|
|
121
|
+
parenthetical, profile linked by full URL for the same reason:
|
|
122
|
+
|
|
123
|
+
([#38](https://github.com/cyanheads/mcp-ts-core/issues/38), thanks [@octocat](https://github.com/octocat)!)
|
|
124
|
+
|
|
119
125
|
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
120
126
|
via `gh release create --notes-from-tag`. It is a condensed digest of this
|
|
121
127
|
entry, never a copy, and its format is owned by the `release-and-publish`
|
|
122
128
|
skill (step 4, "Create the annotated tag"): a short subject line without the
|
|
123
129
|
version, flat headline bullets — no Keep-a-Changelog section headers, no
|
|
124
|
-
gates line — at most one deps line, issue backlinks
|
|
125
|
-
last. In release-PR mode the `git-wrapup`
|
|
126
|
-
PR body's `## Changes` and the tag copies
|
|
130
|
+
gates line — at most one deps line, issue backlinks with any outside-reporter
|
|
131
|
+
thanks, and the changelog link last. In release-PR mode the `git-wrapup`
|
|
132
|
+
skill authors those bullets as the PR body's `## Changes` and the tag copies
|
|
133
|
+
them.
|
|
127
134
|
-->
|
|
128
135
|
|
|
129
136
|
## Added
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,8 @@ await createApp({
|
|
|
47
47
|
* still wins when it carries a meaningful value, which is how an operator overrides this.
|
|
48
48
|
*/
|
|
49
49
|
sessionMode: 'stateless',
|
|
50
|
+
/** The published `skills/` tree, served over the MCP Skills extension; resolved against the application root. */
|
|
51
|
+
skills: 'skills',
|
|
50
52
|
instructions: 'Observer location is latitude/longitude in decimal degrees plus optional elevation; times are ISO 8601 UTC and default to now. This server does not geocode — resolve a place name to coordinates upstream (e.g. via openstreetmap) and a timezone via reference-data, then pass `timezone` to receive observer-local times. astronomy_list_visible is the one-call "what is up now" answer. The astronomy_get_ephemeris (small bodies) and astronomy_get_satellite_passes tools are off by default; enable them with ASTRONOMY_ENABLE_HORIZONS / ASTRONOMY_ENABLE_SATELLITES.',
|
|
51
53
|
/**
|
|
52
54
|
* Every catalog a client can list here is decided once, at startup: the tool array is
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6DAA6D,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;AAE9B,+DAA+D;AAC/D,MAAM,SAAS,GAAG;IAChB,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,eAAe;CAChB,CAAC;AAEF,mFAAmF;AACnF,MAAM,cAAc,GAAG;IACrB,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;CAC1D,CAAC;AAEF,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAsB;IAC7B;;;;;;;OAOG;IACH,WAAW,EAAE,WAAW;IACxB,YAAY,EACV,gjBAAgjB;IACljB;;;;;;;;;OASG;IACH,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QACxD,cAAc,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC1D,gBAAgB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC5D,0BAA0B,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QACtE,iBAAiB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KAC9D;IACD,KAAK;QACH,oBAAoB,EAAE,CAAC;QACvB,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;YACvB,mBAAmB,CAAC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,GAAG,CAAC,gBAAgB,EAAE,CAAC;YACzB,oBAAoB,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,cAAc,CAAC;IACxC,SAAS,EAAE,CAAC,YAAY,CAAC;IACzB,OAAO,EAAE,CAAC,oBAAoB,CAAC;CAChC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6DAA6D,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;AAE9B,+DAA+D;AAC/D,MAAM,SAAS,GAAG;IAChB,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,eAAe;CAChB,CAAC;AAEF,mFAAmF;AACnF,MAAM,cAAc,GAAG;IACrB,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;CAC1D,CAAC;AAEF,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,sBAAsB;IAC7B;;;;;;;OAOG;IACH,WAAW,EAAE,WAAW;IACxB,iHAAiH;IACjH,MAAM,EAAE,QAAQ;IAChB,YAAY,EACV,gjBAAgjB;IACljB;;;;;;;;;OASG;IACH,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QACxD,cAAc,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC1D,gBAAgB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC5D,0BAA0B,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;QACtE,iBAAiB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KAC9D;IACD,KAAK;QACH,oBAAoB,EAAE,CAAC;QACvB,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;YACvB,mBAAmB,CAAC,GAAG,CAAC,eAAe,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,GAAG,CAAC,gBAAgB,EAAE,CAAC;YACzB,oBAAoB,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,cAAc,CAAC;IACxC,SAAS,EAAE,CAAC,YAAY,CAAC;IACzB,OAAO,EAAE,CAAC,oBAAoB,CAAC;CAChC,CAAC,CAAC"}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* "plan tonight's stargazing from <place>" workflow, chaining the astronomy tools
|
|
4
4
|
* in order and prompting for cross-server geocoding and cloud-cover checks. Every step
|
|
5
5
|
* that picks a time anchors it to the requested date in the observer's resolved IANA
|
|
6
|
-
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night
|
|
7
|
-
*
|
|
6
|
+
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night;
|
|
7
|
+
* the visibility step opts into the bright-star catalog the tool omits by default, and
|
|
8
|
+
* the meteor-shower step searches from weeks before the night, so a shower that peaked
|
|
9
|
+
* a few nights earlier and is still active is not missed.
|
|
8
10
|
* @module mcp-server/prompts/definitions/stargazing-plan.prompt
|
|
9
11
|
*/
|
|
10
12
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stargazing-plan.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stargazing-plan.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,oBAAoB;;;kBAqC/B,CAAC"}
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
* "plan tonight's stargazing from <place>" workflow, chaining the astronomy tools
|
|
4
4
|
* in order and prompting for cross-server geocoding and cloud-cover checks. Every step
|
|
5
5
|
* that picks a time anchors it to the requested date in the observer's resolved IANA
|
|
6
|
-
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night
|
|
7
|
-
*
|
|
6
|
+
* zone rather than UTC midnight, so a plan cannot drift onto the adjacent local night;
|
|
7
|
+
* the visibility step opts into the bright-star catalog the tool omits by default, and
|
|
8
|
+
* the meteor-shower step searches from weeks before the night, so a shower that peaked
|
|
9
|
+
* a few nights earlier and is still active is not missed.
|
|
8
10
|
* @module mcp-server/prompts/definitions/stargazing-plan.prompt
|
|
9
11
|
*/
|
|
10
12
|
import { prompt, z } from '@cyanheads/mcp-ts-core';
|
|
11
13
|
export const stargazingPlanPrompt = prompt('astronomy_stargazing_plan', {
|
|
12
|
-
description: 'Structure a "plan tonight\'s stargazing from <place>" workflow: resolve coordinates, find the dark-sky window, check the moon, list what is up, and fold in cloud cover. Emits a message that chains the astronomy tools in order and names the cross-server steps the astronomy server does not cover (geocoding, weather).',
|
|
14
|
+
description: 'Structure a "plan tonight\'s stargazing from <place>" workflow: resolve coordinates, find the dark-sky window, check the moon, list what is up, check for an active meteor shower, and fold in cloud cover. Emits a message that chains the astronomy tools in order and names the cross-server steps the astronomy server does not cover (geocoding, weather).',
|
|
13
15
|
title: 'astronomy-mcp-server: plan stargazing session',
|
|
14
16
|
args: z.object({
|
|
15
17
|
location: z
|
|
@@ -37,9 +39,10 @@ export const stargazingPlanPrompt = prompt('astronomy_stargazing_plan', {
|
|
|
37
39
|
`3. Call astronomy_get_moon_phase for <date> and note the illuminated fraction — a bright moon washes out faint objects.`,
|
|
38
40
|
`4. Call astronomy_get_rise_set with body "moon" at those coordinates across the same local <date> night in that timezone, to get moonrise and moonset, then compare them against the dark window from step 2. Phase alone is geocentric and does not say whether the moon is above the observer's horizon; a full moon that has already set does not interfere.`,
|
|
39
41
|
`5. Call astronomy_list_visible at those coordinates with \`include_stars\` set to true, at a time just after the astronomical dusk found in step 2 on the local <date> night in that timezone, to get the ranked list of what is up. The tool omits the bundled bright-star catalog unless \`include_stars\` is true, so leaving it off returns solar-system bodies only — not the named stars a stargazer is most likely to be asking about.`,
|
|
40
|
-
`6.
|
|
42
|
+
`6. Call astronomy_find_events with event "meteor_shower" at those coordinates in that timezone, with \`start\` four weeks before the local <date> night and \`count\` 5, and keep each shower whose activity_start_date to activity_end_date covers that night. A shower stays active for days to weeks around its maximum, so one that peaked a few nights earlier still counts; a maximum inside the dark window from step 2, with the radiant up (radiant_altitude_degrees), is the best case. moon_illuminated_fraction is geocentric, so judge the moon's interference from the moonrise and moonset of step 4.`,
|
|
43
|
+
`7. Check cloud cover and transparency for the location and window using a weather tool (e.g. open-meteo or nws). This server computes only the sky geometry, not the weather.`,
|
|
41
44
|
'',
|
|
42
|
-
`Then summarize: the best viewing window, the standout objects and where to look (altitude/azimuth), the moon's interference (both its brightness and the hours it is above the horizon), and whether the sky is expected to be clear.`,
|
|
45
|
+
`Then summarize: the best viewing window, the standout objects and where to look (altitude/azimuth), any meteor shower active that night, the moon's interference (both its brightness and the hours it is above the horizon), and whether the sky is expected to be clear.`,
|
|
43
46
|
].join('\n');
|
|
44
47
|
return [{ role: 'user', content: { type: 'text', text } }];
|
|
45
48
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stargazing-plan.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stargazing-plan.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/stargazing-plan.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACtE,WAAW,EACT,iWAAiW;IACnW,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,CAAC,oEAAoE,CAAC;QACjF,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,4EAA4E,CAAC;KAC1F,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC;QACzC,MAAM,IAAI,GAAG;YACX,yCAAyC;YACzC,EAAE;YACF,iNAAiN;YACjN,EAAE;YACF,aAAa,IAAI,CAAC,QAAQ,aAAa;YACvC,SAAS,SAAS,SAAS;YAC3B,EAAE;YACF,uEAAuE;YACvE,EAAE;YACF,sbAAsb;YACtb,+pBAA+pB;YAC/pB,yHAAyH;YACzH,iWAAiW;YACjW,+aAA+a;YAC/a,slBAAslB;YACtlB,+KAA+K;YAC/K,EAAE;YACF,4QAA4Q;SAC7Q,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC,CAAC"}
|