@openephemeris/mcp-server 3.0.0 → 3.0.1
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 +21 -0
- package/dist/backend/client.js +17 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,10 +55,31 @@ Cursor deeplink payload:
|
|
|
55
55
|
| Claude Desktop (Windows) | Manual | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
56
56
|
| Windsurf | Manual | `~/.codeium/windsurf/mcp_config.json` (or legacy `~/.codeium/mcp_config.json`) |
|
|
57
57
|
|
|
58
|
+
### Client install walkthroughs
|
|
59
|
+
|
|
60
|
+
1. Cursor
|
|
61
|
+
- Click the "Install in Cursor" button above, then replace `YOUR_API_KEY_HERE` in Cursor MCP settings.
|
|
62
|
+
- If you prefer manual setup, paste the `mcpServers.openephemeris` block from "Manual install" into `~/.cursor/mcp.json`.
|
|
63
|
+
2. Claude Desktop (macOS/Windows)
|
|
64
|
+
- Open the platform config file from the table above.
|
|
65
|
+
- Add the same `mcpServers.openephemeris` block from "Manual install".
|
|
66
|
+
- Restart Claude Desktop.
|
|
67
|
+
3. Windsurf
|
|
68
|
+
- Open `~/.codeium/windsurf/mcp_config.json` (or the legacy `~/.codeium/mcp_config.json` path).
|
|
69
|
+
- Add the `mcpServers.openephemeris` block from "Manual install".
|
|
70
|
+
- Restart Windsurf.
|
|
71
|
+
|
|
58
72
|
### Remote-only clients (ChatGPT Developer Mode, Antigravity, etc.)
|
|
59
73
|
|
|
60
74
|
This package runs as a local stdio MCP server. Remote-only clients require a hosted MCP endpoint (Streamable HTTP/SSE), so you must run this server behind an MCP bridge/proxy and expose it over HTTPS before adding it in those clients.
|
|
61
75
|
|
|
76
|
+
### Auth and upgrade behavior in MCP clients
|
|
77
|
+
|
|
78
|
+
- Missing/invalid credentials (`401`): tool call fails with a message that points users to sign up/sign in at `https://openephemeris.com/login?signup=true&redirect=%2Fdashboard%3Ftab%3Daccount`, then create/manage keys in `https://openephemeris.com/dashboard?tab=account`.
|
|
79
|
+
- Tier-gated endpoint (`403`): tool call returns an upgrade-required message with `https://openephemeris.com/pay` and dashboard billing/key management link.
|
|
80
|
+
- Monthly quota exhausted (`402`): tool call returns usage quota guidance with both dashboard (`/dashboard?tab=account`) and upgrade (`/pay`) links.
|
|
81
|
+
- Burst/rate limit (`429`): tool call returns retry guidance and links to dashboard usage monitoring.
|
|
82
|
+
|
|
62
83
|
## What You Can Ask
|
|
63
84
|
|
|
64
85
|
- "Calculate a natal chart for 1990-04-15 14:30 in Chicago."
|
package/dist/backend/client.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import axios, { AxiosError } from "axios";
|
|
2
2
|
const DEFAULT_TIMEOUT_MS = 45_000;
|
|
3
3
|
const RATE_LIMIT_RETRY_DELAYS_MS = [1_000, 2_000]; // Two retries on 429
|
|
4
|
+
const DASHBOARD_ACCOUNT_URL = "https://openephemeris.com/dashboard?tab=account";
|
|
5
|
+
const LOGIN_SIGNUP_URL = "https://openephemeris.com/login?signup=true&redirect=%2Fdashboard%3Ftab%3Daccount";
|
|
6
|
+
const UPGRADE_URL = "https://openephemeris.com/pay";
|
|
4
7
|
function sleep(ms) {
|
|
5
8
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
6
9
|
}
|
|
@@ -64,17 +67,27 @@ export class BackendClient {
|
|
|
64
67
|
if (error.response) {
|
|
65
68
|
const status = error.response.status;
|
|
66
69
|
const data = error.response.data;
|
|
67
|
-
const msg = data?.message || data?.detail || error.message;
|
|
70
|
+
const msg = data?.message || data?.detail || data?.title || error.message;
|
|
71
|
+
if (status === 401) {
|
|
72
|
+
return new Error(`Authentication required: ${msg}. Sign in or create an account at ${LOGIN_SIGNUP_URL}, ` +
|
|
73
|
+
`create credentials in ${DASHBOARD_ACCOUNT_URL}, and set ASTROMCP_API_KEY (or ASTROMCP_JWT / ASTROMCP_SERVICE_KEY) before retrying.`);
|
|
74
|
+
}
|
|
75
|
+
if (status === 402) {
|
|
76
|
+
return new Error(`Usage quota exceeded: ${msg}. Review usage and overage settings in ${DASHBOARD_ACCOUNT_URL}, ` +
|
|
77
|
+
`or upgrade at ${UPGRADE_URL}.`);
|
|
78
|
+
}
|
|
79
|
+
if (status === 403) {
|
|
80
|
+
return new Error(`Access blocked by plan or policy: ${msg}. If this endpoint is tier-gated, upgrade at ${UPGRADE_URL}. ` +
|
|
81
|
+
`Manage keys and billing at ${DASHBOARD_ACCOUNT_URL}.`);
|
|
82
|
+
}
|
|
68
83
|
if (status === 429) {
|
|
69
84
|
return new Error(`Rate limit exceeded. Your plan credits may be exhausted or requests are too frequent. ` +
|
|
70
|
-
`Check
|
|
85
|
+
`Check usage at ${DASHBOARD_ACCOUNT_URL}, then retry in a moment. (${msg})`);
|
|
71
86
|
}
|
|
72
87
|
if (status === 404)
|
|
73
88
|
return new Error(`Resource not found: ${msg}`);
|
|
74
89
|
if (status === 400)
|
|
75
90
|
return new Error(`Invalid request: ${msg}`);
|
|
76
|
-
if (status === 401 || status === 403)
|
|
77
|
-
return new Error(`Authentication error: ${msg}. Verify your ASTROMCP_API_KEY.`);
|
|
78
91
|
if (status >= 500)
|
|
79
92
|
return new Error(`Backend error (${status}): ${msg}`);
|
|
80
93
|
}
|