@morphemeris/mcp 0.1.0
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 +76 -0
- package/dist/index.js +537 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# @morphemeris/mcp
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for the [Morphemeris](https://morphemeris.com) astronomical ephemeris API. Gives AI coding agents direct access to planetary positions, house cusps, fixed stars, and other astronomical calculations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Claude Code
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"morphemeris": {
|
|
13
|
+
"command": "npx",
|
|
14
|
+
"args": ["-y", "@morphemeris/mcp"],
|
|
15
|
+
"env": {
|
|
16
|
+
"MORPHEMERIS_API_KEY": "morphemeris_live_..."
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Cursor
|
|
24
|
+
|
|
25
|
+
Add to your `.cursor/mcp.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"morphemeris": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": ["-y", "@morphemeris/mcp"],
|
|
33
|
+
"env": {
|
|
34
|
+
"MORPHEMERIS_API_KEY": "morphemeris_live_..."
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
| Variable | Required | Description |
|
|
44
|
+
|----------|----------|-------------|
|
|
45
|
+
| `MORPHEMERIS_API_KEY` | Yes | Your API key from [morphemeris.com/dashboard/keys](https://morphemeris.com/dashboard/keys) |
|
|
46
|
+
| `MORPHEMERIS_API_URL` | No | API base URL (default: `https://api.morphemeris.com`) |
|
|
47
|
+
|
|
48
|
+
## Tools
|
|
49
|
+
|
|
50
|
+
| Tool | Description |
|
|
51
|
+
|------|-------------|
|
|
52
|
+
| `calculate_positions` | Planetary positions (longitude, latitude, distance, speed) |
|
|
53
|
+
| `calculate_houses` | House cusps and angles (Ascendant, MC) for 21 systems |
|
|
54
|
+
| `calculate_chart` | Full chart: positions + houses in one call |
|
|
55
|
+
| `get_fixed_stars` | Fixed star positions and magnitudes |
|
|
56
|
+
| `get_ayanamsha` | Precession offset for 47 sidereal systems |
|
|
57
|
+
| `get_delta_t` | Delta T (TT - UT) for time scale conversion |
|
|
58
|
+
| `get_sidereal_time` | Greenwich and Local Sidereal Time |
|
|
59
|
+
| `list_available_values` | Discover valid bodies, house systems, ayanamsha systems |
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
Ask your AI agent:
|
|
64
|
+
|
|
65
|
+
- "Calculate a natal chart for June 15, 1990 at 2:30 PM in Harrisonburg, VA"
|
|
66
|
+
- "What are the current planetary positions?"
|
|
67
|
+
- "Show me the fixed star Aldebaran's position today"
|
|
68
|
+
- "What house system options are available?"
|
|
69
|
+
|
|
70
|
+
## Pricing
|
|
71
|
+
|
|
72
|
+
Morphemeris offers a free tier of 500 requests/month. Additional requests are $0.01 each via prepaid credits. Get your API key at [morphemeris.com](https://morphemeris.com).
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
|
+
|
|
6
|
+
// src/server.ts
|
|
7
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
|
+
|
|
9
|
+
// src/client.ts
|
|
10
|
+
var MorphemerisApiError = class extends Error {
|
|
11
|
+
constructor(statusCode, errors) {
|
|
12
|
+
const primary = errors[0];
|
|
13
|
+
const parts = [primary?.message ?? "API request failed"];
|
|
14
|
+
if (primary?.suggestion) parts.push(`Suggestion: ${primary.suggestion}`);
|
|
15
|
+
if (primary?.docs_url) parts.push(`Docs: ${primary.docs_url}`);
|
|
16
|
+
super(parts.join(". "));
|
|
17
|
+
this.statusCode = statusCode;
|
|
18
|
+
this.errors = errors;
|
|
19
|
+
this.name = "MorphemerisApiError";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var MorphemerisClient = class {
|
|
23
|
+
apiKey;
|
|
24
|
+
baseUrl;
|
|
25
|
+
fetchFn;
|
|
26
|
+
constructor(options) {
|
|
27
|
+
this.apiKey = options.apiKey;
|
|
28
|
+
this.baseUrl = (options.baseUrl ?? "https://api.morphemeris.com").replace(
|
|
29
|
+
/\/$/,
|
|
30
|
+
""
|
|
31
|
+
);
|
|
32
|
+
this.fetchFn = options.fetchFn ?? globalThis.fetch;
|
|
33
|
+
}
|
|
34
|
+
async callEndpoint(path, body) {
|
|
35
|
+
let response;
|
|
36
|
+
try {
|
|
37
|
+
response = await this.fetchFn(`${this.baseUrl}${path}`, {
|
|
38
|
+
method: "POST",
|
|
39
|
+
headers: {
|
|
40
|
+
Authorization: `Bearer ${this.apiKey}`,
|
|
41
|
+
"Content-Type": "application/json",
|
|
42
|
+
Accept: "application/json"
|
|
43
|
+
},
|
|
44
|
+
body: JSON.stringify(body)
|
|
45
|
+
});
|
|
46
|
+
} catch (err) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
`Morphemeris API unreachable at ${this.baseUrl}. Check your network connection and try again.`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
const json = await response.json();
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
const errorBody = json;
|
|
54
|
+
throw new MorphemerisApiError(
|
|
55
|
+
response.status,
|
|
56
|
+
errorBody.errors ?? [
|
|
57
|
+
{
|
|
58
|
+
code: "unknown_error",
|
|
59
|
+
message: `HTTP ${response.status}: ${response.statusText}`
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// src/tools/calculate-positions.ts
|
|
69
|
+
import { z } from "zod";
|
|
70
|
+
function registerCalculatePositions(server2, client) {
|
|
71
|
+
server2.tool(
|
|
72
|
+
"calculate_positions",
|
|
73
|
+
"Calculates ecliptic positions (longitude, latitude, distance, daily motion) for celestial bodies at a given moment. Supports tropical and sidereal zodiacs, heliocentric and topocentric corrections, and equatorial coordinates.",
|
|
74
|
+
{
|
|
75
|
+
datetime: z.string().optional().describe("ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd."),
|
|
76
|
+
jd: z.number().optional().describe("Julian Day number in UT1. Provide either datetime or jd."),
|
|
77
|
+
bodies: z.string().optional().describe("Comma-separated body names, or group name: 'planets' (default), 'asteroids', 'all'. Use list_available_values to see all options."),
|
|
78
|
+
lat: z.number().min(-90).max(90).optional().describe("Observer latitude in decimal degrees (-90 to 90). Required for topocentric correction."),
|
|
79
|
+
lon: z.number().min(-180).max(180).optional().describe("Observer longitude in decimal degrees (-180 to 180, east positive). Required for topocentric correction."),
|
|
80
|
+
alt: z.number().optional().describe("Observer altitude in meters above sea level."),
|
|
81
|
+
sidereal: z.string().optional().describe("Ayanamsha system name or ID for sidereal positions. Use list_available_values to see options."),
|
|
82
|
+
equatorial: z.boolean().optional().describe("If true, return Right Ascension / Declination instead of ecliptic longitude/latitude."),
|
|
83
|
+
speed: z.boolean().optional().describe("Include daily motion in the response. Default: true."),
|
|
84
|
+
topocentric: z.boolean().optional().describe("Apply topocentric correction (requires lat and lon)."),
|
|
85
|
+
heliocentric: z.boolean().optional().describe("Return heliocentric positions instead of geocentric."),
|
|
86
|
+
no_nutation: z.boolean().optional().describe("Skip nutation correction."),
|
|
87
|
+
j2000: z.boolean().optional().describe("Use J2000 reference frame instead of ecliptic of date.")
|
|
88
|
+
},
|
|
89
|
+
async ({ datetime, jd, bodies, lat, lon, alt, sidereal, equatorial, speed, topocentric, heliocentric, no_nutation, j2000 }) => {
|
|
90
|
+
if (!datetime && jd === void 0) {
|
|
91
|
+
return {
|
|
92
|
+
isError: true,
|
|
93
|
+
content: [{ type: "text", text: "Either 'datetime' or 'jd' is required." }]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const body = {};
|
|
97
|
+
if (datetime) body.datetime = datetime;
|
|
98
|
+
if (jd !== void 0) body.jd = jd;
|
|
99
|
+
if (bodies) body.bodies = bodies;
|
|
100
|
+
if (lat !== void 0) body.lat = lat;
|
|
101
|
+
if (lon !== void 0) body.lon = lon;
|
|
102
|
+
if (alt !== void 0) body.alt = alt;
|
|
103
|
+
if (sidereal) body.sidereal = sidereal;
|
|
104
|
+
if (equatorial !== void 0) body.equatorial = equatorial;
|
|
105
|
+
if (speed !== void 0) body.speed = speed;
|
|
106
|
+
if (topocentric !== void 0) body.topocentric = topocentric;
|
|
107
|
+
if (heliocentric !== void 0) body.heliocentric = heliocentric;
|
|
108
|
+
if (no_nutation !== void 0) body.no_nutation = no_nutation;
|
|
109
|
+
if (j2000 !== void 0) body.j2000 = j2000;
|
|
110
|
+
const response = await client.callEndpoint("/v1/positions", body);
|
|
111
|
+
return {
|
|
112
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// src/tools/calculate-houses.ts
|
|
119
|
+
import { z as z2 } from "zod";
|
|
120
|
+
function registerCalculateHouses(server2, client) {
|
|
121
|
+
server2.tool(
|
|
122
|
+
"calculate_houses",
|
|
123
|
+
"Calculates house cusps and angles (Ascendant, MC, etc.) for a given moment and location. Supports 21 house systems and sidereal mode. Use list_available_values with category 'house_systems' to see all options.",
|
|
124
|
+
{
|
|
125
|
+
datetime: z2.string().optional().describe("ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd."),
|
|
126
|
+
jd: z2.number().optional().describe("Julian Day number in UT1. Provide either datetime or jd."),
|
|
127
|
+
lat: z2.number().min(-90).max(90).describe("Observer latitude in decimal degrees (-90 to 90). REQUIRED."),
|
|
128
|
+
lon: z2.number().min(-180).max(180).describe("Observer longitude in decimal degrees (-180 to 180, east positive). REQUIRED."),
|
|
129
|
+
system: z2.string().optional().describe("House system name or single-letter code. Default: 'placidus'. Use list_available_values to see options."),
|
|
130
|
+
sidereal: z2.string().optional().describe("Ayanamsha system name or ID for sidereal house cusps.")
|
|
131
|
+
},
|
|
132
|
+
async ({ datetime, jd, lat, lon, system, sidereal }) => {
|
|
133
|
+
if (!datetime && jd === void 0) {
|
|
134
|
+
return {
|
|
135
|
+
isError: true,
|
|
136
|
+
content: [{ type: "text", text: "Either 'datetime' or 'jd' is required." }]
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
const body = { lat, lon };
|
|
140
|
+
if (datetime) body.datetime = datetime;
|
|
141
|
+
if (jd !== void 0) body.jd = jd;
|
|
142
|
+
if (system) body.system = system;
|
|
143
|
+
if (sidereal) body.sidereal = sidereal;
|
|
144
|
+
const response = await client.callEndpoint("/v1/houses", body);
|
|
145
|
+
return {
|
|
146
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// src/tools/calculate-chart.ts
|
|
153
|
+
import { z as z3 } from "zod";
|
|
154
|
+
function registerCalculateChart(server2, client) {
|
|
155
|
+
server2.tool(
|
|
156
|
+
"calculate_chart",
|
|
157
|
+
"Calculates a complete astrological chart: planetary positions, house cusps, and angles for a given moment and location. Combines calculate_positions and calculate_houses into one call. This is the most commonly used tool for natal charts, transits, and event charts.",
|
|
158
|
+
{
|
|
159
|
+
datetime: z3.string().optional().describe("ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd."),
|
|
160
|
+
jd: z3.number().optional().describe("Julian Day number in UT1. Provide either datetime or jd."),
|
|
161
|
+
lat: z3.number().min(-90).max(90).describe("Observer latitude in decimal degrees (-90 to 90). REQUIRED."),
|
|
162
|
+
lon: z3.number().min(-180).max(180).describe("Observer longitude in decimal degrees (-180 to 180, east positive). REQUIRED."),
|
|
163
|
+
bodies: z3.string().optional().describe("Comma-separated body names, or group name: 'planets' (default), 'asteroids', 'all'."),
|
|
164
|
+
alt: z3.number().optional().describe("Observer altitude in meters above sea level."),
|
|
165
|
+
system: z3.string().optional().describe("House system name or single-letter code. Default: 'placidus'."),
|
|
166
|
+
sidereal: z3.string().optional().describe("Ayanamsha system name or ID for sidereal positions and house cusps."),
|
|
167
|
+
equatorial: z3.boolean().optional().describe("If true, return Right Ascension / Declination instead of ecliptic coordinates."),
|
|
168
|
+
speed: z3.boolean().optional().describe("Include daily motion. Default: true."),
|
|
169
|
+
topocentric: z3.boolean().optional().describe("Apply topocentric correction."),
|
|
170
|
+
heliocentric: z3.boolean().optional().describe("Return heliocentric positions."),
|
|
171
|
+
no_nutation: z3.boolean().optional().describe("Skip nutation correction."),
|
|
172
|
+
j2000: z3.boolean().optional().describe("Use J2000 reference frame.")
|
|
173
|
+
},
|
|
174
|
+
async ({ datetime, jd, lat, lon, bodies, alt, system, sidereal, equatorial, speed, topocentric, heliocentric, no_nutation, j2000 }) => {
|
|
175
|
+
if (!datetime && jd === void 0) {
|
|
176
|
+
return {
|
|
177
|
+
isError: true,
|
|
178
|
+
content: [{ type: "text", text: "Either 'datetime' or 'jd' is required." }]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
const body = { lat, lon };
|
|
182
|
+
if (datetime) body.datetime = datetime;
|
|
183
|
+
if (jd !== void 0) body.jd = jd;
|
|
184
|
+
if (bodies) body.bodies = bodies;
|
|
185
|
+
if (alt !== void 0) body.alt = alt;
|
|
186
|
+
if (system) body.system = system;
|
|
187
|
+
if (sidereal) body.sidereal = sidereal;
|
|
188
|
+
if (equatorial !== void 0) body.equatorial = equatorial;
|
|
189
|
+
if (speed !== void 0) body.speed = speed;
|
|
190
|
+
if (topocentric !== void 0) body.topocentric = topocentric;
|
|
191
|
+
if (heliocentric !== void 0) body.heliocentric = heliocentric;
|
|
192
|
+
if (no_nutation !== void 0) body.no_nutation = no_nutation;
|
|
193
|
+
if (j2000 !== void 0) body.j2000 = j2000;
|
|
194
|
+
const response = await client.callEndpoint("/v1/chart", body);
|
|
195
|
+
return {
|
|
196
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// src/tools/get-fixed-stars.ts
|
|
203
|
+
import { z as z4 } from "zod";
|
|
204
|
+
function registerGetFixedStars(server2, client) {
|
|
205
|
+
server2.tool(
|
|
206
|
+
"get_fixed_stars",
|
|
207
|
+
"Returns position data for one or all fixed stars at a given moment. Includes ecliptic coordinates, magnitude, and spectral type. Use star name (e.g. 'Aldebaran') or Bayer designation (e.g. 'alTau'), or 'all' for the full catalog.",
|
|
208
|
+
{
|
|
209
|
+
datetime: z4.string().optional().describe("ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd."),
|
|
210
|
+
jd: z4.number().optional().describe("Julian Day number in UT1. Provide either datetime or jd."),
|
|
211
|
+
star: z4.string().describe("Star name (e.g. 'Aldebaran', 'Regulus'), Bayer designation (e.g. 'alTau'), or 'all' for every star."),
|
|
212
|
+
lat: z4.number().min(-90).max(90).optional().describe("Observer latitude in decimal degrees (-90 to 90)."),
|
|
213
|
+
lon: z4.number().min(-180).max(180).optional().describe("Observer longitude in decimal degrees (-180 to 180, east positive)."),
|
|
214
|
+
equatorial: z4.boolean().optional().describe("If true, return Right Ascension / Declination instead of ecliptic coordinates.")
|
|
215
|
+
},
|
|
216
|
+
async ({ datetime, jd, star, lat, lon, equatorial }) => {
|
|
217
|
+
if (!datetime && jd === void 0) {
|
|
218
|
+
return {
|
|
219
|
+
isError: true,
|
|
220
|
+
content: [{ type: "text", text: "Either 'datetime' or 'jd' is required." }]
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
const body = { star };
|
|
224
|
+
if (datetime) body.datetime = datetime;
|
|
225
|
+
if (jd !== void 0) body.jd = jd;
|
|
226
|
+
if (lat !== void 0) body.lat = lat;
|
|
227
|
+
if (lon !== void 0) body.lon = lon;
|
|
228
|
+
if (equatorial !== void 0) body.equatorial = equatorial;
|
|
229
|
+
const response = await client.callEndpoint("/v1/stars", body);
|
|
230
|
+
return {
|
|
231
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// src/tools/get-ayanamsha.ts
|
|
238
|
+
import { z as z5 } from "zod";
|
|
239
|
+
function registerGetAyanamsha(server2, client) {
|
|
240
|
+
server2.tool(
|
|
241
|
+
"get_ayanamsha",
|
|
242
|
+
"Returns the ayanamsha value (precession offset) for a given moment and system. Used to convert between tropical and sidereal zodiacs. Use list_available_values with category 'ayanamsha_systems' to see all 47 supported systems.",
|
|
243
|
+
{
|
|
244
|
+
datetime: z5.string().optional().describe("ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd."),
|
|
245
|
+
jd: z5.number().optional().describe("Julian Day number in UT1. Provide either datetime or jd."),
|
|
246
|
+
system: z5.string().optional().describe("Ayanamsha system name or numeric ID. Default: 'lahiri'. Use 'all' to return all 47 systems.")
|
|
247
|
+
},
|
|
248
|
+
async ({ datetime, jd, system }) => {
|
|
249
|
+
if (!datetime && jd === void 0) {
|
|
250
|
+
return {
|
|
251
|
+
isError: true,
|
|
252
|
+
content: [{ type: "text", text: "Either 'datetime' or 'jd' is required." }]
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const body = {};
|
|
256
|
+
if (datetime) body.datetime = datetime;
|
|
257
|
+
if (jd !== void 0) body.jd = jd;
|
|
258
|
+
if (system) body.system = system;
|
|
259
|
+
const response = await client.callEndpoint("/v1/ayanamsha", body);
|
|
260
|
+
return {
|
|
261
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// src/tools/get-delta-t.ts
|
|
268
|
+
import { z as z6 } from "zod";
|
|
269
|
+
function registerGetDeltaT(server2, client) {
|
|
270
|
+
server2.tool(
|
|
271
|
+
"get_delta_t",
|
|
272
|
+
"Returns Delta T (the difference between Terrestrial Time and Universal Time) for a given moment. Useful for converting between time scales in astronomical calculations.",
|
|
273
|
+
{
|
|
274
|
+
datetime: z6.string().optional().describe("ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd."),
|
|
275
|
+
jd: z6.number().optional().describe("Julian Day number in UT1, e.g. 2460310.0. Provide either datetime or jd.")
|
|
276
|
+
},
|
|
277
|
+
async ({ datetime, jd }) => {
|
|
278
|
+
if (!datetime && jd === void 0) {
|
|
279
|
+
return {
|
|
280
|
+
isError: true,
|
|
281
|
+
content: [{ type: "text", text: "Either 'datetime' or 'jd' is required." }]
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
const body = {};
|
|
285
|
+
if (datetime) body.datetime = datetime;
|
|
286
|
+
if (jd !== void 0) body.jd = jd;
|
|
287
|
+
const response = await client.callEndpoint("/v1/delta-t", body);
|
|
288
|
+
return {
|
|
289
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// src/tools/get-sidereal-time.ts
|
|
296
|
+
import { z as z7 } from "zod";
|
|
297
|
+
function registerGetSiderealTime(server2, client) {
|
|
298
|
+
server2.tool(
|
|
299
|
+
"get_sidereal_time",
|
|
300
|
+
"Returns Greenwich Apparent Sidereal Time (GAST) and optionally Local Sidereal Time (LST) for a given moment. LST is included when longitude is provided.",
|
|
301
|
+
{
|
|
302
|
+
datetime: z7.string().optional().describe("ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd."),
|
|
303
|
+
jd: z7.number().optional().describe("Julian Day number in UT1. Provide either datetime or jd."),
|
|
304
|
+
lon: z7.number().min(-180).max(180).optional().describe("Observer longitude in decimal degrees (-180 to 180, east positive). If provided, Local Sidereal Time is included.")
|
|
305
|
+
},
|
|
306
|
+
async ({ datetime, jd, lon }) => {
|
|
307
|
+
if (!datetime && jd === void 0) {
|
|
308
|
+
return {
|
|
309
|
+
isError: true,
|
|
310
|
+
content: [{ type: "text", text: "Either 'datetime' or 'jd' is required." }]
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
const body = {};
|
|
314
|
+
if (datetime) body.datetime = datetime;
|
|
315
|
+
if (jd !== void 0) body.jd = jd;
|
|
316
|
+
if (lon !== void 0) body.lon = lon;
|
|
317
|
+
const response = await client.callEndpoint("/v1/sidereal-time", body);
|
|
318
|
+
return {
|
|
319
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// src/tools/list-available-values.ts
|
|
326
|
+
import { z as z8 } from "zod";
|
|
327
|
+
|
|
328
|
+
// src/data/bodies.ts
|
|
329
|
+
var CELESTIAL_BODIES = [
|
|
330
|
+
{ name: "sun", description: "The Sun" },
|
|
331
|
+
{ name: "moon", description: "The Moon" },
|
|
332
|
+
{ name: "mercury", description: "Mercury" },
|
|
333
|
+
{ name: "venus", description: "Venus" },
|
|
334
|
+
{ name: "mars", description: "Mars" },
|
|
335
|
+
{ name: "jupiter", description: "Jupiter" },
|
|
336
|
+
{ name: "saturn", description: "Saturn" },
|
|
337
|
+
{ name: "uranus", description: "Uranus" },
|
|
338
|
+
{ name: "neptune", description: "Neptune" },
|
|
339
|
+
{ name: "pluto", description: "Pluto" },
|
|
340
|
+
{ name: "mean_node", description: "Mean Lunar Node (North Node / Rahu)", aliases: ["meannode", "north_node"] },
|
|
341
|
+
{ name: "true_node", description: "True Lunar Node (North Node)", aliases: ["truenode"] },
|
|
342
|
+
{ name: "mean_apogee", description: "Mean Lunar Apogee (Black Moon Lilith)", aliases: ["meanapogee", "lilith"] },
|
|
343
|
+
{ name: "osc_apogee", description: "Osculating Lunar Apogee", aliases: ["oscapogee"] },
|
|
344
|
+
{ name: "chiron", description: "Chiron (asteroid 2060)" },
|
|
345
|
+
{ name: "pholus", description: "Pholus (asteroid 5145)" },
|
|
346
|
+
{ name: "ceres", description: "Ceres (dwarf planet)" },
|
|
347
|
+
{ name: "pallas", description: "Pallas (asteroid 2)" },
|
|
348
|
+
{ name: "juno", description: "Juno (asteroid 3)" },
|
|
349
|
+
{ name: "vesta", description: "Vesta (asteroid 4)" }
|
|
350
|
+
];
|
|
351
|
+
var BODY_GROUPS = [
|
|
352
|
+
{ name: "planets", description: "Sun through Pluto + Mean Node (11 bodies, the default)" },
|
|
353
|
+
{ name: "asteroids", description: "Chiron, Pholus, Ceres, Pallas, Juno, Vesta (6 bodies)" },
|
|
354
|
+
{ name: "all", description: "All 20 available bodies" }
|
|
355
|
+
];
|
|
356
|
+
var VALID_BODY_NAMES = /* @__PURE__ */ new Set([
|
|
357
|
+
...CELESTIAL_BODIES.map((b) => b.name),
|
|
358
|
+
...CELESTIAL_BODIES.flatMap((b) => "aliases" in b ? b.aliases : []),
|
|
359
|
+
...BODY_GROUPS.map((g) => g.name)
|
|
360
|
+
]);
|
|
361
|
+
|
|
362
|
+
// src/data/house-systems.ts
|
|
363
|
+
var HOUSE_SYSTEMS = [
|
|
364
|
+
{ name: "placidus", code: "P", description: "Placidus (default, most popular in Western astrology)" },
|
|
365
|
+
{ name: "koch", code: "K", description: "Koch" },
|
|
366
|
+
{ name: "porphyrius", code: "O", description: "Porphyrius" },
|
|
367
|
+
{ name: "regiomontanus", code: "R", description: "Regiomontanus" },
|
|
368
|
+
{ name: "campanus", code: "C", description: "Campanus" },
|
|
369
|
+
{ name: "equal", code: "E", description: "Equal (from Ascendant)" },
|
|
370
|
+
{ name: "whole_sign", code: "W", description: "Whole Sign" },
|
|
371
|
+
{ name: "vehlow_equal", code: "V", description: "Vehlow Equal" },
|
|
372
|
+
{ name: "axial_rotation", code: "X", description: "Axial Rotation / Meridian" },
|
|
373
|
+
{ name: "azimuthal", code: "H", description: "Azimuthal / Horizontal" },
|
|
374
|
+
{ name: "topocentric", code: "T", description: "Polich-Page / Topocentric" },
|
|
375
|
+
{ name: "alcabitius", code: "B", description: "Alcabitius" },
|
|
376
|
+
{ name: "morinus", code: "M", description: "Morinus" },
|
|
377
|
+
{ name: "krusinski", code: "U", description: "Krusinski-Pisa" },
|
|
378
|
+
{ name: "sunshine", code: "I", description: "Sunshine (Makransky)" },
|
|
379
|
+
{ name: "sripati", code: "S", description: "Sripati" },
|
|
380
|
+
{ name: "apc", code: "Y", description: "APC Houses" },
|
|
381
|
+
{ name: "carter_poli_equatorial", code: "F", description: "Carter Poli-Equatorial" },
|
|
382
|
+
{ name: "pullen_sd", code: "L", description: "Pullen (sinusoidal delta)" },
|
|
383
|
+
{ name: "pullen_sr", code: "N", description: "Pullen (sinusoidal ratio)" },
|
|
384
|
+
{ name: "equal_mc", code: "D", description: "Equal (from MC)" }
|
|
385
|
+
];
|
|
386
|
+
var VALID_HOUSE_SYSTEMS = /* @__PURE__ */ new Set([
|
|
387
|
+
...HOUSE_SYSTEMS.map((h) => h.name),
|
|
388
|
+
...HOUSE_SYSTEMS.map((h) => h.code)
|
|
389
|
+
]);
|
|
390
|
+
|
|
391
|
+
// src/data/ayanamsha-systems.ts
|
|
392
|
+
var AYANAMSHA_SYSTEMS = [
|
|
393
|
+
{ name: "fagan_bradley", id: 0, description: "Fagan-Bradley" },
|
|
394
|
+
{ name: "lahiri", id: 1, description: "Lahiri (default, Indian standard)" },
|
|
395
|
+
{ name: "deluce", id: 2, description: "De Luce" },
|
|
396
|
+
{ name: "raman", id: 3, description: "B.V. Raman" },
|
|
397
|
+
{ name: "usha_shashi", id: 4, description: "Usha-Shashi" },
|
|
398
|
+
{ name: "krishnamurti", id: 5, description: "Krishnamurti (KP)" },
|
|
399
|
+
{ name: "djwhal_khul", id: 6, description: "Djwhal Khul" },
|
|
400
|
+
{ name: "yukteshwar", id: 7, description: "Sri Yukteshwar" },
|
|
401
|
+
{ name: "jn_bhasin", id: 8, description: "J.N. Bhasin" },
|
|
402
|
+
{ name: "babyl_kugler1", id: 9, description: "Babylonian (Kugler 1)" },
|
|
403
|
+
{ name: "babyl_kugler2", id: 10, description: "Babylonian (Kugler 2)" },
|
|
404
|
+
{ name: "babyl_kugler3", id: 11, description: "Babylonian (Kugler 3)" },
|
|
405
|
+
{ name: "babyl_huber", id: 12, description: "Babylonian (Huber)" },
|
|
406
|
+
{ name: "babyl_eta_piscium", id: 13, description: "Babylonian (Eta Piscium)" },
|
|
407
|
+
{ name: "babyl_aldebaran_15tau", id: 14, description: "Babylonian (Aldebaran at 15 Taurus)" },
|
|
408
|
+
{ name: "hipparchos", id: 15, description: "Hipparchos" },
|
|
409
|
+
{ name: "sassanian", id: 16, description: "Sassanian" },
|
|
410
|
+
{ name: "galcent_cochrane", id: 17, description: "Galactic Center (Cochrane)" },
|
|
411
|
+
{ name: "galcent_fiorenza", id: 18, description: "Galactic Center (Fiorenza)" },
|
|
412
|
+
{ name: "valens_moon", id: 19, description: "Vettius Valens (Moon)" },
|
|
413
|
+
{ name: "lahiri_icrc", id: 20, description: "Lahiri (ICRC)" },
|
|
414
|
+
{ name: "lahiri_vp", id: 21, description: "Lahiri (VP)" },
|
|
415
|
+
{ name: "krishnamurti_vp", id: 22, description: "Krishnamurti (VP)" },
|
|
416
|
+
{ name: "ss_citra", id: 23, description: "Surya Siddhanta (Citra)" },
|
|
417
|
+
{ name: "ss_revati", id: 24, description: "Surya Siddhanta (Revati)" },
|
|
418
|
+
{ name: "suryasiddhanta", id: 25, description: "Surya Siddhanta" },
|
|
419
|
+
{ name: "suryasiddhanta_meansun", id: 26, description: "Surya Siddhanta (Mean Sun)" },
|
|
420
|
+
{ name: "aryabhata", id: 27, description: "Aryabhata" },
|
|
421
|
+
{ name: "aryabhata_meansun", id: 28, description: "Aryabhata (Mean Sun)" },
|
|
422
|
+
{ name: "ss_semo", id: 29, description: "SS (Semo)" },
|
|
423
|
+
{ name: "ss_citra_pushya", id: 30, description: "SS Citra (Pushya)" },
|
|
424
|
+
{ name: "true_citra", id: 31, description: "True Citra" },
|
|
425
|
+
{ name: "true_revati", id: 32, description: "True Revati" },
|
|
426
|
+
{ name: "true_pushya", id: 33, description: "True Pushya" },
|
|
427
|
+
{ name: "galcent_rgbrand", id: 34, description: "Galactic Center (R.G. Brand)" },
|
|
428
|
+
{ name: "galcent_cochrane_2", id: 35, description: "Galactic Center (Cochrane 2)" },
|
|
429
|
+
{ name: "galequat_iau1958", id: 36, description: "Galactic Equator (IAU 1958)" },
|
|
430
|
+
{ name: "galequat_true", id: 37, description: "Galactic Equator (True)" },
|
|
431
|
+
{ name: "galequat_mula", id: 38, description: "Galactic Equator (Mula)" },
|
|
432
|
+
{ name: "galeqiau_fiorenza", id: 39, description: "Galactic Equator IAU (Fiorenza)" },
|
|
433
|
+
{ name: "vedaweb_mueller", id: 40, description: "Vedaweb (Mueller)" },
|
|
434
|
+
{ name: "cochrane_galcent_mulaw", id: 41, description: "Cochrane (Galactic Center Mula-Wilhelm)" },
|
|
435
|
+
{ name: "galcent_mss", id: 42, description: "Galactic Center (MSS)" },
|
|
436
|
+
{ name: "aryabhata_robinson", id: 43, description: "Aryabhata (Robinson)" },
|
|
437
|
+
{ name: "skydram_mathers", id: 44, description: "Skydram (Mathers)" },
|
|
438
|
+
{ name: "true_mula", id: 45, description: "True Mula" },
|
|
439
|
+
{ name: "true_sheoran", id: 46, description: "True Sheoran" }
|
|
440
|
+
];
|
|
441
|
+
var VALID_AYANAMSHA_NAMES = new Set(AYANAMSHA_SYSTEMS.map((a) => a.name));
|
|
442
|
+
var VALID_AYANAMSHA_IDS = new Set(AYANAMSHA_SYSTEMS.map((a) => a.id));
|
|
443
|
+
|
|
444
|
+
// src/tools/list-available-values.ts
|
|
445
|
+
function registerListAvailableValues(server2) {
|
|
446
|
+
server2.tool(
|
|
447
|
+
"list_available_values",
|
|
448
|
+
"Lists valid values for celestial bodies, house systems, or ayanamsha systems. Use this to discover what values are accepted by other tools.",
|
|
449
|
+
{
|
|
450
|
+
category: z8.enum(["bodies", "house_systems", "ayanamsha_systems"]).describe(
|
|
451
|
+
"Which category to list: 'bodies' (celestial bodies and groups), 'house_systems', or 'ayanamsha_systems'"
|
|
452
|
+
)
|
|
453
|
+
},
|
|
454
|
+
async ({ category }) => {
|
|
455
|
+
let result;
|
|
456
|
+
switch (category) {
|
|
457
|
+
case "bodies":
|
|
458
|
+
result = {
|
|
459
|
+
bodies: CELESTIAL_BODIES.map((b) => ({
|
|
460
|
+
name: b.name,
|
|
461
|
+
description: b.description,
|
|
462
|
+
..."aliases" in b ? { aliases: b.aliases } : {}
|
|
463
|
+
})),
|
|
464
|
+
groups: BODY_GROUPS.map((g) => ({
|
|
465
|
+
name: g.name,
|
|
466
|
+
description: g.description
|
|
467
|
+
}))
|
|
468
|
+
};
|
|
469
|
+
break;
|
|
470
|
+
case "house_systems":
|
|
471
|
+
result = {
|
|
472
|
+
house_systems: HOUSE_SYSTEMS.map((h) => ({
|
|
473
|
+
name: h.name,
|
|
474
|
+
code: h.code,
|
|
475
|
+
description: h.description
|
|
476
|
+
}))
|
|
477
|
+
};
|
|
478
|
+
break;
|
|
479
|
+
case "ayanamsha_systems":
|
|
480
|
+
result = {
|
|
481
|
+
ayanamsha_systems: AYANAMSHA_SYSTEMS.map((a) => ({
|
|
482
|
+
name: a.name,
|
|
483
|
+
id: a.id,
|
|
484
|
+
description: a.description
|
|
485
|
+
}))
|
|
486
|
+
};
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
return {
|
|
490
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// src/tools/index.ts
|
|
497
|
+
function registerAllTools(server2, client) {
|
|
498
|
+
registerCalculatePositions(server2, client);
|
|
499
|
+
registerCalculateHouses(server2, client);
|
|
500
|
+
registerCalculateChart(server2, client);
|
|
501
|
+
registerGetFixedStars(server2, client);
|
|
502
|
+
registerGetAyanamsha(server2, client);
|
|
503
|
+
registerGetDeltaT(server2, client);
|
|
504
|
+
registerGetSiderealTime(server2, client);
|
|
505
|
+
registerListAvailableValues(server2);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// src/server.ts
|
|
509
|
+
function createServer(options) {
|
|
510
|
+
const client = new MorphemerisClient({
|
|
511
|
+
apiKey: options.apiKey,
|
|
512
|
+
baseUrl: options.baseUrl,
|
|
513
|
+
fetchFn: options.fetchFn
|
|
514
|
+
});
|
|
515
|
+
const server2 = new McpServer({
|
|
516
|
+
name: "morphemeris",
|
|
517
|
+
version: "0.1.0"
|
|
518
|
+
});
|
|
519
|
+
registerAllTools(server2, client);
|
|
520
|
+
return server2;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// src/index.ts
|
|
524
|
+
var apiKey = process.env.MORPHEMERIS_API_KEY;
|
|
525
|
+
if (!apiKey) {
|
|
526
|
+
process.stderr.write(
|
|
527
|
+
"Error: MORPHEMERIS_API_KEY environment variable is required.\nGet your API key at https://morphemeris.com/dashboard/keys\n"
|
|
528
|
+
);
|
|
529
|
+
process.exit(1);
|
|
530
|
+
}
|
|
531
|
+
var server = createServer({
|
|
532
|
+
apiKey,
|
|
533
|
+
baseUrl: process.env.MORPHEMERIS_API_URL
|
|
534
|
+
});
|
|
535
|
+
var transport = new StdioServerTransport();
|
|
536
|
+
await server.connect(transport);
|
|
537
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/server.ts","../src/client.ts","../src/tools/calculate-positions.ts","../src/tools/calculate-houses.ts","../src/tools/calculate-chart.ts","../src/tools/get-fixed-stars.ts","../src/tools/get-ayanamsha.ts","../src/tools/get-delta-t.ts","../src/tools/get-sidereal-time.ts","../src/tools/list-available-values.ts","../src/data/bodies.ts","../src/data/house-systems.ts","../src/data/ayanamsha-systems.ts","../src/tools/index.ts"],"sourcesContent":["import { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { createServer } from \"./server.js\";\n\nconst apiKey = process.env.MORPHEMERIS_API_KEY;\nif (!apiKey) {\n process.stderr.write(\n \"Error: MORPHEMERIS_API_KEY environment variable is required.\\n\" +\n \"Get your API key at https://morphemeris.com/dashboard/keys\\n\",\n );\n process.exit(1);\n}\n\nconst server = createServer({\n apiKey,\n baseUrl: process.env.MORPHEMERIS_API_URL,\n});\n\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n","import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { MorphemerisClient } from \"./client.js\";\nimport { registerAllTools } from \"./tools/index.js\";\n\nexport interface CreateServerOptions {\n apiKey: string;\n baseUrl?: string;\n fetchFn?: typeof fetch;\n}\n\nexport function createServer(options: CreateServerOptions): McpServer {\n const client = new MorphemerisClient({\n apiKey: options.apiKey,\n baseUrl: options.baseUrl,\n fetchFn: options.fetchFn,\n });\n\n const server = new McpServer({\n name: \"morphemeris\",\n version: \"0.1.0\",\n });\n\n registerAllTools(server, client);\n\n return server;\n}\n","export interface MorphemerisClientOptions {\n apiKey: string;\n baseUrl?: string;\n fetchFn?: typeof fetch;\n}\n\nexport interface ApiError {\n code: string;\n message: string;\n suggestion?: string;\n docs_url?: string;\n}\n\nexport interface ApiResponse<T = unknown> {\n data: T;\n meta: {\n version: string;\n request_id: string;\n timestamp: string;\n credits_used: number;\n credits_remaining: number;\n computation_ms: number;\n };\n warnings?: string[];\n}\n\nexport interface ApiErrorResponse {\n errors: ApiError[];\n}\n\nexport class MorphemerisApiError extends Error {\n constructor(\n public readonly statusCode: number,\n public readonly errors: ApiError[],\n ) {\n const primary = errors[0];\n const parts = [primary?.message ?? \"API request failed\"];\n if (primary?.suggestion) parts.push(`Suggestion: ${primary.suggestion}`);\n if (primary?.docs_url) parts.push(`Docs: ${primary.docs_url}`);\n super(parts.join(\". \"));\n this.name = \"MorphemerisApiError\";\n }\n}\n\nexport class MorphemerisClient {\n private readonly apiKey: string;\n private readonly baseUrl: string;\n private readonly fetchFn: typeof fetch;\n\n constructor(options: MorphemerisClientOptions) {\n this.apiKey = options.apiKey;\n this.baseUrl = (options.baseUrl ?? \"https://api.morphemeris.com\").replace(\n /\\/$/,\n \"\",\n );\n this.fetchFn = options.fetchFn ?? globalThis.fetch;\n }\n\n async callEndpoint<T = unknown>(\n path: string,\n body: Record<string, unknown>,\n ): Promise<ApiResponse<T>> {\n let response: Response;\n try {\n response = await this.fetchFn(`${this.baseUrl}${path}`, {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${this.apiKey}`,\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n body: JSON.stringify(body),\n });\n } catch (err) {\n throw new Error(\n `Morphemeris API unreachable at ${this.baseUrl}. Check your network connection and try again.`,\n );\n }\n\n const json = await response.json();\n\n if (!response.ok) {\n const errorBody = json as ApiErrorResponse;\n throw new MorphemerisApiError(\n response.status,\n errorBody.errors ?? [\n {\n code: \"unknown_error\",\n message: `HTTP ${response.status}: ${response.statusText}`,\n },\n ],\n );\n }\n\n return json as ApiResponse<T>;\n }\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { MorphemerisClient } from \"../client.js\";\n\nexport function registerCalculatePositions(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n server.tool(\n \"calculate_positions\",\n \"Calculates ecliptic positions (longitude, latitude, distance, daily motion) for celestial bodies at a given moment. Supports tropical and sidereal zodiacs, heliocentric and topocentric corrections, and equatorial coordinates.\",\n {\n datetime: z\n .string()\n .optional()\n .describe(\"ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd.\"),\n jd: z\n .number()\n .optional()\n .describe(\"Julian Day number in UT1. Provide either datetime or jd.\"),\n bodies: z\n .string()\n .optional()\n .describe(\"Comma-separated body names, or group name: 'planets' (default), 'asteroids', 'all'. Use list_available_values to see all options.\"),\n lat: z\n .number()\n .min(-90)\n .max(90)\n .optional()\n .describe(\"Observer latitude in decimal degrees (-90 to 90). Required for topocentric correction.\"),\n lon: z\n .number()\n .min(-180)\n .max(180)\n .optional()\n .describe(\"Observer longitude in decimal degrees (-180 to 180, east positive). Required for topocentric correction.\"),\n alt: z\n .number()\n .optional()\n .describe(\"Observer altitude in meters above sea level.\"),\n sidereal: z\n .string()\n .optional()\n .describe(\"Ayanamsha system name or ID for sidereal positions. Use list_available_values to see options.\"),\n equatorial: z\n .boolean()\n .optional()\n .describe(\"If true, return Right Ascension / Declination instead of ecliptic longitude/latitude.\"),\n speed: z\n .boolean()\n .optional()\n .describe(\"Include daily motion in the response. Default: true.\"),\n topocentric: z\n .boolean()\n .optional()\n .describe(\"Apply topocentric correction (requires lat and lon).\"),\n heliocentric: z\n .boolean()\n .optional()\n .describe(\"Return heliocentric positions instead of geocentric.\"),\n no_nutation: z\n .boolean()\n .optional()\n .describe(\"Skip nutation correction.\"),\n j2000: z\n .boolean()\n .optional()\n .describe(\"Use J2000 reference frame instead of ecliptic of date.\"),\n },\n async ({ datetime, jd, bodies, lat, lon, alt, sidereal, equatorial, speed, topocentric, heliocentric, no_nutation, j2000 }) => {\n if (!datetime && jd === undefined) {\n return {\n isError: true,\n content: [{ type: \"text\", text: \"Either 'datetime' or 'jd' is required.\" }],\n };\n }\n\n const body: Record<string, unknown> = {};\n if (datetime) body.datetime = datetime;\n if (jd !== undefined) body.jd = jd;\n if (bodies) body.bodies = bodies;\n if (lat !== undefined) body.lat = lat;\n if (lon !== undefined) body.lon = lon;\n if (alt !== undefined) body.alt = alt;\n if (sidereal) body.sidereal = sidereal;\n if (equatorial !== undefined) body.equatorial = equatorial;\n if (speed !== undefined) body.speed = speed;\n if (topocentric !== undefined) body.topocentric = topocentric;\n if (heliocentric !== undefined) body.heliocentric = heliocentric;\n if (no_nutation !== undefined) body.no_nutation = no_nutation;\n if (j2000 !== undefined) body.j2000 = j2000;\n\n const response = await client.callEndpoint(\"/v1/positions\", body);\n return {\n content: [{ type: \"text\", text: JSON.stringify(response, null, 2) }],\n };\n },\n );\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { MorphemerisClient } from \"../client.js\";\n\nexport function registerCalculateHouses(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n server.tool(\n \"calculate_houses\",\n \"Calculates house cusps and angles (Ascendant, MC, etc.) for a given moment and location. Supports 21 house systems and sidereal mode. Use list_available_values with category 'house_systems' to see all options.\",\n {\n datetime: z\n .string()\n .optional()\n .describe(\"ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd.\"),\n jd: z\n .number()\n .optional()\n .describe(\"Julian Day number in UT1. Provide either datetime or jd.\"),\n lat: z\n .number()\n .min(-90)\n .max(90)\n .describe(\"Observer latitude in decimal degrees (-90 to 90). REQUIRED.\"),\n lon: z\n .number()\n .min(-180)\n .max(180)\n .describe(\"Observer longitude in decimal degrees (-180 to 180, east positive). REQUIRED.\"),\n system: z\n .string()\n .optional()\n .describe(\"House system name or single-letter code. Default: 'placidus'. Use list_available_values to see options.\"),\n sidereal: z\n .string()\n .optional()\n .describe(\"Ayanamsha system name or ID for sidereal house cusps.\"),\n },\n async ({ datetime, jd, lat, lon, system, sidereal }) => {\n if (!datetime && jd === undefined) {\n return {\n isError: true,\n content: [{ type: \"text\", text: \"Either 'datetime' or 'jd' is required.\" }],\n };\n }\n\n const body: Record<string, unknown> = { lat, lon };\n if (datetime) body.datetime = datetime;\n if (jd !== undefined) body.jd = jd;\n if (system) body.system = system;\n if (sidereal) body.sidereal = sidereal;\n\n const response = await client.callEndpoint(\"/v1/houses\", body);\n return {\n content: [{ type: \"text\", text: JSON.stringify(response, null, 2) }],\n };\n },\n );\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { MorphemerisClient } from \"../client.js\";\n\nexport function registerCalculateChart(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n server.tool(\n \"calculate_chart\",\n \"Calculates a complete astrological chart: planetary positions, house cusps, and angles for a given moment and location. Combines calculate_positions and calculate_houses into one call. This is the most commonly used tool for natal charts, transits, and event charts.\",\n {\n datetime: z\n .string()\n .optional()\n .describe(\"ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd.\"),\n jd: z\n .number()\n .optional()\n .describe(\"Julian Day number in UT1. Provide either datetime or jd.\"),\n lat: z\n .number()\n .min(-90)\n .max(90)\n .describe(\"Observer latitude in decimal degrees (-90 to 90). REQUIRED.\"),\n lon: z\n .number()\n .min(-180)\n .max(180)\n .describe(\"Observer longitude in decimal degrees (-180 to 180, east positive). REQUIRED.\"),\n bodies: z\n .string()\n .optional()\n .describe(\"Comma-separated body names, or group name: 'planets' (default), 'asteroids', 'all'.\"),\n alt: z\n .number()\n .optional()\n .describe(\"Observer altitude in meters above sea level.\"),\n system: z\n .string()\n .optional()\n .describe(\"House system name or single-letter code. Default: 'placidus'.\"),\n sidereal: z\n .string()\n .optional()\n .describe(\"Ayanamsha system name or ID for sidereal positions and house cusps.\"),\n equatorial: z\n .boolean()\n .optional()\n .describe(\"If true, return Right Ascension / Declination instead of ecliptic coordinates.\"),\n speed: z\n .boolean()\n .optional()\n .describe(\"Include daily motion. Default: true.\"),\n topocentric: z\n .boolean()\n .optional()\n .describe(\"Apply topocentric correction.\"),\n heliocentric: z\n .boolean()\n .optional()\n .describe(\"Return heliocentric positions.\"),\n no_nutation: z\n .boolean()\n .optional()\n .describe(\"Skip nutation correction.\"),\n j2000: z\n .boolean()\n .optional()\n .describe(\"Use J2000 reference frame.\"),\n },\n async ({ datetime, jd, lat, lon, bodies, alt, system, sidereal, equatorial, speed, topocentric, heliocentric, no_nutation, j2000 }) => {\n if (!datetime && jd === undefined) {\n return {\n isError: true,\n content: [{ type: \"text\", text: \"Either 'datetime' or 'jd' is required.\" }],\n };\n }\n\n const body: Record<string, unknown> = { lat, lon };\n if (datetime) body.datetime = datetime;\n if (jd !== undefined) body.jd = jd;\n if (bodies) body.bodies = bodies;\n if (alt !== undefined) body.alt = alt;\n if (system) body.system = system;\n if (sidereal) body.sidereal = sidereal;\n if (equatorial !== undefined) body.equatorial = equatorial;\n if (speed !== undefined) body.speed = speed;\n if (topocentric !== undefined) body.topocentric = topocentric;\n if (heliocentric !== undefined) body.heliocentric = heliocentric;\n if (no_nutation !== undefined) body.no_nutation = no_nutation;\n if (j2000 !== undefined) body.j2000 = j2000;\n\n const response = await client.callEndpoint(\"/v1/chart\", body);\n return {\n content: [{ type: \"text\", text: JSON.stringify(response, null, 2) }],\n };\n },\n );\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { MorphemerisClient } from \"../client.js\";\n\nexport function registerGetFixedStars(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n server.tool(\n \"get_fixed_stars\",\n \"Returns position data for one or all fixed stars at a given moment. Includes ecliptic coordinates, magnitude, and spectral type. Use star name (e.g. 'Aldebaran') or Bayer designation (e.g. 'alTau'), or 'all' for the full catalog.\",\n {\n datetime: z\n .string()\n .optional()\n .describe(\"ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd.\"),\n jd: z\n .number()\n .optional()\n .describe(\"Julian Day number in UT1. Provide either datetime or jd.\"),\n star: z\n .string()\n .describe(\"Star name (e.g. 'Aldebaran', 'Regulus'), Bayer designation (e.g. 'alTau'), or 'all' for every star.\"),\n lat: z\n .number()\n .min(-90)\n .max(90)\n .optional()\n .describe(\"Observer latitude in decimal degrees (-90 to 90).\"),\n lon: z\n .number()\n .min(-180)\n .max(180)\n .optional()\n .describe(\"Observer longitude in decimal degrees (-180 to 180, east positive).\"),\n equatorial: z\n .boolean()\n .optional()\n .describe(\"If true, return Right Ascension / Declination instead of ecliptic coordinates.\"),\n },\n async ({ datetime, jd, star, lat, lon, equatorial }) => {\n if (!datetime && jd === undefined) {\n return {\n isError: true,\n content: [{ type: \"text\", text: \"Either 'datetime' or 'jd' is required.\" }],\n };\n }\n\n const body: Record<string, unknown> = { star };\n if (datetime) body.datetime = datetime;\n if (jd !== undefined) body.jd = jd;\n if (lat !== undefined) body.lat = lat;\n if (lon !== undefined) body.lon = lon;\n if (equatorial !== undefined) body.equatorial = equatorial;\n\n const response = await client.callEndpoint(\"/v1/stars\", body);\n return {\n content: [{ type: \"text\", text: JSON.stringify(response, null, 2) }],\n };\n },\n );\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { MorphemerisClient } from \"../client.js\";\n\nexport function registerGetAyanamsha(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n server.tool(\n \"get_ayanamsha\",\n \"Returns the ayanamsha value (precession offset) for a given moment and system. Used to convert between tropical and sidereal zodiacs. Use list_available_values with category 'ayanamsha_systems' to see all 47 supported systems.\",\n {\n datetime: z\n .string()\n .optional()\n .describe(\"ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd.\"),\n jd: z\n .number()\n .optional()\n .describe(\"Julian Day number in UT1. Provide either datetime or jd.\"),\n system: z\n .string()\n .optional()\n .describe(\"Ayanamsha system name or numeric ID. Default: 'lahiri'. Use 'all' to return all 47 systems.\"),\n },\n async ({ datetime, jd, system }) => {\n if (!datetime && jd === undefined) {\n return {\n isError: true,\n content: [{ type: \"text\", text: \"Either 'datetime' or 'jd' is required.\" }],\n };\n }\n\n const body: Record<string, unknown> = {};\n if (datetime) body.datetime = datetime;\n if (jd !== undefined) body.jd = jd;\n if (system) body.system = system;\n\n const response = await client.callEndpoint(\"/v1/ayanamsha\", body);\n return {\n content: [{ type: \"text\", text: JSON.stringify(response, null, 2) }],\n };\n },\n );\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { MorphemerisClient } from \"../client.js\";\n\nexport function registerGetDeltaT(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n server.tool(\n \"get_delta_t\",\n \"Returns Delta T (the difference between Terrestrial Time and Universal Time) for a given moment. Useful for converting between time scales in astronomical calculations.\",\n {\n datetime: z\n .string()\n .optional()\n .describe(\"ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd.\"),\n jd: z\n .number()\n .optional()\n .describe(\"Julian Day number in UT1, e.g. 2460310.0. Provide either datetime or jd.\"),\n },\n async ({ datetime, jd }) => {\n if (!datetime && jd === undefined) {\n return {\n isError: true,\n content: [{ type: \"text\", text: \"Either 'datetime' or 'jd' is required.\" }],\n };\n }\n\n const body: Record<string, unknown> = {};\n if (datetime) body.datetime = datetime;\n if (jd !== undefined) body.jd = jd;\n\n const response = await client.callEndpoint(\"/v1/delta-t\", body);\n return {\n content: [{ type: \"text\", text: JSON.stringify(response, null, 2) }],\n };\n },\n );\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport type { MorphemerisClient } from \"../client.js\";\n\nexport function registerGetSiderealTime(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n server.tool(\n \"get_sidereal_time\",\n \"Returns Greenwich Apparent Sidereal Time (GAST) and optionally Local Sidereal Time (LST) for a given moment. LST is included when longitude is provided.\",\n {\n datetime: z\n .string()\n .optional()\n .describe(\"ISO 8601 UTC datetime, e.g. '2024-01-01T12:00:00Z'. Provide either datetime or jd.\"),\n jd: z\n .number()\n .optional()\n .describe(\"Julian Day number in UT1. Provide either datetime or jd.\"),\n lon: z\n .number()\n .min(-180)\n .max(180)\n .optional()\n .describe(\"Observer longitude in decimal degrees (-180 to 180, east positive). If provided, Local Sidereal Time is included.\"),\n },\n async ({ datetime, jd, lon }) => {\n if (!datetime && jd === undefined) {\n return {\n isError: true,\n content: [{ type: \"text\", text: \"Either 'datetime' or 'jd' is required.\" }],\n };\n }\n\n const body: Record<string, unknown> = {};\n if (datetime) body.datetime = datetime;\n if (jd !== undefined) body.jd = jd;\n if (lon !== undefined) body.lon = lon;\n\n const response = await client.callEndpoint(\"/v1/sidereal-time\", body);\n return {\n content: [{ type: \"text\", text: JSON.stringify(response, null, 2) }],\n };\n },\n );\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport { CELESTIAL_BODIES, BODY_GROUPS } from \"../data/bodies.js\";\nimport { HOUSE_SYSTEMS } from \"../data/house-systems.js\";\nimport { AYANAMSHA_SYSTEMS } from \"../data/ayanamsha-systems.js\";\n\nexport function registerListAvailableValues(server: McpServer): void {\n server.tool(\n \"list_available_values\",\n \"Lists valid values for celestial bodies, house systems, or ayanamsha systems. Use this to discover what values are accepted by other tools.\",\n {\n category: z\n .enum([\"bodies\", \"house_systems\", \"ayanamsha_systems\"])\n .describe(\n \"Which category to list: 'bodies' (celestial bodies and groups), 'house_systems', or 'ayanamsha_systems'\",\n ),\n },\n async ({ category }) => {\n let result: unknown;\n\n switch (category) {\n case \"bodies\":\n result = {\n bodies: CELESTIAL_BODIES.map((b) => ({\n name: b.name,\n description: b.description,\n ...(\"aliases\" in b ? { aliases: b.aliases } : {}),\n })),\n groups: BODY_GROUPS.map((g) => ({\n name: g.name,\n description: g.description,\n })),\n };\n break;\n case \"house_systems\":\n result = {\n house_systems: HOUSE_SYSTEMS.map((h) => ({\n name: h.name,\n code: h.code,\n description: h.description,\n })),\n };\n break;\n case \"ayanamsha_systems\":\n result = {\n ayanamsha_systems: AYANAMSHA_SYSTEMS.map((a) => ({\n name: a.name,\n id: a.id,\n description: a.description,\n })),\n };\n break;\n }\n\n return {\n content: [{ type: \"text\", text: JSON.stringify(result, null, 2) }],\n };\n },\n );\n}\n","export const CELESTIAL_BODIES = [\n { name: \"sun\", description: \"The Sun\" },\n { name: \"moon\", description: \"The Moon\" },\n { name: \"mercury\", description: \"Mercury\" },\n { name: \"venus\", description: \"Venus\" },\n { name: \"mars\", description: \"Mars\" },\n { name: \"jupiter\", description: \"Jupiter\" },\n { name: \"saturn\", description: \"Saturn\" },\n { name: \"uranus\", description: \"Uranus\" },\n { name: \"neptune\", description: \"Neptune\" },\n { name: \"pluto\", description: \"Pluto\" },\n { name: \"mean_node\", description: \"Mean Lunar Node (North Node / Rahu)\", aliases: [\"meannode\", \"north_node\"] },\n { name: \"true_node\", description: \"True Lunar Node (North Node)\", aliases: [\"truenode\"] },\n { name: \"mean_apogee\", description: \"Mean Lunar Apogee (Black Moon Lilith)\", aliases: [\"meanapogee\", \"lilith\"] },\n { name: \"osc_apogee\", description: \"Osculating Lunar Apogee\", aliases: [\"oscapogee\"] },\n { name: \"chiron\", description: \"Chiron (asteroid 2060)\" },\n { name: \"pholus\", description: \"Pholus (asteroid 5145)\" },\n { name: \"ceres\", description: \"Ceres (dwarf planet)\" },\n { name: \"pallas\", description: \"Pallas (asteroid 2)\" },\n { name: \"juno\", description: \"Juno (asteroid 3)\" },\n { name: \"vesta\", description: \"Vesta (asteroid 4)\" },\n] as const;\n\nexport const BODY_GROUPS = [\n { name: \"planets\", description: \"Sun through Pluto + Mean Node (11 bodies, the default)\" },\n { name: \"asteroids\", description: \"Chiron, Pholus, Ceres, Pallas, Juno, Vesta (6 bodies)\" },\n { name: \"all\", description: \"All 20 available bodies\" },\n] as const;\n\nexport const VALID_BODY_NAMES = new Set([\n ...CELESTIAL_BODIES.map((b) => b.name),\n ...CELESTIAL_BODIES.flatMap((b) => (\"aliases\" in b ? b.aliases : [])),\n ...BODY_GROUPS.map((g) => g.name),\n]);\n","export const HOUSE_SYSTEMS = [\n { name: \"placidus\", code: \"P\", description: \"Placidus (default, most popular in Western astrology)\" },\n { name: \"koch\", code: \"K\", description: \"Koch\" },\n { name: \"porphyrius\", code: \"O\", description: \"Porphyrius\" },\n { name: \"regiomontanus\", code: \"R\", description: \"Regiomontanus\" },\n { name: \"campanus\", code: \"C\", description: \"Campanus\" },\n { name: \"equal\", code: \"E\", description: \"Equal (from Ascendant)\" },\n { name: \"whole_sign\", code: \"W\", description: \"Whole Sign\" },\n { name: \"vehlow_equal\", code: \"V\", description: \"Vehlow Equal\" },\n { name: \"axial_rotation\", code: \"X\", description: \"Axial Rotation / Meridian\" },\n { name: \"azimuthal\", code: \"H\", description: \"Azimuthal / Horizontal\" },\n { name: \"topocentric\", code: \"T\", description: \"Polich-Page / Topocentric\" },\n { name: \"alcabitius\", code: \"B\", description: \"Alcabitius\" },\n { name: \"morinus\", code: \"M\", description: \"Morinus\" },\n { name: \"krusinski\", code: \"U\", description: \"Krusinski-Pisa\" },\n { name: \"sunshine\", code: \"I\", description: \"Sunshine (Makransky)\" },\n { name: \"sripati\", code: \"S\", description: \"Sripati\" },\n { name: \"apc\", code: \"Y\", description: \"APC Houses\" },\n { name: \"carter_poli_equatorial\", code: \"F\", description: \"Carter Poli-Equatorial\" },\n { name: \"pullen_sd\", code: \"L\", description: \"Pullen (sinusoidal delta)\" },\n { name: \"pullen_sr\", code: \"N\", description: \"Pullen (sinusoidal ratio)\" },\n { name: \"equal_mc\", code: \"D\", description: \"Equal (from MC)\" },\n] as const;\n\nexport const VALID_HOUSE_SYSTEMS = new Set([\n ...HOUSE_SYSTEMS.map((h) => h.name),\n ...HOUSE_SYSTEMS.map((h) => h.code),\n]);\n","export const AYANAMSHA_SYSTEMS = [\n { name: \"fagan_bradley\", id: 0, description: \"Fagan-Bradley\" },\n { name: \"lahiri\", id: 1, description: \"Lahiri (default, Indian standard)\" },\n { name: \"deluce\", id: 2, description: \"De Luce\" },\n { name: \"raman\", id: 3, description: \"B.V. Raman\" },\n { name: \"usha_shashi\", id: 4, description: \"Usha-Shashi\" },\n { name: \"krishnamurti\", id: 5, description: \"Krishnamurti (KP)\" },\n { name: \"djwhal_khul\", id: 6, description: \"Djwhal Khul\" },\n { name: \"yukteshwar\", id: 7, description: \"Sri Yukteshwar\" },\n { name: \"jn_bhasin\", id: 8, description: \"J.N. Bhasin\" },\n { name: \"babyl_kugler1\", id: 9, description: \"Babylonian (Kugler 1)\" },\n { name: \"babyl_kugler2\", id: 10, description: \"Babylonian (Kugler 2)\" },\n { name: \"babyl_kugler3\", id: 11, description: \"Babylonian (Kugler 3)\" },\n { name: \"babyl_huber\", id: 12, description: \"Babylonian (Huber)\" },\n { name: \"babyl_eta_piscium\", id: 13, description: \"Babylonian (Eta Piscium)\" },\n { name: \"babyl_aldebaran_15tau\", id: 14, description: \"Babylonian (Aldebaran at 15 Taurus)\" },\n { name: \"hipparchos\", id: 15, description: \"Hipparchos\" },\n { name: \"sassanian\", id: 16, description: \"Sassanian\" },\n { name: \"galcent_cochrane\", id: 17, description: \"Galactic Center (Cochrane)\" },\n { name: \"galcent_fiorenza\", id: 18, description: \"Galactic Center (Fiorenza)\" },\n { name: \"valens_moon\", id: 19, description: \"Vettius Valens (Moon)\" },\n { name: \"lahiri_icrc\", id: 20, description: \"Lahiri (ICRC)\" },\n { name: \"lahiri_vp\", id: 21, description: \"Lahiri (VP)\" },\n { name: \"krishnamurti_vp\", id: 22, description: \"Krishnamurti (VP)\" },\n { name: \"ss_citra\", id: 23, description: \"Surya Siddhanta (Citra)\" },\n { name: \"ss_revati\", id: 24, description: \"Surya Siddhanta (Revati)\" },\n { name: \"suryasiddhanta\", id: 25, description: \"Surya Siddhanta\" },\n { name: \"suryasiddhanta_meansun\", id: 26, description: \"Surya Siddhanta (Mean Sun)\" },\n { name: \"aryabhata\", id: 27, description: \"Aryabhata\" },\n { name: \"aryabhata_meansun\", id: 28, description: \"Aryabhata (Mean Sun)\" },\n { name: \"ss_semo\", id: 29, description: \"SS (Semo)\" },\n { name: \"ss_citra_pushya\", id: 30, description: \"SS Citra (Pushya)\" },\n { name: \"true_citra\", id: 31, description: \"True Citra\" },\n { name: \"true_revati\", id: 32, description: \"True Revati\" },\n { name: \"true_pushya\", id: 33, description: \"True Pushya\" },\n { name: \"galcent_rgbrand\", id: 34, description: \"Galactic Center (R.G. Brand)\" },\n { name: \"galcent_cochrane_2\", id: 35, description: \"Galactic Center (Cochrane 2)\" },\n { name: \"galequat_iau1958\", id: 36, description: \"Galactic Equator (IAU 1958)\" },\n { name: \"galequat_true\", id: 37, description: \"Galactic Equator (True)\" },\n { name: \"galequat_mula\", id: 38, description: \"Galactic Equator (Mula)\" },\n { name: \"galeqiau_fiorenza\", id: 39, description: \"Galactic Equator IAU (Fiorenza)\" },\n { name: \"vedaweb_mueller\", id: 40, description: \"Vedaweb (Mueller)\" },\n { name: \"cochrane_galcent_mulaw\", id: 41, description: \"Cochrane (Galactic Center Mula-Wilhelm)\" },\n { name: \"galcent_mss\", id: 42, description: \"Galactic Center (MSS)\" },\n { name: \"aryabhata_robinson\", id: 43, description: \"Aryabhata (Robinson)\" },\n { name: \"skydram_mathers\", id: 44, description: \"Skydram (Mathers)\" },\n { name: \"true_mula\", id: 45, description: \"True Mula\" },\n { name: \"true_sheoran\", id: 46, description: \"True Sheoran\" },\n] as const;\n\nexport const VALID_AYANAMSHA_NAMES = new Set(AYANAMSHA_SYSTEMS.map((a) => a.name));\nexport const VALID_AYANAMSHA_IDS = new Set(AYANAMSHA_SYSTEMS.map((a) => a.id));\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { MorphemerisClient } from \"../client.js\";\nimport { registerCalculatePositions } from \"./calculate-positions.js\";\nimport { registerCalculateHouses } from \"./calculate-houses.js\";\nimport { registerCalculateChart } from \"./calculate-chart.js\";\nimport { registerGetFixedStars } from \"./get-fixed-stars.js\";\nimport { registerGetAyanamsha } from \"./get-ayanamsha.js\";\nimport { registerGetDeltaT } from \"./get-delta-t.js\";\nimport { registerGetSiderealTime } from \"./get-sidereal-time.js\";\nimport { registerListAvailableValues } from \"./list-available-values.js\";\n\nexport function registerAllTools(\n server: McpServer,\n client: MorphemerisClient,\n): void {\n registerCalculatePositions(server, client);\n registerCalculateHouses(server, client);\n registerCalculateChart(server, client);\n registerGetFixedStars(server, client);\n registerGetAyanamsha(server, client);\n registerGetDeltaT(server, client);\n registerGetSiderealTime(server, client);\n registerListAvailableValues(server);\n}\n"],"mappings":";;;AAAA,SAAS,4BAA4B;;;ACArC,SAAS,iBAAiB;;;AC8BnB,IAAM,sBAAN,cAAkC,MAAM;AAAA,EAC7C,YACkB,YACA,QAChB;AACA,UAAM,UAAU,OAAO,CAAC;AACxB,UAAM,QAAQ,CAAC,SAAS,WAAW,oBAAoB;AACvD,QAAI,SAAS,WAAY,OAAM,KAAK,eAAe,QAAQ,UAAU,EAAE;AACvE,QAAI,SAAS,SAAU,OAAM,KAAK,SAAS,QAAQ,QAAQ,EAAE;AAC7D,UAAM,MAAM,KAAK,IAAI,CAAC;AAPN;AACA;AAOhB,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,oBAAN,MAAwB;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EAEjB,YAAY,SAAmC;AAC7C,SAAK,SAAS,QAAQ;AACtB,SAAK,WAAW,QAAQ,WAAW,+BAA+B;AAAA,MAChE;AAAA,MACA;AAAA,IACF;AACA,SAAK,UAAU,QAAQ,WAAW,WAAW;AAAA,EAC/C;AAAA,EAEA,MAAM,aACJ,MACA,MACyB;AACzB,QAAI;AACJ,QAAI;AACF,iBAAW,MAAM,KAAK,QAAQ,GAAG,KAAK,OA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wBAAsBA,SAAQ,MAAM;AACpC,uBAAqBA,SAAQ,MAAM;AACnC,oBAAkBA,SAAQ,MAAM;AAChC,0BAAwBA,SAAQ,MAAM;AACtC,8BAA4BA,OAAM;AACpC;;;AbbO,SAAS,aAAa,SAAyC;AACpE,QAAM,SAAS,IAAI,kBAAkB;AAAA,IACnC,QAAQ,QAAQ;AAAA,IAChB,SAAS,QAAQ;AAAA,IACjB,SAAS,QAAQ;AAAA,EACnB,CAAC;AAED,QAAMC,UAAS,IAAI,UAAU;AAAA,IAC3B,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC;AAED,mBAAiBA,SAAQ,MAAM;AAE/B,SAAOA;AACT;;;ADtBA,IAAM,SAAS,QAAQ,IAAI;AAC3B,IAAI,CAAC,QAAQ;AACX,UAAQ,OAAO;AAAA,IACb;AAAA,EAEF;AACA,UAAQ,KAAK,CAAC;AAChB;AAEA,IAAM,SAAS,aAAa;AAAA,EAC1B;AAAA,EACA,SAAS,QAAQ,IAAI;AACvB,CAAC;AAED,IAAM,YAAY,IAAI,qBAAqB;AAC3C,MAAM,OAAO,QAAQ,SAAS;","names":["server","z","server","z","server","z","server","z","server","z","server","z","server","z","server","z","server","server"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@morphemeris/mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for the Morphemeris astronomical ephemeris API",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"morphemeris-mcp": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
16
|
+
"zod": "^3.25.23"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^22.15.17",
|
|
20
|
+
"tsup": "^8.5.0",
|
|
21
|
+
"typescript": "^5.8.3",
|
|
22
|
+
"vitest": "^3.2.1"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsup",
|
|
29
|
+
"dev": "tsup --watch",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"test:watch": "vitest",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"lint": "tsc --noEmit"
|
|
34
|
+
}
|
|
35
|
+
}
|