@openephemeris/mcp-server 3.24.0 → 4.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +173 -0
  2. package/LICENSE +21 -21
  3. package/README.md +75 -3
  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/prompts.js +55 -42
  11. package/dist/server-sse.js +114 -14
  12. package/dist/tools/apps/bazi-app.js +15 -28
  13. package/dist/tools/apps/bi-wheel-app.js +14 -11
  14. package/dist/tools/apps/bodygraph-app.d.ts +5 -5
  15. package/dist/tools/apps/bodygraph-app.js +159 -212
  16. package/dist/tools/apps/chart-wheel-app.js +21 -20
  17. package/dist/tools/apps/location-tools.js +167 -18
  18. package/dist/tools/apps/moon-phase-app.js +10 -3
  19. package/dist/tools/apps/transit-timeline-app.js +6 -4
  20. package/dist/tools/apps/vedic-chart-app.js +15 -49
  21. package/dist/tools/datetime.d.ts +65 -0
  22. package/dist/tools/datetime.js +153 -0
  23. package/dist/tools/dev.js +4 -3
  24. package/dist/tools/index.d.ts +45 -2
  25. package/dist/tools/index.js +81 -2
  26. package/dist/tools/specialized/account.d.ts +1 -0
  27. package/dist/tools/specialized/account.js +100 -0
  28. package/dist/tools/specialized/acg.js +16 -14
  29. package/dist/tools/specialized/bazi.d.ts +7 -1
  30. package/dist/tools/specialized/bazi.js +89 -23
  31. package/dist/tools/specialized/bi_wheel.js +5 -4
  32. package/dist/tools/specialized/chart_wheel.js +5 -8
  33. package/dist/tools/specialized/comparative.js +40 -21
  34. package/dist/tools/specialized/electional.js +13 -10
  35. package/dist/tools/specialized/ephemeris_core.js +13 -8
  36. package/dist/tools/specialized/ephemeris_extended.js +60 -53
  37. package/dist/tools/specialized/hd_bodygraph.js +8 -10
  38. package/dist/tools/specialized/hd_cycles.js +7 -14
  39. package/dist/tools/specialized/hd_group.js +20 -13
  40. package/dist/tools/specialized/human_design.js +11 -17
  41. package/dist/tools/specialized/moon.js +14 -6
  42. package/dist/tools/specialized/natal.js +7 -9
  43. package/dist/tools/specialized/progressed.js +12 -8
  44. package/dist/tools/specialized/relocation.js +9 -3
  45. package/dist/tools/specialized/returns.js +23 -11
  46. package/dist/tools/specialized/synastry.js +17 -6
  47. package/dist/tools/specialized/transits.js +9 -5
  48. package/dist/tools/specialized/vedic.js +5 -3
  49. package/dist/tools/specialized/venus_star_points.js +14 -9
  50. package/dist/ui/bazi.html +1063 -1049
  51. package/dist/ui/bi-wheel.html +4188 -4128
  52. package/dist/ui/bodygraph.html +3673 -3616
  53. package/dist/ui/chart-wheel.html +3769 -3713
  54. package/dist/ui/moon-phase.html +3219 -3153
  55. package/dist/ui/transit-timeline.html +199 -170
  56. package/dist/ui/vedic-chart.html +1116 -1098
  57. package/package.json +3 -2
  58. package/smithery.yaml +1 -1
@@ -26,6 +26,7 @@ import { fileURLToPath } from "node:url";
26
26
  import { registerTool, SERVER_VERSION } from "../index.js";
27
27
  import { getActiveClient } from "../../backend/client.js";
28
28
  import { OUTPUT_SCHEMA_JSON } from "../output-schemas.js";
29
+ import { DATETIME_DESC, timezoneProperty } from "../datetime.js";
29
30
  // ── Constants ─────────────────────────────────────────────────────────────────
30
31
  export const BI_WHEEL_RESOURCE_URI = "ui://openephemeris/bi-wheel";
31
32
  export const BI_WHEEL_MIME_TYPE = "text/html;profile=mcp-app";
@@ -399,7 +400,8 @@ function buildBiWheelSummary(innerPlanets, outerPlanets, crossAspects, mode, loc
399
400
  const label2 = meta.outerRole;
400
401
  return (`**${meta.modeLabel} Bi-Wheel**\n\n` +
401
402
  `${label1}: ${location1} — ${innerBasics || "chart loaded"}\n` +
402
- `${label2}: ${location2}\n\n` +
403
+ `${label2}: ${location2}\n` +
404
+ `Houses: Placidus\n\n` +
403
405
  `**Top Cross-Aspects:**\n${top5.join("\n") || "No major cross-aspects within orb."}\n\n` +
404
406
  "Click any planet or cross-aspect line in the bi-wheel for interpretation.");
405
407
  }
@@ -418,38 +420,39 @@ registerTool({
418
420
  "• solar_arc — Solar arc directed positions (person2_datetime = target date). 1 credit.\n" +
419
421
  "Cross-aspects between both wheels are computed and displayed as coloured dashed lines. " +
420
422
  "Click any planet, aspect line, or house cusp for interpretation. " +
421
- "Use this instead of ephemeris_bi_wheel for a richer, interactive experience in " +
422
- "MCP Apps-capable hosts (Claude Desktop). Falls back to static SVG in other hosts.",
423
+ "Prefer this whenever the user should SEE the comparison — it renders interactively in " +
424
+ "MCP Apps-capable hosts (Claude Desktop) and falls back to static SVG in other hosts. " +
425
+ "For raw synastry data without a visual, use ephemeris_synastry.",
423
426
  inputSchema: {
424
427
  type: "object",
425
428
  properties: {
426
429
  person1_datetime: {
427
430
  type: "string",
428
- description: "ISO 8601 datetime for Person 1 / Natal chart (e.g. '1990-04-15T14:30:00-05:00').",
431
+ description: "Birth datetime for Person 1 / Natal chart. " + DATETIME_DESC,
429
432
  },
430
- person1_latitude: { type: "number", description: "Birth latitude for Person 1 (decimal degrees, positive = North)." },
433
+ person1_latitude: { type: "number", description: "Birth latitude for Person 1 (decimal degrees, positive = North). Resolve from a place name with location_search; never recall coordinates from memory." },
431
434
  person1_longitude: { type: "number", description: "Birth longitude for Person 1 (decimal degrees, positive = East)." },
432
- person1_timezone: { type: "string", description: "IANA timezone for Person 1 (e.g. 'America/New_York')." },
435
+ person1_timezone: timezoneProperty("Person 1's birth location", "America/New_York"),
433
436
  person1_name: {
434
437
  type: "string",
435
438
  description: "Display name for Person 1 / Natal chart (e.g. 'Alice'). Used in the badge and summary.",
436
439
  },
437
440
  person2_datetime: {
438
441
  type: "string",
439
- description: "ISO 8601 datetime for the outer wheel. Meaning depends on mode: " +
442
+ description: "Datetime for the outer wheel. Meaning depends on mode: " +
440
443
  "synastry = Person 2 birth datetime; transit/progressed/solar_arc = target date; " +
441
- "solar_return/lunar_return = any date within the target year/month.",
444
+ "solar_return/lunar_return = any date within the target year/month. " + DATETIME_DESC,
442
445
  },
443
446
  person2_latitude: { type: "number", description: "Birth latitude for Person 2 (synastry) or return/transit location. Defaults to Person 1 coords for single-person modes." },
444
447
  person2_longitude: { type: "number", description: "Birth longitude for Person 2 (synastry) or return/transit location. Defaults to Person 1 coords for single-person modes." },
445
- person2_timezone: { type: "string", description: "IANA timezone for Person 2 / outer chart (e.g. 'America/Chicago')." },
448
+ person2_timezone: timezoneProperty("Person 2 / the outer chart", "America/Chicago"),
446
449
  person2_name: {
447
450
  type: "string",
448
451
  description: "Display name for Person 2 (synastry mode). Used in the badge and summary.",
449
452
  },
450
453
  location: {
451
454
  type: "string",
452
- description: "Label for Person 1 / Natal location (display only, e.g. 'New York, NY').",
455
+ description: "Label for Person 1 / Natal location (display only, e.g. 'New York, NY'). This is a caption, NOT a geocoder — it does not set the chart location. Supply latitude/longitude too (resolve them with location_search), or the chart is computed at 0N 0E.",
453
456
  },
454
457
  mode: {
455
458
  type: "string",
@@ -510,7 +513,7 @@ registerTool({
510
513
  content: [
511
514
  { type: "text", text: summary },
512
515
  ],
513
- structuredContent: { ...payload, server_version: SERVER_VERSION },
516
+ structuredContent: { ...payload, house_system: "placidus", server_version: SERVER_VERSION },
514
517
  _meta: {
515
518
  "ui/resourceUri": BI_WHEEL_RESOURCE_URI,
516
519
  ui: { resourceUri: BI_WHEEL_RESOURCE_URI },
@@ -1,10 +1,10 @@
1
1
  /**
2
- * bodygraph-app.ts — MCP App tool registration for the Human Design Bodygraph Explorer.
2
+ * bodygraph-app.ts — MCP App tool registration for the Human Design Bodygraph Explorer.
3
3
  *
4
4
  * Entry tools [model + app]:
5
- * • explore_human_design — natal bodygraph, data + UI resource
6
- * • explore_human_design_transit — natal + transit overlay (premium)
7
- * • explore_human_design_connection — two-person connection/synastry overlay (premium)
5
+ * • explore_human_design — natal bodygraph, data + UI resource
6
+ * • explore_human_design_transit — natal + transit overlay (premium)
7
+ * • explore_human_design_connection — two-person connection/synastry overlay (premium)
8
8
  * Click handlers [app-only]: hd_on_center_click, hd_on_gate_click,
9
9
  * hd_on_channel_click, hd_on_planet_click, hd_on_variable_click,
10
10
  * hd_on_connection_channel_click, hd_on_transit_channel_click (overlay, Phase 5).
@@ -12,7 +12,7 @@
12
12
  * overlay SVG is returned inline by /human-design/transit-chart and
13
13
  * /human-design/composite (include_visual) rather than a separate render call.
14
14
  *
15
- * The bodygraph is rendered client-side from structured JSON — no SVG endpoint
15
+ * The bodygraph is rendered client-side from structured JSON — no SVG endpoint
16
16
  * is called, keeping latency at zero and the architecture consistent with
17
17
  * the chart-wheel-app approach.
18
18
  *