@openephemeris/mcp-server 3.13.5 → 3.13.7

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/dist/index.js CHANGED
@@ -6,6 +6,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
7
  import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
8
8
  import { initTools, toolRegistry, formatToolResponse, modelVisibleTools } from "./tools/index.js";
9
+ import { listPrompts, getPromptContent } from "./prompts.js";
9
10
  import { CHART_WHEEL_RESOURCE_URI, CHART_WHEEL_MIME_TYPE, getChartWheelBundle, } from "./tools/apps/chart-wheel-app.js";
10
11
  import { BODYGRAPH_RESOURCE_URI, BODYGRAPH_MIME_TYPE, getBodygraphBundle, } from "./tools/apps/bodygraph-app.js";
11
12
  import { BI_WHEEL_RESOURCE_URI, BI_WHEEL_MIME_TYPE, getBiWheelBundle, } from "./tools/apps/bi-wheel-app.js";
@@ -38,6 +39,9 @@ const server = new Server({
38
39
  tools: {},
39
40
  prompts: {},
40
41
  resources: {},
42
+ experimental: {
43
+ "io.modelcontextprotocol/ui": {},
44
+ },
41
45
  },
42
46
  });
43
47
  // List available tools
@@ -47,53 +51,27 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
47
51
  name: tool.name,
48
52
  description: tool.description,
49
53
  inputSchema: tool.inputSchema,
50
- annotations: tool.annotations ?? {
51
- title: tool.name,
52
- readOnlyHint: true,
53
- destructiveHint: false,
54
- },
55
54
  })),
56
55
  };
57
56
  });
58
57
  // List available prompts
59
58
  server.setRequestHandler(ListPromptsRequestSchema, async () => {
60
- return {
61
- prompts: [
62
- {
63
- name: "welcome_to_open_ephemeris",
64
- description: "Getting started guide for the Open Ephemeris MCP. Use this to orient yourself to available tools, astrology terminology, and usage.",
65
- }
66
- ]
67
- };
59
+ return { prompts: listPrompts() };
68
60
  });
69
61
  // Get prompt content
70
62
  server.setRequestHandler(GetPromptRequestSchema, async (request) => {
71
- if (request.params.name !== "welcome_to_open_ephemeris") {
63
+ const prompt = getPromptContent(request.params.name);
64
+ if (!prompt) {
72
65
  throw new Error(`Unknown prompt: ${request.params.name}`);
73
66
  }
74
67
  return {
75
- description: "Open Ephemeris Agent Orientation",
68
+ description: prompt.description,
76
69
  messages: [
77
70
  {
78
71
  role: "user",
79
- content: {
80
- type: "text",
81
- text: "Welcome to the **Open Ephemeris MCP Server**!\n\n" +
82
- "You are now connected to an enterprise-grade astrological and astronomical computation engine powered by NASA JPL DE440 ephemeris data (1550–2650 CE). As a generative guide, here is how you can best utilize these tools to help the user:\n\n" +
83
- "### Core Capabilities\n" +
84
- "- **Birth Charts:** Use `ephemeris_natal_chart` for full planetary positions, houses, dignities, and aspects.\n" +
85
- "- **Predictive Timing:** `ephemeris_transits` searches for exact dates when transiting planets hit natal points.\n" +
86
- "- **Location Astrology:** `ephemeris_relocation` projects a natal chart to a new geographic location (Astrocartography).\n" +
87
- "- **Specialized Modalities:** Dedicated tools for `vedic_chart`, `chinese_bazi`, and `human_design_chart`.\n" +
88
- "- **Eclipse Hunter:** `ephemeris_next_eclipse` dynamically scans 20 years for the next total or partial hit at the user's location.\n\n" +
89
- "### Best Practices for AI Agents\n" +
90
- "1. **Coordinate Formatting:** Always convert addresses/city names into `latitude` and `longitude` decimals *before* calling the tools (e.g., Chicago is `41.8781, -87.6298`).\n" +
91
- "2. **Datetime Handling:** Most endpoints accept ISO 8601 strings. If you have a local birth time but the endpoint asks for UTC, explicitly append a `Z` or timezone offset (e.g., `1990-04-15T19:30:00Z`).\n" +
92
- "3. **Token Efficiency:** Our responses are hyper-condensed to save you context space. You don't need to struggle with raw JSON arrays; interpret the condensed strings directly (e.g., `Su 15°Pi30 H10`).\n\n" +
93
- "You're equipped with professional-grade math. Start by asking the user if they'd like to calculate a natal chart, check recent transits, or explore another modality!"
94
- }
95
- }
96
- ]
72
+ content: { type: "text", text: prompt.text },
73
+ },
74
+ ],
97
75
  };
98
76
  });
99
77
  // List available resources
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Open Ephemeris MCP — Preloaded Prompt Library
3
+ *
4
+ * Each prompt is a complete agent workflow that:
5
+ * 1. Coaches the agent to collect all required data from the user
6
+ * 2. Handles timezone, coordinate, and house-system nuances correctly
7
+ * 3. Specifies which tools to call and in what order
8
+ * 4. Provides a structured interpretation framework
9
+ */
10
+ export interface McpPrompt {
11
+ name: string;
12
+ description: string;
13
+ text: string;
14
+ }
15
+ export declare const PROMPTS: McpPrompt[];
16
+ /**
17
+ * Returns the list of all prompts (name + description only, for ListPrompts).
18
+ */
19
+ export declare function listPrompts(): Array<{
20
+ name: string;
21
+ description: string;
22
+ }>;
23
+ /**
24
+ * Returns the full prompt content for a given prompt name, or null if not found.
25
+ */
26
+ export declare function getPromptContent(name: string): McpPrompt | null;