@openephemeris/mcp-server 3.24.0 → 4.0.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/LICENSE +21 -21
  3. package/README.md +40 -2
  4. package/dist/analytics.js +37 -5
  5. package/dist/backend/client.d.ts +7 -0
  6. package/dist/backend/client.js +39 -38
  7. package/dist/index.js +64 -2
  8. package/dist/oauth/session-utils.d.ts +42 -18
  9. package/dist/oauth/session-utils.js +79 -0
  10. package/dist/server-sse.js +114 -14
  11. package/dist/tools/apps/bazi-app.js +12 -26
  12. package/dist/tools/apps/bi-wheel-app.js +2 -2
  13. package/dist/tools/apps/bodygraph-app.d.ts +5 -5
  14. package/dist/tools/apps/bodygraph-app.js +157 -210
  15. package/dist/tools/apps/chart-wheel-app.js +5 -3
  16. package/dist/tools/apps/location-tools.js +167 -18
  17. package/dist/tools/apps/moon-phase-app.js +10 -3
  18. package/dist/tools/apps/transit-timeline-app.js +6 -4
  19. package/dist/tools/apps/vedic-chart-app.js +15 -49
  20. package/dist/tools/datetime.d.ts +65 -0
  21. package/dist/tools/datetime.js +153 -0
  22. package/dist/tools/index.d.ts +45 -2
  23. package/dist/tools/index.js +78 -2
  24. package/dist/tools/specialized/account.d.ts +1 -0
  25. package/dist/tools/specialized/account.js +100 -0
  26. package/dist/tools/specialized/acg.js +16 -14
  27. package/dist/tools/specialized/bazi.d.ts +7 -1
  28. package/dist/tools/specialized/bazi.js +86 -19
  29. package/dist/tools/specialized/bi_wheel.js +5 -4
  30. package/dist/tools/specialized/chart_wheel.js +5 -8
  31. package/dist/tools/specialized/comparative.js +13 -5
  32. package/dist/tools/specialized/electional.js +7 -7
  33. package/dist/tools/specialized/ephemeris_core.js +13 -8
  34. package/dist/tools/specialized/ephemeris_extended.js +27 -17
  35. package/dist/tools/specialized/hd_bodygraph.js +8 -10
  36. package/dist/tools/specialized/hd_cycles.js +7 -14
  37. package/dist/tools/specialized/hd_group.js +20 -13
  38. package/dist/tools/specialized/human_design.js +11 -17
  39. package/dist/tools/specialized/moon.js +8 -2
  40. package/dist/tools/specialized/natal.js +7 -9
  41. package/dist/tools/specialized/progressed.js +12 -8
  42. package/dist/tools/specialized/relocation.js +9 -3
  43. package/dist/tools/specialized/returns.js +23 -11
  44. package/dist/tools/specialized/synastry.js +17 -6
  45. package/dist/tools/specialized/transits.js +9 -5
  46. package/dist/tools/specialized/vedic.js +5 -3
  47. package/dist/tools/specialized/venus_star_points.js +14 -9
  48. package/dist/ui/bazi.html +1063 -1049
  49. package/dist/ui/bi-wheel.html +4188 -4128
  50. package/dist/ui/bodygraph.html +3673 -3616
  51. package/dist/ui/chart-wheel.html +3769 -3713
  52. package/dist/ui/moon-phase.html +3219 -3153
  53. package/dist/ui/transit-timeline.html +199 -170
  54. package/dist/ui/vedic-chart.html +1116 -1098
  55. package/package.json +3 -2
  56. package/smithery.yaml +1 -1
@@ -1,13 +1,16 @@
1
1
  import { registerTool, validateRequired } from "../index.js";
2
2
  import { getActiveClient } from "../../backend/client.js";
3
3
  import { OUTPUT_SCHEMA_JSON } from "../output-schemas.js";
4
- function buildSubject(datetime, lat, lon) {
4
+ import { DATETIME_DESC, TIMEZONE_PROPERTY, assertZonedDatetime } from "../datetime.js";
5
+ function buildSubject(datetime, lat, lon, timezone) {
5
6
  return {
6
7
  name: "Subject",
7
8
  birth_datetime: { iso: datetime },
8
9
  birth_location: {
9
10
  latitude: { decimal: lat },
10
11
  longitude: { decimal: lon },
12
+ // The server resolves the IANA zone, so historical DST stays correct.
13
+ ...(timezone ? { timezone: { iana_name: timezone } } : {}),
11
14
  },
12
15
  };
13
16
  }
@@ -16,13 +19,14 @@ registerTool({
16
19
  name: "venus_star_points",
17
20
  description: "Get Venus Star Points — the Sun-Venus conjunction events nearest to a birth date. " +
18
21
  "Shows the quality of each conjunction (cazimi, combust, under beams) with zodiac details.\n\n" +
19
- "CREDIT COST: 2 credits per call.\n\n" +
22
+ "CREDIT COST: 1 credit per call.\n\n" +
20
23
  "EXAMPLE: Venus star points for someone born 1990-04-15:\n" +
21
- " datetime='1990-04-15T14:30:00', latitude=41.88, longitude=-87.63",
24
+ " datetime='1990-04-15T14:30:00', timezone='America/Chicago', latitude=41.88, longitude=-87.63",
22
25
  inputSchema: {
23
26
  type: "object",
24
27
  properties: {
25
- datetime: { type: "string", description: "Birth datetime (ISO 8601)." },
28
+ datetime: { type: "string", description: DATETIME_DESC },
29
+ timezone: TIMEZONE_PROPERTY,
26
30
  latitude: { type: "number", description: "Birth latitude." },
27
31
  longitude: { type: "number", description: "Birth longitude." },
28
32
  format: { type: "string", enum: ["json", "llm"], description: "Output format." },
@@ -34,11 +38,12 @@ registerTool({
34
38
  annotations: { title: "Venus Star Points", readOnlyHint: true, destructiveHint: false, idempotentHint: true },
35
39
  handler: async (args) => {
36
40
  validateRequired(args, ["datetime", "latitude", "longitude"]);
41
+ assertZonedDatetime("datetime", args.datetime, args.timezone);
37
42
  const query = {};
38
43
  if (args.format)
39
44
  query.format = args.format;
40
45
  return await getActiveClient().request("POST", "/ephemeris/venus-star-points", {
41
- data: { subject: buildSubject(args.datetime, args.latitude, args.longitude) },
46
+ data: { subject: buildSubject(args.datetime, args.latitude, args.longitude, args.timezone) },
42
47
  params: query,
43
48
  });
44
49
  },
@@ -48,7 +53,7 @@ registerTool({
48
53
  name: "venus_star_points_conjunctions",
49
54
  description: "Find all Sun-Venus conjunctions in a date range. Returns each conjunction with " +
50
55
  "its exact timestamp, zodiac position, orb, visibility (morning/evening star), and dignity.\n\n" +
51
- "CREDIT COST: 2 credits per call.\n\n" +
56
+ "CREDIT COST: 1 credit per call.\n\n" +
52
57
  "EXAMPLE: Find Venus conjunctions in 2026:\n" +
53
58
  " start_date='2026-01-01', end_date='2026-12-31'",
54
59
  inputSchema: {
@@ -80,7 +85,7 @@ registerTool({
80
85
  description: "Compute the 8-year Venus Star pattern — the pentagram of 5 Venus-Sun conjunctions " +
81
86
  "that trace a near-perfect star over 8 years (the Venus synodic cycle). Returns the 5 " +
82
87
  "vertices with their zodiac positions.\n\n" +
83
- "CREDIT COST: 2 credits per call.\n\n" +
88
+ "CREDIT COST: 1 credit per call.\n\n" +
84
89
  "EXAMPLE: 8-year star starting from 2020:\n" +
85
90
  " date='2020-01-01'",
86
91
  inputSchema: {
@@ -141,7 +146,7 @@ registerTool({
141
146
  name: "venus_elongations",
142
147
  description: "Find Venus greatest elongation events (when Venus is farthest from the Sun in the sky). " +
143
148
  "Returns east (evening star) and west (morning star) elongation peaks.\n\n" +
144
- "CREDIT COST: 2 credits per call.",
149
+ "CREDIT COST: 1 credit per call.",
145
150
  inputSchema: {
146
151
  type: "object",
147
152
  properties: {
@@ -170,7 +175,7 @@ registerTool({
170
175
  name: "venus_stations",
171
176
  description: "Find Venus retrograde and direct stations in a date range. Returns the exact " +
172
177
  "moment Venus appears to stop and reverse direction.\n\n" +
173
- "CREDIT COST: 2 credits per call.\n\n" +
178
+ "CREDIT COST: 1 credit per call.\n\n" +
174
179
  "EXAMPLE: Venus stations in 2026:\n" +
175
180
  " start_date='2026-01-01', end_date='2026-12-31'",
176
181
  inputSchema: {