@interstellar-tools/mcp 1.2.1 → 1.3.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/README.md CHANGED
@@ -68,37 +68,48 @@ returned as `{ "rad": …, "deg": … }`.
68
68
 
69
69
  ## Tools
70
70
 
71
- | Tool | What it computes |
72
- | ---------------------------- | --------------------------------------------------------------- |
73
- | `gravitational_parameter` | μ = G·(M + m) from masses |
74
- | `circular_speed` | Circular orbit speed at radius r |
75
- | `escape_speed` | Escape speed at radius r |
76
- | `vis_viva_speed` | Speed at radius r on an orbit with semi-major axis a |
77
- | `kepler_period` | Orbital period from semi-major axis |
78
- | `peri_apoapsis_radii` | Periapsis and apoapsis radii from a and e |
79
- | `sphere_of_influence_radius` | Laplace sphere of influence |
80
- | `state_to_elements` | Orbital elements from a position and velocity |
81
- | `elements_to_state` | Position and velocity from orbital elements |
82
- | `hohmann_transfer` | Both burns, total Δv and transfer time |
83
- | `rocket_delta_v` | Tsiolkovsky rocket equation from Isp and masses |
84
- | `plane_change_delta_v` | Δv for a pure inclination change |
85
- | `solve_lambert` | Velocities for a transfer between two positions in a given time |
86
- | `hyperbolic_departure` | Δv, C3 and eccentricity to leave or be captured with a given v∞ |
87
- | `solve_kepler` | Eccentric anomaly from mean anomaly and eccentricity |
88
- | `convert_anomaly` | Mean ↔ eccentric ↔ true anomaly (elliptic orbits) |
89
- | `convert_time` | Duration between units, attoseconds to gigayears |
90
- | `convert_distance` | Distance between units, metres to gigaparsecs |
91
- | `great_circle_distance` | Distance and central angle between two points on a body |
92
- | `horizon_distance` | How far an observer at a height can see |
93
- | `geodetic_to_body_fixed` | Body-fixed x, y, z from latitude, longitude and height |
94
- | `body_fixed_to_geodetic` | Latitude, longitude and height from body-fixed x, y, z |
95
- | `project_point` | Map x and y of a point in one of seven projections |
96
- | `find_body` | Look up planets, moons, stars, comets, … by name or id |
71
+ | Tool | What it computes |
72
+ | ---------------------------- | ------------------------------------------------------------------- |
73
+ | `gravitational_parameter` | μ = G·(M + m) from masses |
74
+ | `circular_speed` | Circular orbit speed at radius r |
75
+ | `escape_speed` | Escape speed at radius r |
76
+ | `vis_viva_speed` | Speed at radius r on an orbit with semi-major axis a |
77
+ | `kepler_period` | Orbital period from semi-major axis |
78
+ | `peri_apoapsis_radii` | Periapsis and apoapsis radii from a and e |
79
+ | `sphere_of_influence_radius` | Laplace sphere of influence |
80
+ | `state_to_elements` | Orbital elements from a position and velocity |
81
+ | `elements_to_state` | Position and velocity from orbital elements |
82
+ | `hohmann_transfer` | Both burns, total Δv and transfer time |
83
+ | `rocket_delta_v` | Tsiolkovsky rocket equation from Isp and masses |
84
+ | `plane_change_delta_v` | Δv for a pure inclination change |
85
+ | `solve_lambert` | Velocities for a transfer between two positions in a given time |
86
+ | `hyperbolic_departure` | Δv, C3 and eccentricity to leave or be captured with a given v∞ |
87
+ | `solve_kepler` | Eccentric anomaly from mean anomaly and eccentricity |
88
+ | `convert_anomaly` | Mean ↔ eccentric ↔ true anomaly (elliptic orbits) |
89
+ | `convert_time` | Duration between units, attoseconds to gigayears |
90
+ | `convert_distance` | Distance between units, metres to gigaparsecs |
91
+ | `great_circle_distance` | Distance and central angle between two points on a body |
92
+ | `horizon_distance` | How far an observer at a height can see |
93
+ | `geodetic_to_body_fixed` | Body-fixed x, y, z from latitude, longitude and height |
94
+ | `body_fixed_to_geodetic` | Latitude, longitude and height from body-fixed x, y, z |
95
+ | `project_point` | Map x and y of a point in one of seven projections |
96
+ | `satellite_position` | Point below a satellite, its height and TEME state, from TLE or OMM |
97
+ | `look_angles` | Azimuth, elevation, range and Doppler shift from a ground observer |
98
+ | `satellite_passes` | Rise, highest point and set over an observer, and visibility |
99
+ | `probe_position` | Where a deep-space probe is, from the bundled ephemerides |
100
+ | `lagrange_points` | L1 to L5 of two bodies, Trojan stability and the Hill sphere |
101
+ | `find_body` | Look up planets, moons, stars, comets, … by name or id |
97
102
 
98
103
  The geodesy and map tools take the shape of the body as a `body` id from
99
104
  `find_body`, such as `"mars"`, or as radii in metres. For GPS coordinates on
100
105
  Earth, the ellipsoid tools also take `"wgs84"`.
101
106
 
107
+ The satellite tools take orbital elements as a two-line element set (`tle`), an
108
+ OMM record from CelesTrak (`omm`) or the id of a satellite in the bundled
109
+ snapshot (`satellite`), and times as ISO 8601 UTC strings. The server fetches
110
+ nothing: the assistant passes fresh elements in. Each result says how old the
111
+ elements are, in `elements_age_d`; they go stale within days.
112
+
102
113
  All tools are pure and offline: no network access, no side effects.
103
114
 
104
115
  ## Resources
@@ -107,6 +118,11 @@ Each dataset in `@interstellar-tools/constants` is available as a JSON resource
107
118
  at `interstellar://datasets/{name}`, where `name` is one of `planets`, `moons`,
108
119
  `stars`, `comets`, `asteroids`, `asteroid-belts`, `galaxies` or `systems`.
109
120
 
121
+ The snapshots in `@interstellar-tools/tracking` are resources too:
122
+ `interstellar://tracking/satellites`, twelve satellites' OMM records dated 4
123
+ November 2026, and `interstellar://tracking/probes`, eleven space probes and the
124
+ span of their ephemerides.
125
+
110
126
  ## Programmatic use
111
127
 
112
128
  ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAcpE,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAEhD,kFAAkF;AAClF,eAAO,MAAM,cAAc,EAAE,MAEpB,CAAC;AAEV;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,QAAO,SAoB/B,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAepE,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAEhD,kFAAkF;AAClF,eAAO,MAAM,cAAc,EAAE,MAEpB,CAAC;AAEV;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,QAAO,SAqB/B,CAAC"}
package/dist/server.js CHANGED
@@ -9,6 +9,7 @@ import { registerMapTools } from './tools/maps.js';
9
9
  import { registerOrbitTools } from './tools/orbits.js';
10
10
  import { registerStateVectorTools } from './tools/state-vectors.js';
11
11
  import { registerTimeTools } from './tools/time.js';
12
+ import { registerTrackingTools } from './tools/tracking.js';
12
13
  export const SERVER_NAME = 'interstellar-tools';
13
14
  /** The published package version, read from `package.json` so it never drifts. */
14
15
  export const SERVER_VERSION = createRequire(import.meta.url)('../package.json').version;
@@ -26,7 +27,7 @@ export const SERVER_VERSION = createRequire(import.meta.url)('../package.json').
26
27
  */
27
28
  export const createServer = () => {
28
29
  const server = new McpServer({ name: SERVER_NAME, version: SERVER_VERSION }, {
29
- instructions: 'Deterministic orbital mechanics calculations. Every field with a unit ends with it: r_m is metres, mu_m3_s2 is m³/s², v_m_s is m/s, T_d is days. Dimensionless fields such as e have no suffix. Angles are given as { value, unit: "deg" | "rad" } and returned as { rad, deg }. Vectors are [x, y, z] arrays in an inertial frame centred on the body. Dataset distances are in au or km: use convert_distance before passing them to tools that take metres. Prefer these tools over mental arithmetic.'
30
+ instructions: 'Deterministic orbital mechanics calculations. Every field with a unit ends with it: r_m is metres, mu_m3_s2 is m³/s², v_m_s is m/s, T_d is days. Dimensionless fields such as e have no suffix. Angles are given as { value, unit: "deg" | "rad" } and returned as { rad, deg }. Vectors are [x, y, z] arrays in an inertial frame centred on the body. Dataset distances are in au or km: use convert_distance before passing them to tools that take metres. Satellite tools take orbital elements as a TLE, an OMM record or the id of a satellite in the bundled snapshot, and times as ISO 8601 UTC strings; elements go stale within days, so prefer fresh ones. Prefer these tools over mental arithmetic.'
30
31
  });
31
32
  registerOrbitTools(server);
32
33
  registerStateVectorTools(server);
@@ -36,6 +37,7 @@ export const createServer = () => {
36
37
  registerDistanceTools(server);
37
38
  registerGeodesyTools(server);
38
39
  registerMapTools(server);
40
+ registerTrackingTools(server);
39
41
  registerBodies(server);
40
42
  return server;
41
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EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,EAC9C;QACE,YAAY,EACV,mrBAAmrB;KACtrB,CACF,CAAC;IAEF,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC3B,wBAAwB,CAAC,MAAM,CAAC,CAAC;IACjC,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/B,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,cAAc,CAAC,MAAM,CAAC,CAAC;IAEvB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare const registerTrackingTools: (server: McpServer) => void;
3
+ //# sourceMappingURL=tracking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../../src/tools/tracking.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAyJzE,eAAO,MAAM,qBAAqB,GAAI,QAAQ,SAAS,SAuWtD,CAAC"}
@@ -0,0 +1,365 @@
1
+ import { AU_METERS, MOONS, PLANETS, SPEED_OF_LIGHT_M_PER_S, STARS } from '@interstellar-tools/constants';
2
+ import { areTrojanPointsStable, convertDistanceUnit, hillSphereRadius, lagrangePoints, sunPosition } from '@interstellar-tools/equations';
3
+ import { dopplerShift, earthShadow, isVisiblePass, lookAngles, parseOmm, parseTle, predictPasses, PROBES, propagate, SATELLITES, stateAt, subSatellitePoint } from '@interstellar-tools/tracking';
4
+ import { z } from 'zod';
5
+ import { angleOutput, angleOutputSchema, angleSchema, PURE_TOOL, result, toRadians, vectorOutputSchema } from './shared.js';
6
+ const DAY_MS = 86_400_000;
7
+ // The longest window satellite_passes searches: a few days of elements is
8
+ // all that's accurate anyway
9
+ const MAX_WINDOW_DAYS = 14;
10
+ const SATELLITE_IDS = SATELLITES.map(({ id }) => id);
11
+ const PROBE_IDS = PROBES.map(({ id }) => id);
12
+ const elementsInput = {
13
+ satellite: z
14
+ .string()
15
+ .min(1)
16
+ .optional()
17
+ .describe(`Id of a satellite in the bundled snapshot, dated 2026-11-04: ${SATELLITE_IDS.join(', ')}. Snapshot elements go stale within days: prefer fresh elements from CelesTrak, passed as tle or omm.`),
18
+ tle: z
19
+ .tuple([z.string(), z.string()])
20
+ .optional()
21
+ .describe('A two-line element set: [line 1, line 2].'),
22
+ omm: z
23
+ .union([z.string(), z.record(z.string(), z.unknown())])
24
+ .optional()
25
+ .describe('One Orbit Mean-elements Message record, as CelesTrak returns it with FORMAT=json, or its JSON text.')
26
+ };
27
+ const observerSchema = z
28
+ .object({
29
+ latitude: angleSchema.describe('Geodetic latitude, north positive, e.g. { "value": -1.2864, "unit": "deg" }.'),
30
+ longitude: angleSchema.describe('Longitude, east positive, e.g. { "value": 36.8172, "unit": "deg" }.'),
31
+ height_m: z
32
+ .number()
33
+ .finite()
34
+ .default(0)
35
+ .describe('Height above the WGS 84 ellipsoid, in metres.')
36
+ })
37
+ .describe('The observer on the ground.');
38
+ const timeSchema = (what) => z
39
+ .string()
40
+ .min(1)
41
+ .describe(`${what}, an ISO 8601 time in UTC, e.g. "2026-11-05T15:49:00Z".`);
42
+ const resolveElements = ({ satellite, tle, omm }) => {
43
+ const given = [satellite, tle, omm].filter((x) => x !== undefined).length;
44
+ if (given !== 1)
45
+ throw new Error('Give the elements exactly one way: satellite (a snapshot id), tle or omm.');
46
+ if (tle)
47
+ return parseTle(tle[0], tle[1]);
48
+ if (omm)
49
+ return parseOmm(omm);
50
+ const entry = SATELLITES.find(({ id }) => id === satellite.trim());
51
+ if (!entry)
52
+ throw new Error(`Unknown satellite: ${satellite}. The snapshot has ${SATELLITE_IDS.join(', ')}.`);
53
+ return parseOmm(entry.omm);
54
+ };
55
+ const parseTime = (name, text) => {
56
+ const date = new Date(text);
57
+ if (!Number.isFinite(date.getTime()))
58
+ throw new Error(`${name} must be an ISO 8601 time, like "2026-11-05T15:49:00Z". Received: ${text}`);
59
+ return date;
60
+ };
61
+ const toObserver = ({ latitude, longitude, height_m }) => ({
62
+ phi: toRadians(latitude),
63
+ lambda: toRadians(longitude),
64
+ h: height_m
65
+ });
66
+ // Days from the elements' epoch to a moment
67
+ const ageDays = (elements, date) => (date.getTime() - elements.epoch.getTime()) / DAY_MS;
68
+ const findBody = (id) => {
69
+ const needle = id.trim().toLowerCase();
70
+ const body = [...STARS, ...PLANETS, ...MOONS].find((entry) => entry.id === needle);
71
+ if (!body)
72
+ throw new Error(`Unknown body: ${id}. Use an id from find_body with a mu, such as "sun", "earth" or "moon".`);
73
+ if (body.mu === undefined)
74
+ throw new Error(`${body.id} has no mu in the datasets: give its mu instead.`);
75
+ return body;
76
+ };
77
+ // A body's μ, from its id or as given
78
+ const resolveMu = (which, id, mu) => {
79
+ if ((id === undefined) === (mu === undefined))
80
+ throw new Error(`Give the ${which} body as an id or as its mu in m³/s², not both.`);
81
+ if (mu !== undefined)
82
+ return { mu };
83
+ const body = findBody(id);
84
+ return { mu: body.mu, body };
85
+ };
86
+ export const registerTrackingTools = (server) => {
87
+ server.registerTool('satellite_position', {
88
+ title: 'Satellite position',
89
+ description: 'Where a satellite is at a moment: the point on the ground below it, its height, its position and velocity in the TEME frame, and whether it is in Earth’s shadow. Propagates the elements with SGP4. Accurate to about a kilometre near the elements’ epoch, growing by a few kilometres a day: elements_age_d says how old they are.',
90
+ inputSchema: {
91
+ ...elementsInput,
92
+ time: timeSchema('The moment')
93
+ },
94
+ outputSchema: {
95
+ name: z.string().optional(),
96
+ epoch_utc: z.string(),
97
+ elements_age_d: z.number(),
98
+ latitude: angleOutputSchema,
99
+ longitude: angleOutputSchema,
100
+ height_m: z.number(),
101
+ speed_m_s: z.number(),
102
+ position_teme_m: vectorOutputSchema,
103
+ velocity_teme_m_s: vectorOutputSchema,
104
+ shadow: z.enum(['sunlit', 'penumbra', 'umbra'])
105
+ },
106
+ annotations: PURE_TOOL
107
+ }, ({ time, ...elementsGiven }) => {
108
+ const elements = resolveElements(elementsGiven);
109
+ const date = parseTime('time', time);
110
+ const { r, v } = propagate(elements, date);
111
+ const below = subSatellitePoint(elements, date);
112
+ return result({
113
+ ...(elements.name ? { name: elements.name } : {}),
114
+ epoch_utc: elements.epoch.toISOString(),
115
+ elements_age_d: ageDays(elements, date),
116
+ latitude: angleOutput(below.phi),
117
+ longitude: angleOutput(below.lambda),
118
+ height_m: below.h,
119
+ speed_m_s: Math.hypot(...v),
120
+ position_teme_m: r,
121
+ velocity_teme_m_s: v,
122
+ shadow: earthShadow(r, sunPosition(date).r)
123
+ });
124
+ });
125
+ server.registerTool('look_angles', {
126
+ title: 'Look angles to a satellite',
127
+ description: 'Where to point an antenna or a camera at a satellite from the ground at a moment: azimuth clockwise from north, elevation above the horizon, range, and range rate (negative while it approaches). Give frequency_hz for the Doppler shift of its signal. The elevation is geometric, without refraction.',
128
+ inputSchema: {
129
+ ...elementsInput,
130
+ observer: observerSchema,
131
+ time: timeSchema('The moment'),
132
+ frequency_hz: z
133
+ .number()
134
+ .positive()
135
+ .optional()
136
+ .describe('Transmitted frequency, in Hz, for the Doppler shift.')
137
+ },
138
+ outputSchema: {
139
+ azimuth: angleOutputSchema,
140
+ elevation: angleOutputSchema,
141
+ above_horizon: z.boolean(),
142
+ range_m: z.number(),
143
+ range_rate_m_s: z.number(),
144
+ doppler_shift_hz: z.number().optional(),
145
+ elements_age_d: z.number()
146
+ },
147
+ annotations: PURE_TOOL
148
+ }, ({ observer, time, frequency_hz, ...elementsGiven }) => {
149
+ const elements = resolveElements(elementsGiven);
150
+ const date = parseTime('time', time);
151
+ const angles = lookAngles(elements, toObserver(observer), date);
152
+ return result({
153
+ azimuth: angleOutput(angles.azimuth),
154
+ elevation: angleOutput(angles.elevation),
155
+ above_horizon: angles.elevation > 0,
156
+ range_m: angles.range,
157
+ range_rate_m_s: angles.rangeRate,
158
+ ...(frequency_hz === undefined
159
+ ? {}
160
+ : { doppler_shift_hz: dopplerShift(frequency_hz, angles.rangeRate) }),
161
+ elements_age_d: ageDays(elements, date)
162
+ });
163
+ });
164
+ server.registerTool('satellite_passes', {
165
+ title: 'Satellite passes',
166
+ description: `When a satellite passes over an observer between two times: rise, highest point and set, with azimuths, and whether each pass can be seen with the eye (the satellite sunlit while the Sun is below -6° for the observer). Searches at most ${MAX_WINDOW_DAYS} days. Only whole passes are returned.`,
167
+ inputSchema: {
168
+ ...elementsInput,
169
+ observer: observerSchema,
170
+ from: timeSchema('Start of the window'),
171
+ to: timeSchema('End of the window'),
172
+ min_elevation: angleSchema
173
+ .optional()
174
+ .describe('The elevation that counts as rising and setting: 0 by default, the horizon. 10° skips passes low behind trees and buildings.')
175
+ },
176
+ outputSchema: {
177
+ count: z.number(),
178
+ visible_count: z.number(),
179
+ elements_age_d: z.number(),
180
+ passes: z.array(z.object({
181
+ rise_utc: z.string(),
182
+ rise_azimuth: angleOutputSchema,
183
+ culmination_utc: z.string(),
184
+ culmination_azimuth: angleOutputSchema,
185
+ max_elevation: angleOutputSchema,
186
+ set_utc: z.string(),
187
+ set_azimuth: angleOutputSchema,
188
+ visible: z.boolean()
189
+ }))
190
+ },
191
+ annotations: PURE_TOOL
192
+ }, ({ observer, from, to, min_elevation, ...elementsGiven }) => {
193
+ const elements = resolveElements(elementsGiven);
194
+ const start = parseTime('from', from);
195
+ const end = parseTime('to', to);
196
+ const site = toObserver(observer);
197
+ if (end.getTime() - start.getTime() > MAX_WINDOW_DAYS * DAY_MS)
198
+ throw new Error(`The window must be at most ${MAX_WINDOW_DAYS} days: elements are only accurate for a few days around their epoch.`);
199
+ const passes = predictPasses(elements, site, start, end, {
200
+ ...(min_elevation ? { minElevation: toRadians(min_elevation) } : {})
201
+ }).map((pass) => ({
202
+ rise_utc: pass.rise.toISOString(),
203
+ rise_azimuth: angleOutput(pass.riseAzimuth),
204
+ culmination_utc: pass.culmination.toISOString(),
205
+ culmination_azimuth: angleOutput(pass.culminationAzimuth),
206
+ max_elevation: angleOutput(pass.maxElevation),
207
+ set_utc: pass.set.toISOString(),
208
+ set_azimuth: angleOutput(pass.setAzimuth),
209
+ visible: isVisiblePass(elements, site, pass)
210
+ }));
211
+ return result({
212
+ count: passes.length,
213
+ visible_count: passes.filter(({ visible }) => visible).length,
214
+ elements_age_d: ageDays(elements, start),
215
+ passes
216
+ });
217
+ });
218
+ server.registerTool('probe_position', {
219
+ title: 'Space probe position',
220
+ description: 'Where a deep-space probe is at a moment, from the bundled JPL Horizons ephemerides (1 November 2026 to 31 December 2027): its distance from the Sun, the light time, and its position and velocity from the Sun’s centre in the ICRF. Outside that span, fetch an ephemeris from JPL Horizons with horizons_id.',
221
+ inputSchema: {
222
+ probe: z
223
+ .enum(PROBE_IDS)
224
+ .describe('Id of the probe, e.g. "voyager-1" or "jwst".'),
225
+ time: timeSchema('The moment')
226
+ },
227
+ outputSchema: {
228
+ name: z.string(),
229
+ agencies: z.array(z.string()),
230
+ launch: z.string(),
231
+ status: z.enum(['active', 'ended']),
232
+ near: z.string(),
233
+ destination: z.string().optional(),
234
+ horizons_id: z.string(),
235
+ distance_au: z.number(),
236
+ distance_m: z.number(),
237
+ light_time_s: z.number(),
238
+ speed_m_s: z.number(),
239
+ position_m: vectorOutputSchema,
240
+ velocity_m_s: vectorOutputSchema
241
+ },
242
+ annotations: PURE_TOOL
243
+ }, ({ probe, time }) => {
244
+ const entry = PROBES.find(({ id }) => id === probe);
245
+ const { r, v } = stateAt(entry.ephemeris, parseTime('time', time));
246
+ const distance = Math.hypot(...r);
247
+ return result({
248
+ name: entry.name,
249
+ agencies: [...entry.agencies],
250
+ launch: entry.launch,
251
+ status: entry.status,
252
+ near: entry.near,
253
+ ...(entry.destination ? { destination: entry.destination } : {}),
254
+ horizons_id: entry.horizonsId,
255
+ distance_au: distance / AU_METERS,
256
+ distance_m: distance,
257
+ light_time_s: distance / SPEED_OF_LIGHT_M_PER_S,
258
+ speed_m_s: Math.hypot(...v),
259
+ position_m: r,
260
+ velocity_m_s: v
261
+ });
262
+ });
263
+ server.registerTool('lagrange_points', {
264
+ title: 'Lagrange points',
265
+ description: 'The five Lagrange points of two bodies circling each other, such as Sun-Earth (JWST at L2) or Sun-Jupiter (the Trojans at L4 and L5): positions in the frame turning with the bodies, from their barycentre, x from the larger body toward the smaller. Also whether L4 and L5 are stable, and the smaller body’s Hill sphere. Give each body as an id from find_body or as its mu.',
266
+ inputSchema: {
267
+ primary: z
268
+ .string()
269
+ .min(1)
270
+ .optional()
271
+ .describe('The larger body’s id, e.g. "sun".'),
272
+ primary_mu_m3_s2: z
273
+ .number()
274
+ .positive()
275
+ .optional()
276
+ .describe('The larger body’s mu, in m³/s², instead of its id.'),
277
+ secondary: z
278
+ .string()
279
+ .min(1)
280
+ .optional()
281
+ .describe('The smaller body’s id, e.g. "earth".'),
282
+ secondary_mu_m3_s2: z
283
+ .number()
284
+ .positive()
285
+ .optional()
286
+ .describe('The smaller body’s mu, in m³/s², instead of its id.'),
287
+ separation_m: z
288
+ .number()
289
+ .positive()
290
+ .optional()
291
+ .describe('Distance between the bodies, in metres. Defaults to the smaller body’s semi-major axis, when the datasets give it around the larger.')
292
+ },
293
+ outputSchema: {
294
+ mass_ratio: z.number(),
295
+ separation_m: z.number(),
296
+ l1_m: vectorOutputSchema,
297
+ l2_m: vectorOutputSchema,
298
+ l3_m: vectorOutputSchema,
299
+ l4_m: vectorOutputSchema,
300
+ l5_m: vectorOutputSchema,
301
+ l1_from_secondary_m: z.number(),
302
+ l2_from_secondary_m: z.number(),
303
+ trojan_points_stable: z.boolean(),
304
+ hill_sphere_radius_m: z.number()
305
+ },
306
+ annotations: PURE_TOOL
307
+ }, ({ primary, primary_mu_m3_s2, secondary, secondary_mu_m3_s2, separation_m }) => {
308
+ const larger = resolveMu('larger', primary, primary_mu_m3_s2);
309
+ const smaller = resolveMu('smaller', secondary, secondary_mu_m3_s2);
310
+ const orbit = smaller.body && larger.body && smaller.body.parent === larger.body.id
311
+ ? smaller.body.orbit
312
+ : undefined;
313
+ const a = separation_m ??
314
+ (orbit ? convertDistanceUnit(orbit.a, 'm').value : undefined);
315
+ if (a === undefined)
316
+ throw new Error('Give separation_m: the datasets only give it for a body that orbits the other, such as earth around sun.');
317
+ const mu = smaller.mu / (larger.mu + smaller.mu);
318
+ const points = lagrangePoints(larger.mu, smaller.mu, a);
319
+ const at = (1 - mu) * a;
320
+ return result({
321
+ mass_ratio: mu,
322
+ separation_m: a,
323
+ l1_m: points.L1,
324
+ l2_m: points.L2,
325
+ l3_m: points.L3,
326
+ l4_m: points.L4,
327
+ l5_m: points.L5,
328
+ l1_from_secondary_m: at - points.L1[0],
329
+ l2_from_secondary_m: points.L2[0] - at,
330
+ trojan_points_stable: areTrojanPointsStable(larger.mu, smaller.mu),
331
+ hill_sphere_radius_m: hillSphereRadius(a, orbit?.e ?? 0, smaller.mu, larger.mu)
332
+ });
333
+ });
334
+ server.registerResource('satellites', 'interstellar://tracking/satellites', {
335
+ title: 'Satellite snapshot',
336
+ description: 'Orbital elements of twelve well-known satellites, as OMM records from CelesTrak dated 4 November 2026: for examples, not for tracking. Each has an id for the satellite field of the tracking tools.',
337
+ mimeType: 'application/json'
338
+ }, (uri) => ({
339
+ contents: [
340
+ {
341
+ uri: uri.href,
342
+ mimeType: 'application/json',
343
+ text: JSON.stringify(SATELLITES, null, 2)
344
+ }
345
+ ]
346
+ }));
347
+ server.registerResource('probes', 'interstellar://tracking/probes', {
348
+ title: 'Space probes',
349
+ description: 'Eleven notable space probes: agencies, launch dates, status, what each is near and heading for, and the span of its bundled ephemeris. probe_position gives their positions.',
350
+ mimeType: 'application/json'
351
+ }, (uri) => ({
352
+ contents: [
353
+ {
354
+ uri: uri.href,
355
+ mimeType: 'application/json',
356
+ text: JSON.stringify(PROBES.map(({ ephemeris, ...probe }) => ({
357
+ ...probe,
358
+ ephemeris_from_utc: ephemeris.samples[0].epoch.toISOString(),
359
+ ephemeris_to_utc: ephemeris.samples[ephemeris.samples.length - 1].epoch.toISOString()
360
+ })), null, 2)
361
+ }
362
+ ]
363
+ }));
364
+ };
365
+ //# sourceMappingURL=tracking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracking.js","sourceRoot":"","sources":["../../src/tools/tracking.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,OAAO,EACP,sBAAsB,EACtB,KAAK,EACN,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,MAAM,EACN,SAAS,EACT,UAAU,EACV,OAAO,EACP,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,MAAM,EACN,SAAS,EACT,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,GAAG,UAAU,CAAC;AAC1B,0EAA0E;AAC1E,6BAA6B;AAC7B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACrD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAA0B,CAAC;AACtE,MAAM,aAAa,GAAG;IACpB,SAA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AAO,CAAC,CAAC,CAAE,CAAC,KAAK,CAAC,WAAW,EAAE;oBAC7D,gBAAgB,EACd,SAAS,CAAC,OAAO,CACf,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAC5B,CAAC,KAAK,CAAC,WAAW,EAAE;iBACzB,CAAC,CAAC,EACH,IAAI,EACJ,CAAC,CACF;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interstellar-tools/mcp",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "description": "Model Context Protocol (MCP) server exposing interstellar-tools orbital mechanics, geodesy and map projection calculations and celestial body datasets to AI assistants.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -56,9 +56,10 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@interstellar-tools/constants": "^1.1.1",
59
- "@interstellar-tools/equations": "^1.8.0",
59
+ "@interstellar-tools/equations": "^1.13.0",
60
60
  "@interstellar-tools/maps": "^0.11.0",
61
61
  "@interstellar-tools/temporal": "^1.0.0",
62
+ "@interstellar-tools/tracking": "^0.10.0",
62
63
  "@interstellar-tools/types": "^1.0.0",
63
64
  "@modelcontextprotocol/sdk": "^1.32.2",
64
65
  "zod": "^4.6.7"