@cyanheads/astronomy-mcp-server 0.2.7 → 0.2.9
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 +21 -8
- package/CLAUDE.md +21 -8
- package/Dockerfile +2 -2
- package/README.md +2 -2
- package/changelog/0.2.x/0.2.8.md +15 -0
- package/changelog/0.2.x/0.2.9.md +24 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/resources/definitions/body.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/body.resource.js +8 -0
- package/dist/mcp-server/resources/definitions/body.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js +10 -0
- package/dist/mcp-server/tools/definitions/get-satellite-passes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.d.ts +20 -0
- 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 +28 -1
- package/dist/mcp-server/tools/definitions/get-sky-position.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/list-visible.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/list-visible.tool.js +25 -16
- package/dist/mcp-server/tools/definitions/list-visible.tool.js.map +1 -1
- package/dist/mcp-server/tools/format-numbers.d.ts +1 -4
- package/dist/mcp-server/tools/format-numbers.d.ts.map +1 -1
- package/dist/mcp-server/tools/format-numbers.js +1 -4
- package/dist/mcp-server/tools/format-numbers.js.map +1 -1
- package/package.json +6 -6
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.2.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.
|
|
4
|
+
**Version:** 0.2.9
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
|
8
8
|
**Zod:** ^4.4.3
|
|
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.
|
|
@@ -43,7 +43,7 @@ Both extension services carry their own timeout + retry boundary, cache nothing
|
|
|
43
43
|
- **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
|
|
44
44
|
- **Use `ctx.log`** for request-scoped logging. No `console` calls.
|
|
45
45
|
- **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
|
|
46
|
-
- **
|
|
46
|
+
- **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler. No handler here does — every tool is a pure computation over its arguments, which is why the server runs stateless.
|
|
47
47
|
- **Secrets in env vars only** — never hardcoded.
|
|
48
48
|
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
|
|
49
49
|
|
|
@@ -90,6 +90,10 @@ export const getMoonPhaseTool = tool('astronomy_get_moon_phase', {
|
|
|
90
90
|
});
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
`tool()` stores `input` with `.strict()` applied, so an argument key the schema does not declare is rejected by name before the handler runs rather than stripped. Root level only — a nested `z.object()` still strips unless it is strict itself — and an input that already declares a catchall is left alone. `astronomy_get_satellite_passes` uses that carve-out: it calls `.strict()` itself so its `.meta({ oneOf })` exclusivity survives onto the advertised `inputSchema`, which a framework-applied `.strict()` would drop when it rebuilds the schema.
|
|
94
|
+
|
|
95
|
+
`error` is a reserved name on `output` and `enrichment` — that key is the wire's failure envelope, and `tool()` throws at definition time on a collision.
|
|
96
|
+
|
|
93
97
|
### Resource
|
|
94
98
|
|
|
95
99
|
```ts
|
|
@@ -103,6 +107,7 @@ export const bodyResource = resource('astronomy://body/{body}', {
|
|
|
103
107
|
title: 'astronomy-mcp-server: body reference card',
|
|
104
108
|
description: 'Static reference card for a solar-system body: name, type, mean radius (km), and naked-eye visibility.',
|
|
105
109
|
mimeType: 'application/json',
|
|
110
|
+
cacheHint: { ttlMs: 86_400_000, cacheScope: 'public' }, // static table — see Caching below
|
|
106
111
|
params: z.object({ body: z.string().describe('One of sun, moon, mercury … pluto.') }),
|
|
107
112
|
output: BodyCardOutput,
|
|
108
113
|
errors: [
|
|
@@ -196,6 +201,14 @@ await createApp({
|
|
|
196
201
|
|
|
197
202
|
`instructions` is optional server-level orientation, sent on every `initialize` as session-level context. Use it for deployment guidance (connection aliases, regional notes, scope hints) instead of repeating the same context across tool descriptions. Client adoption is uneven, but there's no downside when set.
|
|
198
203
|
|
|
204
|
+
### Caching
|
|
205
|
+
|
|
206
|
+
Nothing this server advertises varies by caller, so `createApp({ cacheHints })` declares the list operations (`tools/list`, `prompts/list`, `resources/list`, `resources/templates/list`, `server/discover`) cacheable for an hour with `cacheScope: 'public'`. They are all decided once at startup — the tool array by the two extension gates, the rest by literals — and an hour bounds how long a client can hold a catalog from a build whose gates have since changed. `resources/read` is deliberately left off that map: `bodyResource` carries its own 24-hour `cacheHint`, and a server-wide default would silently extend that policy to whichever resource is added next. Hints exist only on protocol revision 2026-07-28; a 2025-era response is unchanged either way.
|
|
207
|
+
|
|
208
|
+
### Session mode
|
|
209
|
+
|
|
210
|
+
`stateless`, set in the `Dockerfile` and documented in `.env.example`. The mode a stateless server gives up is the 2025-era multi-round-trip shim, and no handler here calls `ctx.requestInput` — every tool is a pure function of its arguments — so there is nothing to give up. stdio and 2026-07-28 clients behave identically under either mode, so a green field test says nothing about this choice; the absent call site is the reason.
|
|
211
|
+
|
|
199
212
|
---
|
|
200
213
|
|
|
201
214
|
## Context
|
|
@@ -204,13 +217,13 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
204
217
|
|
|
205
218
|
| Property | Description |
|
|
206
219
|
|:---------|:------------|
|
|
207
|
-
| `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
|
|
220
|
+
| `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino **and** `notifications/message` to the client, so treat it as client-visible. |
|
|
208
221
|
| `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
|
|
209
|
-
| `ctx.
|
|
222
|
+
| `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
|
|
223
|
+
| `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
|
|
210
224
|
| `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
|
|
211
225
|
| `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
|
|
212
226
|
| `ctx.signal` | `AbortSignal` for cancellation. |
|
|
213
|
-
| `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
|
|
214
227
|
| `ctx.requestId` | Unique request ID. |
|
|
215
228
|
| `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
|
|
216
229
|
|
|
@@ -326,7 +339,7 @@ Available skills:
|
|
|
326
339
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
327
340
|
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
328
341
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
329
|
-
| `api-context` | Context interface, logger, state,
|
|
342
|
+
| `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
|
|
330
343
|
| `api-errors` | McpError, JsonRpcErrorCode, error patterns |
|
|
331
344
|
| `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
|
|
332
345
|
| `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
|
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** astronomy-mcp-server
|
|
4
|
-
**Version:** 0.2.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.
|
|
4
|
+
**Version:** 0.2.9
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
|
8
8
|
**Zod:** ^4.4.3
|
|
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.
|
|
@@ -43,7 +43,7 @@ Both extension services carry their own timeout + retry boundary, cache nothing
|
|
|
43
43
|
- **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
|
|
44
44
|
- **Use `ctx.log`** for request-scoped logging. No `console` calls.
|
|
45
45
|
- **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
|
|
46
|
-
- **
|
|
46
|
+
- **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler. No handler here does — every tool is a pure computation over its arguments, which is why the server runs stateless.
|
|
47
47
|
- **Secrets in env vars only** — never hardcoded.
|
|
48
48
|
- **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
|
|
49
49
|
|
|
@@ -90,6 +90,10 @@ export const getMoonPhaseTool = tool('astronomy_get_moon_phase', {
|
|
|
90
90
|
});
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
`tool()` stores `input` with `.strict()` applied, so an argument key the schema does not declare is rejected by name before the handler runs rather than stripped. Root level only — a nested `z.object()` still strips unless it is strict itself — and an input that already declares a catchall is left alone. `astronomy_get_satellite_passes` uses that carve-out: it calls `.strict()` itself so its `.meta({ oneOf })` exclusivity survives onto the advertised `inputSchema`, which a framework-applied `.strict()` would drop when it rebuilds the schema.
|
|
94
|
+
|
|
95
|
+
`error` is a reserved name on `output` and `enrichment` — that key is the wire's failure envelope, and `tool()` throws at definition time on a collision.
|
|
96
|
+
|
|
93
97
|
### Resource
|
|
94
98
|
|
|
95
99
|
```ts
|
|
@@ -103,6 +107,7 @@ export const bodyResource = resource('astronomy://body/{body}', {
|
|
|
103
107
|
title: 'astronomy-mcp-server: body reference card',
|
|
104
108
|
description: 'Static reference card for a solar-system body: name, type, mean radius (km), and naked-eye visibility.',
|
|
105
109
|
mimeType: 'application/json',
|
|
110
|
+
cacheHint: { ttlMs: 86_400_000, cacheScope: 'public' }, // static table — see Caching below
|
|
106
111
|
params: z.object({ body: z.string().describe('One of sun, moon, mercury … pluto.') }),
|
|
107
112
|
output: BodyCardOutput,
|
|
108
113
|
errors: [
|
|
@@ -196,6 +201,14 @@ await createApp({
|
|
|
196
201
|
|
|
197
202
|
`instructions` is optional server-level orientation, sent on every `initialize` as session-level context. Use it for deployment guidance (connection aliases, regional notes, scope hints) instead of repeating the same context across tool descriptions. Client adoption is uneven, but there's no downside when set.
|
|
198
203
|
|
|
204
|
+
### Caching
|
|
205
|
+
|
|
206
|
+
Nothing this server advertises varies by caller, so `createApp({ cacheHints })` declares the list operations (`tools/list`, `prompts/list`, `resources/list`, `resources/templates/list`, `server/discover`) cacheable for an hour with `cacheScope: 'public'`. They are all decided once at startup — the tool array by the two extension gates, the rest by literals — and an hour bounds how long a client can hold a catalog from a build whose gates have since changed. `resources/read` is deliberately left off that map: `bodyResource` carries its own 24-hour `cacheHint`, and a server-wide default would silently extend that policy to whichever resource is added next. Hints exist only on protocol revision 2026-07-28; a 2025-era response is unchanged either way.
|
|
207
|
+
|
|
208
|
+
### Session mode
|
|
209
|
+
|
|
210
|
+
`stateless`, set in the `Dockerfile` and documented in `.env.example`. The mode a stateless server gives up is the 2025-era multi-round-trip shim, and no handler here calls `ctx.requestInput` — every tool is a pure function of its arguments — so there is nothing to give up. stdio and 2026-07-28 clients behave identically under either mode, so a green field test says nothing about this choice; the absent call site is the reason.
|
|
211
|
+
|
|
199
212
|
---
|
|
200
213
|
|
|
201
214
|
## Context
|
|
@@ -204,13 +217,13 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
204
217
|
|
|
205
218
|
| Property | Description |
|
|
206
219
|
|:---------|:------------|
|
|
207
|
-
| `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
|
|
220
|
+
| `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino **and** `notifications/message` to the client, so treat it as client-visible. |
|
|
208
221
|
| `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
|
|
209
|
-
| `ctx.
|
|
222
|
+
| `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
|
|
223
|
+
| `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
|
|
210
224
|
| `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
|
|
211
225
|
| `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
|
|
212
226
|
| `ctx.signal` | `AbortSignal` for cancellation. |
|
|
213
|
-
| `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
|
|
214
227
|
| `ctx.requestId` | Unique request ID. |
|
|
215
228
|
| `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
|
|
216
229
|
|
|
@@ -326,7 +339,7 @@ Available skills:
|
|
|
326
339
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
327
340
|
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
328
341
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
329
|
-
| `api-context` | Context interface, logger, state,
|
|
342
|
+
| `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
|
|
330
343
|
| `api-errors` | McpError, JsonRpcErrorCode, error patterns |
|
|
331
344
|
| `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
|
|
332
345
|
| `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
|
package/Dockerfile
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# This stage installs all dependencies (including dev), builds the TypeScript
|
|
5
5
|
# source code into JavaScript, and prepares the production assets.
|
|
6
6
|
# ==============================================================================
|
|
7
|
-
FROM oven/bun:1.
|
|
7
|
+
FROM --platform=$BUILDPLATFORM oven/bun:1.4.0 AS build
|
|
8
8
|
|
|
9
9
|
WORKDIR /usr/src/app
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ RUN bun run build
|
|
|
30
30
|
# application. It uses a slim base image and only includes production
|
|
31
31
|
# dependencies and build artifacts.
|
|
32
32
|
# ==============================================================================
|
|
33
|
-
FROM oven/bun:1.
|
|
33
|
+
FROM oven/bun:1.4.0-slim AS production
|
|
34
34
|
|
|
35
35
|
WORKDIR /usr/src/app
|
|
36
36
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
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
|
|
|
@@ -153,7 +153,7 @@ Agent-friendly output:
|
|
|
153
153
|
- Preserves uncertainty — magnitude, angular diameter, phase, and illumination are `null` (not 0, not omitted) when unavailable, and `format()` renders "unavailable" rather than inventing a value
|
|
154
154
|
- Server-computed visibility notes are deterministic prose from real magnitude and altitude — no synthetic confidence scores
|
|
155
155
|
- Typed error contracts with recovery hints (out-of-range time, missing observer/body, unresolved designation) so callers can correct and retry
|
|
156
|
-
- `format()` is content-complete on every tool — `content[]`-only clients see the same fields as `structuredContent` clients, and the same numbers: a value reads as a rounded display figure followed by its exact counterpart in brackets, e.g. `RA 4.4116 h [4.411597993526305]`, dropped when the rounding already round-trips. `astronomy_list_visible`
|
|
156
|
+
- `format()` is content-complete on every tool — `content[]`-only clients see the same fields as `structuredContent` clients, and the same numbers: a value reads as a rounded display figure followed by its exact counterpart in brackets, e.g. `RA 4.4116 h [4.411597993526305]`, dropped when the rounding already round-trips. `astronomy_list_visible` rounds hardest, since its per-body line is read at a glance down a list of dozens of bodies, and still carries every value's exact tail — no listed body needs a second call to recover its coordinates
|
|
157
157
|
|
|
158
158
|
## Getting started
|
|
159
159
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "astronomy_list_visible's content[] scan line now tails every number, not just distance, growing responses about 1.5x; astronomy_get_sky_position returns the body card inline for solar-system bodies."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.2.8 — 2026-08-18
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`astronomy_get_sky_position`** — returns `body_metadata` (`type`, `mean_radius_km`, `naked_eye`) inline for solar-system bodies, the same values served at `astronomy://body/{body}`, so a client without resource support reaches them without a second call. Absent for a catalog star, which has no card. ([#24](https://github.com/cyanheads/astronomy-mcp-server/issues/24))
|
|
12
|
+
|
|
13
|
+
## Fixed
|
|
14
|
+
|
|
15
|
+
- **`astronomy_list_visible`** — `format()`'s per-body scan line now tails every numeric field (altitude, azimuth, RA, Dec, magnitude, angular diameter, phase angle, illuminated fraction, ecliptic lon/lat) with its exact value, matching the `content[]`/`structuredContent` parity every other tool already has; previously only `distance_au` carried a tail. The rounded display figure still leads each value. This grows a full sky sweep's response by roughly 1.5x (10,822 → 16,517 characters on a 39-body sweep). ([#14](https://github.com/cyanheads/astronomy-mcp-server/issues/14))
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adopts mcp-ts-core ^0.12.3: a tool call with an argument key the schema doesn't declare is now rejected by name instead of accepted, every tool's outputSchema declares the error envelope, and list operations plus the body resource advertise cache hints. Bun pinned to 1.4.0."
|
|
3
|
+
breaking: true
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.2.9 — 2026-08-25
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **Cache hints** — `createApp` declares hour-long `public` hints on `tools/list`, `prompts/list`, `resources/list`, `resources/templates/list`, and `server/discover`; `astronomy://body/{body}` carries its own day-long `public` `cacheHint`. Effective on protocol revision 2026-07-28 only.
|
|
12
|
+
|
|
13
|
+
## Changed
|
|
14
|
+
|
|
15
|
+
- **A tool call with an argument key the schema doesn't declare is now rejected by name** instead of accepted and stripped — `@cyanheads/mcp-ts-core` ^0.12.3 applies `.strict()` to every tool's root input, advertising `additionalProperties: false`. `astronomy_get_satellite_passes` applies `.strict()` itself so its `norad_id`/`name` `oneOf` exclusivity survives onto the advertised `inputSchema`.
|
|
16
|
+
- **Every tool's advertised `outputSchema` now declares the error envelope.** Success fields become optional, an `error` object is added, and an `anyOf` recovers the original `required` list per branch — a client that validates `structuredContent` without checking `isError` stops rejecting error results as schema mismatches.
|
|
17
|
+
|
|
18
|
+
## Dependencies
|
|
19
|
+
|
|
20
|
+
- `@cyanheads/mcp-ts-core` `^0.11.5` → `^0.12.3`
|
|
21
|
+
- `@biomejs/biome` (dev) `2.5.8` → `2.5.10`
|
|
22
|
+
- `tsc-alias` (dev) `^1.9.1` → `^1.9.2`
|
|
23
|
+
- `vitest` (dev) `^4.1.10` → `^4.1.11`
|
|
24
|
+
- `packageManager` `bun@1.3.14` → `bun@1.4.0` (also pinned in `Dockerfile`)
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,23 @@ await createApp({
|
|
|
39
39
|
name: 'astronomy-mcp-server',
|
|
40
40
|
title: 'astronomy-mcp-server',
|
|
41
41
|
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.',
|
|
42
|
+
/**
|
|
43
|
+
* Every catalog a client can list here is decided once, at startup: the tool array is
|
|
44
|
+
* fixed by the two gates read above, and the resource, template, and prompt sets are
|
|
45
|
+
* literals. None of them varies by caller — no definition declares an auth scope — so
|
|
46
|
+
* the results are shareable rather than per-client, and an hour is short enough that a
|
|
47
|
+
* redeploy flipping a gate reaches a reconnecting client on its next miss. Deliberately
|
|
48
|
+
* absent is a `resources/read` entry: the one resource states its own longer hint, and a
|
|
49
|
+
* server-wide default would silently apply that policy to whatever is added next. Cache
|
|
50
|
+
* hints exist only on protocol revision 2026-07-28; 2025-era responses are unchanged.
|
|
51
|
+
*/
|
|
52
|
+
cacheHints: {
|
|
53
|
+
'tools/list': { ttlMs: 3_600_000, cacheScope: 'public' },
|
|
54
|
+
'prompts/list': { ttlMs: 3_600_000, cacheScope: 'public' },
|
|
55
|
+
'resources/list': { ttlMs: 3_600_000, cacheScope: 'public' },
|
|
56
|
+
'resources/templates/list': { ttlMs: 3_600_000, cacheScope: 'public' },
|
|
57
|
+
'server/discover': { ttlMs: 3_600_000, cacheScope: 'public' },
|
|
58
|
+
},
|
|
42
59
|
setup() {
|
|
43
60
|
initEphemerisService();
|
|
44
61
|
if (cfg.enableHorizons) {
|
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,GAA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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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/body.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"body.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/body.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;GAmEvB,CAAC"}
|
|
@@ -14,6 +14,14 @@ export const bodyResource = resource('astronomy://body/{body}', {
|
|
|
14
14
|
title: 'astronomy-mcp-server: body reference card',
|
|
15
15
|
description: 'Static reference card for a solar-system body: canonical name, type (star/planet/moon/dwarf), mean radius in kilometers, and whether it is naked-eye visible. `{body}` must be one of the closed enum values (sun, moon, mercury … pluto).',
|
|
16
16
|
mimeType: 'application/json',
|
|
17
|
+
/**
|
|
18
|
+
* The card is a lookup into a compiled-in table of IAU/NASA figures — the same bytes
|
|
19
|
+
* for every caller, on every request, for the life of the build. A day is the horizon
|
|
20
|
+
* over which a redeploy would be the only thing to invalidate it, and `public` is
|
|
21
|
+
* accurate because nothing here is observer-, tenant-, or auth-scoped. Applies to
|
|
22
|
+
* protocol revision 2026-07-28 only; 2025-era reads are unchanged.
|
|
23
|
+
*/
|
|
24
|
+
cacheHint: { ttlMs: 86_400_000, cacheScope: 'public' },
|
|
17
25
|
params: z.object({
|
|
18
26
|
body: z
|
|
19
27
|
.string()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/body.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAiB,MAAM,+BAA+B,CAAC;AAE1E,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,yBAAyB,EAAE;IAC9D,IAAI,EAAE,0BAA0B;IAChC,KAAK,EAAE,2CAA2C;IAClD,WAAW,EACT,4OAA4O;IAC9O,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,CACP,oGAAoG,CACrG;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,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ACL,IAAI,EAAE,GAAG;YACT,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,YAAY;YACjC,SAAS,EAAE,IAAI,CAAC,QAAQ;SACzB,CAAC;IACJ,CAAC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAChC,GAAG,EAAE,oBAAoB,CAAC,EAAE;YAC5B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;YACvB,QAAQ,EAAE,kBAAkB;SAC7B,CAAC,CAAC;KACJ,CAAC;IAEF,QAAQ,EAAE;QACR,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;KACzF;CACF,CAAC,CAAC"}
|
|
@@ -36,7 +36,7 @@ export declare const getSatellitePassesTool: import("@cyanheads/mcp-ts-core").To
|
|
|
36
36
|
days: z.ZodDefault<z.ZodNumber>;
|
|
37
37
|
start: z.ZodOptional<z.ZodString>;
|
|
38
38
|
timezone: z.ZodOptional<z.ZodString>;
|
|
39
|
-
}, z.core.$
|
|
39
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
40
40
|
norad_id: z.ZodNumber;
|
|
41
41
|
satellite_name: z.ZodOptional<z.ZodString>;
|
|
42
42
|
resolved_from_name: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-satellite-passes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;iBA2DhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-satellite-passes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;iBA2DhC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmPjC,CAAC"}
|
|
@@ -103,6 +103,16 @@ export const getSatellitePassesTool = tool('astronomy_get_satellite_passes', {
|
|
|
103
103
|
.optional()
|
|
104
104
|
.describe('IANA timezone for localized pass times, e.g. "America/Los_Angeles". When omitted, output is UTC-only.'),
|
|
105
105
|
})
|
|
106
|
+
/**
|
|
107
|
+
* Strictness is declared here rather than left to `tool()`, which applies its own
|
|
108
|
+
* `.strict()` to an input that declares no catchall. That call builds a new schema,
|
|
109
|
+
* and Zod keys `.meta()` to the instance it was set on — so a framework-applied
|
|
110
|
+
* `.strict()` would drop the `oneOf` below and publish an `inputSchema` that no
|
|
111
|
+
* longer states the exclusivity. Strictening first puts `.meta()` on the schema that
|
|
112
|
+
* survives, so the emitted shape carries both `additionalProperties: false` and the
|
|
113
|
+
* branches. Same semantics either way — `.strict()` is the catchall `tool()` looks for.
|
|
114
|
+
*/
|
|
115
|
+
.strict()
|
|
106
116
|
/**
|
|
107
117
|
* `norad_id` and `name` are two ways of naming one object, so neither can be marked
|
|
108
118
|
* required on its own. `oneOf` carries the exclusivity into the emitted JSON Schema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-satellite-passes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-satellite-passes.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;IAClF,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,0EAA0E,CAAC;IACvF,kBAAkB,EAAE,CAAC;SAClB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,iHAAiH,CAClH;IACH,MAAM,EAAE,CAAC;SACN,KAAK,CACJ,CAAC;SACE,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,CAAC,6DAA6D,CAAC;QAC1E,QAAQ,EAAE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,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,mBAAmB,EAAE,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,CACtc,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -7,6 +7,16 @@ import { z } from '@cyanheads/mcp-ts-core';
|
|
|
7
7
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
8
8
|
export declare const SkyPositionOutput: z.ZodObject<{
|
|
9
9
|
body: z.ZodString;
|
|
10
|
+
body_metadata: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
type: z.ZodEnum<{
|
|
12
|
+
dwarf: "dwarf";
|
|
13
|
+
moon: "moon";
|
|
14
|
+
planet: "planet";
|
|
15
|
+
star: "star";
|
|
16
|
+
}>;
|
|
17
|
+
mean_radius_km: z.ZodNumber;
|
|
18
|
+
naked_eye: z.ZodBoolean;
|
|
19
|
+
}, z.core.$strip>>;
|
|
10
20
|
time_utc: z.ZodString;
|
|
11
21
|
time_local: z.ZodOptional<z.ZodString>;
|
|
12
22
|
equatorial: z.ZodObject<{
|
|
@@ -54,6 +64,16 @@ export declare const getSkyPositionTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
54
64
|
timezone: z.ZodOptional<z.ZodString>;
|
|
55
65
|
}, z.core.$strip>, z.ZodObject<{
|
|
56
66
|
body: z.ZodString;
|
|
67
|
+
body_metadata: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
type: z.ZodEnum<{
|
|
69
|
+
dwarf: "dwarf";
|
|
70
|
+
moon: "moon";
|
|
71
|
+
planet: "planet";
|
|
72
|
+
star: "star";
|
|
73
|
+
}>;
|
|
74
|
+
mean_radius_km: z.ZodNumber;
|
|
75
|
+
naked_eye: z.ZodBoolean;
|
|
76
|
+
}, z.core.$strip>>;
|
|
57
77
|
time_utc: z.ZodString;
|
|
58
78
|
time_local: z.ZodOptional<z.ZodString>;
|
|
59
79
|
equatorial: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sky-position.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-sky-position.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"get-sky-position.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-sky-position.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAOjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyE5B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEtE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8G7B,CAAC;AA+CH,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,CAAC,EAAE,qBAAqB,GAAG,MAAM,CA+B/D"}
|
|
@@ -7,10 +7,19 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
|
7
7
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
8
8
|
import { getServerConfig } from '../../../config/server-config.js';
|
|
9
9
|
import { num, pct, sig } from '../../../mcp-server/tools/format-numbers.js';
|
|
10
|
+
import { BODY_META } from '../../../services/ephemeris/body-data.js';
|
|
10
11
|
import { getEphemerisService } from '../../../services/ephemeris/ephemeris-service.js';
|
|
11
12
|
import { BODY_NAMES } from '../../../services/ephemeris/types.js';
|
|
12
13
|
export const SkyPositionOutput = z.object({
|
|
13
14
|
body: z.string().describe('The body or star this position is for, echoed from the request.'),
|
|
15
|
+
body_metadata: z
|
|
16
|
+
.object({
|
|
17
|
+
type: z.enum(['star', 'planet', 'moon', 'dwarf']).describe('Classification of the body.'),
|
|
18
|
+
mean_radius_km: z.number().describe('Mean radius in kilometers, from IAU/NASA fact sheets.'),
|
|
19
|
+
naked_eye: z.boolean().describe('True when the body is typically visible to the naked eye.'),
|
|
20
|
+
})
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('The body card also served at astronomy://body/{body}, copied here so a client without resource support can reach it. Present for the ten solar-system bodies; absent for a catalog star, which has no card.'),
|
|
14
23
|
time_utc: z.string().describe('The instant of the observation in ISO 8601 UTC.'),
|
|
15
24
|
time_local: z
|
|
16
25
|
.string()
|
|
@@ -67,7 +76,7 @@ export const SkyPositionOutput = z.object({
|
|
|
67
76
|
});
|
|
68
77
|
export const getSkyPositionTool = tool('astronomy_get_sky_position', {
|
|
69
78
|
title: 'astronomy-mcp-server: get sky position',
|
|
70
|
-
description: 'Compute the apparent topocentric position of one solar-system body (sun, moon, mercury through neptune, pluto) or a named bright star for an observer location and instant. Returns equatorial (RA/Dec), refraction-corrected horizontal (altitude/azimuth), and ecliptic coordinates, plus distance, apparent magnitude, angular diameter, phase angle, illuminated fraction, and the constellation it falls in. Positions are parallax- and aberration-corrected for the given observer; default elevation is 0 m and the default time is now. Supply `star` (e.g. "Sirius", "Polaris") instead of `body` to target a catalog star; `body` is ignored when `star` is set. Pass an IANA `timezone` to also receive the observer-local time. This server does not geocode — resolve a place name to latitude/longitude upstream first.',
|
|
79
|
+
description: 'Compute the apparent topocentric position of one solar-system body (sun, moon, mercury through neptune, pluto) or a named bright star for an observer location and instant. Returns equatorial (RA/Dec), refraction-corrected horizontal (altitude/azimuth), and ecliptic coordinates, plus distance, apparent magnitude, angular diameter, phase angle, illuminated fraction, and the constellation it falls in. For a solar-system body it also returns that body card — classification, mean radius, naked-eye visibility — the same values served at astronomy://body/{body}, so a client without resource support does not need a second surface to reach them; a catalog star has no card and the field is absent. Positions are parallax- and aberration-corrected for the given observer; default elevation is 0 m and the default time is now. Supply `star` (e.g. "Sirius", "Polaris") instead of `body` to target a catalog star; `body` is ignored when `star` is set. Pass an IANA `timezone` to also receive the observer-local time. This server does not geocode — resolve a place name to latitude/longitude upstream first.',
|
|
71
80
|
annotations: { readOnlyHint: true, openWorldHint: false, idempotentHint: true },
|
|
72
81
|
input: z.object({
|
|
73
82
|
body: z
|
|
@@ -167,8 +176,23 @@ export const getSkyPositionTool = tool('astronomy_get_sky_position', {
|
|
|
167
176
|
});
|
|
168
177
|
/** Map the service's camelCase record to the snake_case wire output. */
|
|
169
178
|
function toOutput(pos) {
|
|
179
|
+
/**
|
|
180
|
+
* `pos.body` echoes the request: a body key for a solar-system target, a catalog star
|
|
181
|
+
* name otherwise. Only the former has a card, so the lookup is also the discriminator —
|
|
182
|
+
* a star yields no metadata rather than a fabricated one.
|
|
183
|
+
*/
|
|
184
|
+
const card = BODY_META[pos.body];
|
|
170
185
|
return {
|
|
171
186
|
body: pos.body,
|
|
187
|
+
...(card
|
|
188
|
+
? {
|
|
189
|
+
body_metadata: {
|
|
190
|
+
type: card.type,
|
|
191
|
+
mean_radius_km: card.meanRadiusKm,
|
|
192
|
+
naked_eye: card.nakedEye,
|
|
193
|
+
},
|
|
194
|
+
}
|
|
195
|
+
: {}),
|
|
172
196
|
time_utc: pos.timeUtc,
|
|
173
197
|
...(pos.timeLocal ? { time_local: pos.timeLocal } : {}),
|
|
174
198
|
equatorial: {
|
|
@@ -207,6 +231,9 @@ export function formatPosition(r) {
|
|
|
207
231
|
lines.push(`**Phase angle:** ${r.phase_angle_degrees === null ? 'unavailable' : num(r.phase_angle_degrees, 2, '°')}`);
|
|
208
232
|
lines.push(`**Illuminated fraction:** ${r.illuminated_fraction === null ? 'unavailable' : pct(r.illuminated_fraction, 1)}`);
|
|
209
233
|
lines.push(`**Constellation:** ${r.constellation.name} (${r.constellation.abbreviation})`);
|
|
234
|
+
if (r.body_metadata) {
|
|
235
|
+
lines.push(`**Body:** ${r.body_metadata.type}, mean radius ${r.body_metadata.mean_radius_km} km, naked-eye ${r.body_metadata.naked_eye ? 'yes' : 'no'}`);
|
|
236
|
+
}
|
|
210
237
|
return lines.join('\n');
|
|
211
238
|
}
|
|
212
239
|
//# sourceMappingURL=get-sky-position.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sky-position.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-sky-position.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;IAC5F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IAChF,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,oBAAoB,EAAE,CAAC;SACpB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,qEAAqE,CAAC;IAClF,aAAa,EAAE,CAAC;SACb,MAAM,CAAC;QACN,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;QACzF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;KACpE,CAAC;SACD,QAAQ,CAAC,oDAAoD,CAAC;CAClE,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACnE,KAAK,EAAE,wCAAwC;IAC/C,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"get-sky-position.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-sky-position.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;IAC5F,aAAa,EAAE,CAAC;SACb,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM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a,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAC7I,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-visible.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-visible.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"list-visible.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-visible.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0BjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuK1B,CAAC"}
|
|
@@ -8,15 +8,24 @@
|
|
|
8
8
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
9
9
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
10
10
|
import { getServerConfig } from '../../../config/server-config.js';
|
|
11
|
-
import { sig } from '../../../mcp-server/tools/format-numbers.js';
|
|
11
|
+
import { num, pct, sig } from '../../../mcp-server/tools/format-numbers.js';
|
|
12
12
|
import { getEphemerisService } from '../../../services/ephemeris/ephemeris-service.js';
|
|
13
13
|
import { SkyPositionOutput } from './get-sky-position.tool.js';
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The per-body element reuses the single-position shape, minus the body card. The card is
|
|
16
|
+
* static reference data, identical on every call and already addressable per body through
|
|
17
|
+
* `astronomy://body/{body}` and `astronomy_get_sky_position` — repeating it down a list of
|
|
18
|
+
* dozens of bodies would bloat the one surface that is read at a glance, for a value that
|
|
19
|
+
* never varies with the observation.
|
|
20
|
+
*/
|
|
21
|
+
const VisibleBodySchema = SkyPositionOutput.omit({ body_metadata: true })
|
|
22
|
+
.extend({
|
|
15
23
|
rank: z.number().describe('1-based rank, brightest-and-highest first.'),
|
|
16
24
|
visibility_note: z
|
|
17
25
|
.string()
|
|
18
26
|
.describe('Server-computed one-line headline from real values, e.g. "Venus, mag -4.1, 12° above the WSW horizon — very bright".'),
|
|
19
|
-
})
|
|
27
|
+
})
|
|
28
|
+
.describe('A sky position above the horizon, with its rank and a plain-language visibility note.');
|
|
20
29
|
export const ListVisibleOutput = z.object({
|
|
21
30
|
sky_condition: z
|
|
22
31
|
.enum(['daylight', 'civil_twilight', 'nautical_twilight', 'astronomical_twilight', 'dark'])
|
|
@@ -143,37 +152,37 @@ export const listVisibleTool = tool('astronomy_list_visible', {
|
|
|
143
152
|
return out;
|
|
144
153
|
},
|
|
145
154
|
/**
|
|
146
|
-
* The scan surface, so the
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
155
|
+
* The scan surface, so the display precision is the coarsest of any tool on this
|
|
156
|
+
* server — one decimal on an angle, read at a glance down a list of dozens of
|
|
157
|
+
* bodies. Behind each rounded display sits the exact value in brackets, so a
|
|
158
|
+
* `content[]`-only client recovers from this result what a `structuredContent`
|
|
159
|
+
* client reads, instead of a second `astronomy_get_sky_position` call per body.
|
|
160
|
+
* That runs a full sky sweep about 1.5x longer than the bare line.
|
|
152
161
|
*/
|
|
153
162
|
format: (r) => {
|
|
154
163
|
const lines = [
|
|
155
|
-
`Sky: ${r.sky_condition} (Sun ${r.sun_altitude_degrees
|
|
164
|
+
`Sky: ${r.sky_condition} (Sun ${num(r.sun_altitude_degrees, 1, '°')}) — ${r.total_count} bodies visible`,
|
|
156
165
|
];
|
|
157
166
|
if (r.bodies.length === 0) {
|
|
158
167
|
lines.push('No bodies above the minimum-altitude filter at this instant.');
|
|
159
168
|
}
|
|
160
|
-
/** Round to `digits` with an optional unit suffix; null reads as "n/a". */
|
|
161
|
-
const orNa = (v, digits, suffix = '') => v === null ? 'n/a' :
|
|
169
|
+
/** Round to `digits` with an optional unit suffix; null reads as "n/a", untailed. */
|
|
170
|
+
const orNa = (v, digits, suffix = '') => v === null ? 'n/a' : num(v, digits, suffix);
|
|
162
171
|
for (const b of r.bodies) {
|
|
163
172
|
// The visibility_note is the human headline; the supporting coordinates
|
|
164
173
|
// follow on one compact, rounded line.
|
|
165
174
|
lines.push(`## ${b.rank}. ${b.body} — ${b.visibility_note}`);
|
|
166
175
|
lines.push([
|
|
167
|
-
`alt ${b.horizontal.altitude_degrees
|
|
168
|
-
`RA ${b.equatorial.ra_hours
|
|
176
|
+
`alt ${num(b.horizontal.altitude_degrees, 1, '°')} az ${num(b.horizontal.azimuth_degrees, 1, '°')} (${b.horizontal.above_horizon ? 'above' : 'below'} horizon)`,
|
|
177
|
+
`RA ${num(b.equatorial.ra_hours, 2, 'h')} Dec ${num(b.equatorial.dec_degrees, 1, '°')}`,
|
|
169
178
|
// Significant figures, not fixed decimals — `toFixed(3)` rendered the Moon
|
|
170
179
|
// as "0.003 AU", 13% high.
|
|
171
180
|
sig(b.equatorial.distance_au, 4, ' AU'),
|
|
172
181
|
`mag ${orNa(b.magnitude, 1)}`,
|
|
173
182
|
`⌀ ${orNa(b.angular_diameter_arcsec, 1, '″')}`,
|
|
174
183
|
`phase ${orNa(b.phase_angle_degrees, 1, '°')}`,
|
|
175
|
-
`illum ${b.illuminated_fraction === null ? 'n/a' :
|
|
176
|
-
`ecl lon ${b.ecliptic.longitude_degrees
|
|
184
|
+
`illum ${b.illuminated_fraction === null ? 'n/a' : pct(b.illuminated_fraction, 0)}`,
|
|
185
|
+
`ecl lon ${num(b.ecliptic.longitude_degrees, 1, '°')} lat ${num(b.ecliptic.latitude_degrees, 1, '°')}`,
|
|
177
186
|
`${b.constellation.name} (${b.constellation.abbreviation})`,
|
|
178
187
|
`${b.time_utc}${b.time_local ? ` (local ${b.time_local})` : ''}`,
|
|
179
188
|
].join(' · '));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-visible.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-visible.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"list-visible.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-visible.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,IAAI,CAAC,EAAE,aA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CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;gBACtG,GAAG,CAAC,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,CAAC,aAAa,CAAC,YAAY,GAAG;gBAC3D,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;aACjE,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -6,10 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* These helpers carry no domain judgment: the caller picks the display precision
|
|
8
8
|
* and the unit, because how coarse a value may read is a per-field decision that
|
|
9
|
-
* belongs in the tool definition.
|
|
10
|
-
* of decision — `astronomy_list_visible` renders its scan line with plain `toFixed`
|
|
11
|
-
* and uses `sig` only for the distance, where the display cannot stand in for the
|
|
12
|
-
* value.
|
|
9
|
+
* belongs in the tool definition.
|
|
13
10
|
* @module mcp-server/tools/format-numbers
|
|
14
11
|
*/
|
|
15
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-numbers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-numbers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"format-numbers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-numbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH;;;GAGG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,CAEpE;AAOD;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|
|
@@ -6,10 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* These helpers carry no domain judgment: the caller picks the display precision
|
|
8
8
|
* and the unit, because how coarse a value may read is a per-field decision that
|
|
9
|
-
* belongs in the tool definition.
|
|
10
|
-
* of decision — `astronomy_list_visible` renders its scan line with plain `toFixed`
|
|
11
|
-
* and uses `sig` only for the distance, where the display cannot stand in for the
|
|
12
|
-
* value.
|
|
9
|
+
* belongs in the tool definition.
|
|
13
10
|
* @module mcp-server/tools/format-numbers
|
|
14
11
|
*/
|
|
15
12
|
/** Append the exact value unless the rounded string already round-trips to it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-numbers.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-numbers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"format-numbers.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-numbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,SAAS,SAAS,CAAC,KAAa,EAAE,IAAY,EAAE,KAAa;IAC3D,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,CAAC;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,IAAI,GAAG,EAAE;IAC1D,OAAO,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACvD,CAAC;AAED,8EAA8E;AAC9E,SAAS,UAAU,CAAC,KAAa,EAAE,MAAc;IAC/C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC1E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,IAAI,GAAG,EAAE;IAC1D,OAAO,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,MAAc;IAClD,OAAO,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,QAAQ,GAAG,CAAC;AACvE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/astronomy-mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
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",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"license": "Apache-2.0",
|
|
80
|
-
"packageManager": "bun@1.
|
|
80
|
+
"packageManager": "bun@1.4.0",
|
|
81
81
|
"engines": {
|
|
82
82
|
"bun": ">=1.3.0",
|
|
83
83
|
"node": ">=24.0.0"
|
|
@@ -86,20 +86,20 @@
|
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@cyanheads/mcp-ts-core": "^0.
|
|
89
|
+
"@cyanheads/mcp-ts-core": "^0.12.3",
|
|
90
90
|
"astronomy-engine": "^2.1.19",
|
|
91
91
|
"pino-pretty": "^13.1.3",
|
|
92
92
|
"satellite.js": "^7.1.0",
|
|
93
93
|
"zod": "^4.4.3"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@biomejs/biome": "2.5.
|
|
96
|
+
"@biomejs/biome": "2.5.10",
|
|
97
97
|
"@socketsecurity/bun-security-scanner": "^1.1.2",
|
|
98
98
|
"@types/node": "^26.2.0",
|
|
99
99
|
"depcheck": "^1.4.7",
|
|
100
100
|
"ignore": "^7.0.6",
|
|
101
|
-
"tsc-alias": "^1.9.
|
|
101
|
+
"tsc-alias": "^1.9.2",
|
|
102
102
|
"typescript": "^7.0.2",
|
|
103
|
-
"vitest": "^4.1.
|
|
103
|
+
"vitest": "^4.1.11"
|
|
104
104
|
}
|
|
105
105
|
}
|
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.2.
|
|
9
|
+
"version": "0.2.9",
|
|
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": "bun",
|
|
22
|
-
"version": "0.2.
|
|
22
|
+
"version": "0.2.9",
|
|
23
23
|
"packageArguments": [
|
|
24
24
|
{
|
|
25
25
|
"type": "positional",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
69
69
|
"identifier": "@cyanheads/astronomy-mcp-server",
|
|
70
70
|
"runtimeHint": "bun",
|
|
71
|
-
"version": "0.2.
|
|
71
|
+
"version": "0.2.9",
|
|
72
72
|
"packageArguments": [
|
|
73
73
|
{
|
|
74
74
|
"type": "positional",
|