@openephemeris/mcp-server 3.13.6 → 3.13.8
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 +2 -2
- package/dist/backend/client.js +27 -9
- package/dist/index.js +33 -32
- package/dist/prompts.d.ts +26 -0
- package/dist/prompts.js +942 -0
- package/dist/tools/apps/bi-wheel-app.js +286 -32
- package/dist/tools/apps/bodygraph-app.js +361 -12
- package/dist/tools/apps/chart-wheel-app.js +64 -30
- package/dist/tools/apps/location-tools.d.ts +1 -0
- package/dist/tools/apps/location-tools.js +52 -0
- package/dist/tools/index.js +1 -0
- package/dist/tools/specialized/acg.js +2 -0
- package/dist/tools/specialized/bazi.js +1 -0
- package/dist/tools/specialized/bi_wheel.js +1 -0
- package/dist/tools/specialized/chart_wheel.js +1 -0
- package/dist/tools/specialized/comparative.js +4 -0
- package/dist/tools/specialized/eclipse.js +1 -0
- package/dist/tools/specialized/electional.js +4 -0
- package/dist/tools/specialized/ephemeris_core.js +2 -0
- package/dist/tools/specialized/ephemeris_extended.js +8 -0
- package/dist/tools/specialized/hd_bodygraph.js +1 -0
- package/dist/tools/specialized/hd_cycles.js +2 -0
- package/dist/tools/specialized/hd_group.js +2 -0
- package/dist/tools/specialized/human_design.js +1 -0
- package/dist/tools/specialized/moon.js +2 -0
- package/dist/tools/specialized/natal.js +1 -0
- package/dist/tools/specialized/progressed.js +1 -0
- package/dist/tools/specialized/relocation.js +1 -0
- package/dist/tools/specialized/returns.js +3 -0
- package/dist/tools/specialized/synastry.js +1 -0
- package/dist/tools/specialized/transits.js +1 -0
- package/dist/tools/specialized/vedic.js +1 -0
- package/dist/tools/specialized/venus_star_points.js +6 -0
- package/dist/ui/bi-wheel.html +7124 -60
- package/dist/ui/bodygraph.html +7057 -508
- package/dist/ui/chart-wheel.html +7355 -565
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -355,8 +355,8 @@ Generated by `npm run sync:readme` from `config/dev-allowlist.json` and the live
|
|
|
355
355
|
|
|
356
356
|
- Allowlisted operations: **28**
|
|
357
357
|
- Methods: `GET=4`, `POST=24`, `PUT=0`, `PATCH=0`, `DELETE=0`
|
|
358
|
-
- Registered tools (`OPENEPHEMERIS_PROFILE=dev`): **
|
|
359
|
-
- Typed tools: `acg_hits`, `acg_power_lines`, `auth_login`, `auth_logout`, `auth_status`, `bi_wheel_on_cross_aspect_click`, `bi_wheel_on_planet_click`, `chart_wheel_on_aspect_click`, `chart_wheel_on_house_click`, `chart_wheel_on_planet_click`, `chart_wheel_recalculate`, `chinese_bazi`, `dev_call`, `dev_list_allowed`, `electional_aspect_search`, `electional_moment_analysis`, `electional_station_tracker`, `ephemeris_angles_points`, `ephemeris_aspect_check`, `ephemeris_bi_wheel`, `ephemeris_chart_wheel`, `ephemeris_composite`, `ephemeris_composite_midpoint`, `ephemeris_dignities`, `ephemeris_electional`, `ephemeris_fixed_stars`, `ephemeris_hermetic_lots`, `ephemeris_house_cusps`, `ephemeris_lunar_return`, `ephemeris_midpoints`, `ephemeris_moon_phase`, `ephemeris_natal_batch`, `ephemeris_natal_chart`, `ephemeris_natal_transits`, `ephemeris_next_eclipse`, `ephemeris_next_lunar_phase`, `ephemeris_overlay`, `ephemeris_planet_position`, `ephemeris_planetary_return`, `ephemeris_progressed_chart`, `ephemeris_relocation`, `ephemeris_retrograde_status`, `ephemeris_solar_return`, `ephemeris_synastry`, `ephemeris_transits`, `explore_bi_wheel`, `explore_human_design`, `explore_natal_chart`, `hd_on_center_click`, `hd_on_channel_click`, `hd_on_gate_click`, `hd_opposition`, `hd_planetary_return`, `human_design_bodygraph`, `human_design_chart`, `human_design_composite`, `human_design_penta`, `vedic_chart`, `venus_eight_year_star`, `venus_elongations`, `venus_phase`, `venus_star_points`, `venus_star_points_conjunctions`, `venus_stations`
|
|
358
|
+
- Registered tools (`OPENEPHEMERIS_PROFILE=dev`): **72**
|
|
359
|
+
- Typed tools: `acg_hits`, `acg_power_lines`, `auth_login`, `auth_logout`, `auth_status`, `bi_wheel_on_cross_aspect_click`, `bi_wheel_on_house_click`, `bi_wheel_on_planet_click`, `bi_wheel_recalculate`, `bi_wheel_synopsis`, `bodygraph_recalculate`, `chart_wheel_on_aspect_click`, `chart_wheel_on_house_click`, `chart_wheel_on_planet_click`, `chart_wheel_recalculate`, `chinese_bazi`, `dev_call`, `dev_list_allowed`, `electional_aspect_search`, `electional_moment_analysis`, `electional_station_tracker`, `ephemeris_angles_points`, `ephemeris_aspect_check`, `ephemeris_bi_wheel`, `ephemeris_chart_wheel`, `ephemeris_composite`, `ephemeris_composite_midpoint`, `ephemeris_dignities`, `ephemeris_electional`, `ephemeris_fixed_stars`, `ephemeris_hermetic_lots`, `ephemeris_house_cusps`, `ephemeris_lunar_return`, `ephemeris_midpoints`, `ephemeris_moon_phase`, `ephemeris_natal_batch`, `ephemeris_natal_chart`, `ephemeris_natal_transits`, `ephemeris_next_eclipse`, `ephemeris_next_lunar_phase`, `ephemeris_overlay`, `ephemeris_planet_position`, `ephemeris_planetary_return`, `ephemeris_progressed_chart`, `ephemeris_relocation`, `ephemeris_retrograde_status`, `ephemeris_solar_return`, `ephemeris_synastry`, `ephemeris_transits`, `explore_bi_wheel`, `explore_human_design`, `explore_natal_chart`, `hd_on_center_click`, `hd_on_channel_click`, `hd_on_gate_click`, `hd_on_planet_click`, `hd_on_variable_click`, `hd_opposition`, `hd_planetary_return`, `human_design_bodygraph`, `human_design_chart`, `human_design_composite`, `human_design_penta`, `location_search`, `timezone_resolve`, `vedic_chart`, `venus_eight_year_star`, `venus_elongations`, `venus_phase`, `venus_star_points`, `venus_star_points_conjunctions`, `venus_stations`
|
|
360
360
|
- Generic tools:
|
|
361
361
|
|
|
362
362
|
### Allowlist Families
|
package/dist/backend/client.js
CHANGED
|
@@ -15,7 +15,7 @@ const BINARY_ENDPOINT_PREFIXES = [
|
|
|
15
15
|
];
|
|
16
16
|
const DASHBOARD_ACCOUNT_URL = "https://openephemeris.com/dashboard?tab=account";
|
|
17
17
|
const LOGIN_SIGNUP_URL = "https://openephemeris.com/login?signup=true&redirect=%2Fdashboard%3Ftab%3Daccount";
|
|
18
|
-
const UPGRADE_URL = "https://openephemeris.com/
|
|
18
|
+
const UPGRADE_URL = "https://openephemeris.com/pricing";
|
|
19
19
|
function sleep(ms) {
|
|
20
20
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
21
21
|
}
|
|
@@ -251,18 +251,36 @@ export class BackendClient {
|
|
|
251
251
|
`or set OPENEPHEMERIS_API_KEY in your MCP server config.`, 401, "auth_required", false, LOGIN_SIGNUP_URL);
|
|
252
252
|
}
|
|
253
253
|
if (status === 402) {
|
|
254
|
+
const dataObj = data && typeof data === "object" ? data : {};
|
|
255
|
+
const walletUrl = dataObj.upgrade?.wallets_url || "https://openephemeris.com/wallet";
|
|
256
|
+
const currentTier = dataObj.upgrade?.current_tier || dataObj.tier || "explorer";
|
|
257
|
+
const isPro = currentTier === "developer" || currentTier === "pro" || currentTier === "startup" || currentTier === "scale";
|
|
258
|
+
let upsellMsg = "";
|
|
259
|
+
if (currentTier === 'explorer') {
|
|
260
|
+
upsellMsg =
|
|
261
|
+
`Let the user know warmly: Their 150 free discovery credits are used up. ` +
|
|
262
|
+
`They can top up their wallet starting at $5 for 150 credits at ` +
|
|
263
|
+
`${walletUrl} — or upgrade to Pro ($29/mo) ` +
|
|
264
|
+
`for 75,000 credits/month at ${UPGRADE_URL}`;
|
|
265
|
+
}
|
|
266
|
+
else if (currentTier === 'payg') {
|
|
267
|
+
upsellMsg =
|
|
268
|
+
`Let the user know warmly: Their wallet balance is empty. They can top up at ` +
|
|
269
|
+
`${walletUrl} — $5 for 150 credits, ` +
|
|
270
|
+
`$10 for 350, or $20 for 900.`;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
upsellMsg =
|
|
274
|
+
`Let the user know warmly: Their monthly credits are exhausted. They can enable overages ` +
|
|
275
|
+
`in their dashboard or upgrade at ${UPGRADE_URL}`;
|
|
276
|
+
}
|
|
254
277
|
return new BackendError(`⚠️ CREDIT LIMIT REACHED — DO NOT FABRICATE DATA.\n\n` +
|
|
255
278
|
`${msg}\n\n` +
|
|
256
|
-
`
|
|
257
|
-
`used all their monthly credits — which is great! Their free Explorer plan includes ` +
|
|
258
|
-
`150 credits per month, and they've clearly gotten good use from them.\n\n` +
|
|
259
|
-
`To keep going, they can upgrade to the Pro plan ($29/mo) for 75,000 credits and ` +
|
|
260
|
-
`full access to every tool — including astrocartography, Human Design, electional ` +
|
|
261
|
-
`timing, and advanced visualizations: ${UPGRADE_URL}\n\n` +
|
|
279
|
+
`${upsellMsg}\n\n` +
|
|
262
280
|
`They can also review their current usage at ${DASHBOARD_ACCOUNT_URL}.\n\n` +
|
|
263
|
-
`Frame this as unlocking more of what they're already enjoying, not as a gate. ` +
|
|
281
|
+
`Frame this warmly, as unlocking more of what they're already enjoying, not as a gate. ` +
|
|
264
282
|
`DO NOT attempt to generate astrological data from your own knowledge. ` +
|
|
265
|
-
`All chart positions, aspects, and timing data MUST come from the API.`, 402, "quota_exceeded", false,
|
|
283
|
+
`All chart positions, aspects, and timing data MUST come from the API.`, 402, "quota_exceeded", false, walletUrl);
|
|
266
284
|
}
|
|
267
285
|
if (status === 403) {
|
|
268
286
|
return new BackendError(`This feature is part of a higher-tier plan.\n\n` +
|
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,50 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
47
51
|
name: tool.name,
|
|
48
52
|
description: tool.description,
|
|
49
53
|
inputSchema: tool.inputSchema,
|
|
50
|
-
annotations:
|
|
51
|
-
title: tool.name,
|
|
52
|
-
readOnlyHint: true,
|
|
53
|
-
destructiveHint: false,
|
|
54
|
+
annotations: {
|
|
55
|
+
title: tool.annotations?.title ?? tool.name,
|
|
56
|
+
readOnlyHint: tool.annotations?.readOnlyHint ?? true,
|
|
57
|
+
destructiveHint: tool.annotations?.destructiveHint ?? false,
|
|
58
|
+
idempotentHint: tool.annotations?.idempotentHint ?? true,
|
|
59
|
+
openWorldHint: tool.annotations?.openWorldHint ?? false,
|
|
54
60
|
},
|
|
61
|
+
// Expose MCP Apps UI linkage so Claude Desktop can prefetch the resource
|
|
62
|
+
// and render the iframe when a tool result arrives.
|
|
63
|
+
// Include BOTH the modern nested key (_meta.ui.resourceUri) and the
|
|
64
|
+
// legacy flat key (_meta["ui/resourceUri"]) — the official ext-apps SDK
|
|
65
|
+
// normalizes both via registerAppTool() for host compatibility.
|
|
66
|
+
...(tool._meta?.ui?.resourceUri
|
|
67
|
+
? {
|
|
68
|
+
_meta: {
|
|
69
|
+
"ui/resourceUri": tool._meta.ui.resourceUri,
|
|
70
|
+
ui: {
|
|
71
|
+
resourceUri: tool._meta.ui.resourceUri,
|
|
72
|
+
visibility: tool._meta.ui.visibility ?? ["model", "app"],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
: {}),
|
|
55
77
|
})),
|
|
56
78
|
};
|
|
57
79
|
});
|
|
58
80
|
// List available prompts
|
|
59
81
|
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
|
-
};
|
|
82
|
+
return { prompts: listPrompts() };
|
|
68
83
|
});
|
|
69
84
|
// Get prompt content
|
|
70
85
|
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
71
|
-
|
|
86
|
+
const prompt = getPromptContent(request.params.name);
|
|
87
|
+
if (!prompt) {
|
|
72
88
|
throw new Error(`Unknown prompt: ${request.params.name}`);
|
|
73
89
|
}
|
|
74
90
|
return {
|
|
75
|
-
description:
|
|
91
|
+
description: prompt.description,
|
|
76
92
|
messages: [
|
|
77
93
|
{
|
|
78
94
|
role: "user",
|
|
79
|
-
content: {
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
]
|
|
95
|
+
content: { type: "text", text: prompt.text },
|
|
96
|
+
},
|
|
97
|
+
],
|
|
97
98
|
};
|
|
98
99
|
});
|
|
99
100
|
// 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;
|