AstroMCP API
Разлік гараскопаў, гараскопы, таро і кіраванне акаўнтам, усё праз REST API. У гэтым даведніку задакументаваны ўсе эндпойнты, якія зараз прадастаўляе AstroMCP API.
Base URL: https://astrocompo-distributor-production.fly.dev
Аўтэнтыфікацыя
Усе эндпойнты, акрамя пазначаных «Аўтэнтыфікацыя не патрабуецца», чакаюць ваш API-ключ у выглядзе bearer-токена:
Authorization: Bearer <your-api-key>
Усе адказы з памылкамі, незалежна ад эндпойнта, маюць адну структуру:
{
"error": {
"code": "SOME_ERROR_CODE",
"message": "Human-readable explanation."
}
}MCP server for AI agents
AstroMCP speaks the Model Context Protocol over streamable HTTP, so Claude, Cursor and other MCP clients can call the tools below directly. Endpoint:
https://astrocompo.com/mcp
Send your AstroMCP API key as a bearer token: Authorization: Bearer <your-api-key>. Create a key from the Developer tab in your AstroCompass account settings (Oracle plan). MCP calls share your key's rate limits and usage metering.
Tools
get_current_planetsReturns the current positions of all ten classical planets plus Chiron, calculated for the current UTC time. Each planet includes its zodiac sign, degree, speed, and retrograde status.
Arguments: none
get_natal_chartCalculates a complete natal (birth) chart for the given date, time, and geographic location. Returns planetary positions, twelve house cusps, Ascendant, Midheaven, and all major aspects.
Arguments: year, month, day, latitude, longitude, hour? (default 12), minute? (default 0), house_system? ("P"|"W"|"K"|"O"|"E", default "P")
generate_horoscopeGenerates a daily, weekly, or monthly horoscope for a given zodiac sign using real planetary transit data and the Claude API. Returns structured content including title, body text, theme, and intensity rating.
Arguments: sign (e.g. "Aries"), period ("daily"|"weekly"|"monthly"), date? (YYYY-MM-DD, default today UTC)
draw_tarot_readingDraws a cryptographically random tarot spread and generates a Claude-backed interpretation for each card in its position, plus an overall reading summary.
Arguments: spread_type ("single"|"three_card"|"celtic_cross"|"weekly"|"daily"), allow_reversals? (default true), question? (up to 200 characters)
Connect a client
Clients that accept a remote URL and headers (Cursor and similar):
{
"mcpServers": {
"astromcp": {
"url": "https://astrocompo.com/mcp",
"headers": { "Authorization": "Bearer <your-api-key>" }
}
}
}Claude Desktop, through the mcp-remote bridge (needs Node.js):
{
"mcpServers": {
"astromcp": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://astrocompo.com/mcp", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer <your-api-key>" }
}
}
}Machine-readable descriptions
- OpenAPI 3.1 for the REST API: /openapi.json
- MCP server card: /.well-known/mcp/server-card.json
Health
/healthNo auth requiredPublic liveness probe for the distributor itself. It does not check the supplier and reveals nothing about the stack.
Response: { status: "ok", service: "distributor", timestamp }: always HTTP 200.
/v1/diagnosticsAPI key required (enterprise tier)Detailed status for operators: supplier reachability, versions, and ephemeris and AI key checks. Rate limited per key.
Response: { status: "ok"|"degraded", service: "distributor", version, timestamp, upstream: { supplier: "ok"|"unreachable", supplierDiagnostics } }: HTTP 200; read `status` for degraded state.
API Keys
Every endpoint below requires the Authorization header described in Authentication, except that creating a key (POST /v1/keys) may instead be authorised with the operator bootstrap secret in the X-Bootstrap-Secret header. Self-serve keys are created from the Developer tab in your account settings (Oracle plan).
/v1/keysAPI key required (enterprise tier)Create an API key (operator surface). Anonymous creation is disabled on production: send an enterprise-tier key as the Bearer token, or the operator bootstrap secret. Keys at a tier above free need that authority; without it the tier is clamped to free. Self-serve keys come from the Developer tab in your account settings.
Request: { name: string, tier?: "free"|"starter"|"growth"|"scale"|"enterprise", tenantId?: uuid }
Response: 201 { key, prefix, name, tier, createdAt }: `key` is the raw secret, shown exactly once and never retrievable again.
/v1/keys/meAPI key requiredLook up your own key record.
Response: 200: your ApiKeyRecord.
/v1/keysAPI key required (enterprise tier)List every API key (admin surface).
Response: 200 { keys: [{ id, name, keyPrefix, tier, isActive, createdAt, lastUsedAt }] }: the key secret itself is never returned.
/v1/keys/:idAPI key required (enterprise tier)Revoke a key. Irreversible.
Response: 204 on success, 404 if no such key.
Chart Data
All chart/horoscope/tarot endpoints are metered and, where noted, cached: repeat requests for the same inputs within the cache window return the cached result.
/v1/chart/natalAPI key requiredCompute a full natal chart for a birth date, time, and location. Cached 7 days per input.
Request: { year, month, day, hour?, minute?, second?, latitude, longitude, houseSystem?, locale? }
Response: { julian_day, planets[], houses[], ascendant, aspects[] }
/v1/planets/currentAPI key requiredReal-time current planetary positions. Cached 1 hour.
Response: { julian_day, planets[] }
/v1/horoscope/:sign/dailyAPI key requiredDaily horoscope for a zodiac sign. Cached 24 hours.
Request: params: sign. query: date?, locale?
Response: { sign, period, content: { title, body, theme } }
/v1/horoscope/:sign/weeklyAPI key requiredA week-ahead overview plus each individual day's reading for that week.
Request: params: sign. query: date?, locale?
Response: { sign, period: "weekly", week_start, week_end, overview, days[] }
/v1/horoscope/:sign/monthlyAPI key requiredMonthly horoscope for a sign. Cached per calendar month.
Request: params: sign. query: date?, locale?
Response: { sign, period, content: { title, body, theme } }
/v1/tarot/dailyAPI key requiredThe shared daily tarot advice card: one card for every caller that day. Cached 24 hours.
Request: query: date?, locale?
Response: { spread_type, generated_at, cards[], summary }
/v1/tarot/weeklyAPI key requiredThe shared weekly tarot reading. Cached 7 days.
Request: query: date?, locale?
Response: { spread_type, generated_at, cards[], summary }
/v1/tarot/monthlyAPI key requiredMonthly tarot reading composed from that month's weekly readings. Cached 31 days.
Request: query: date?, locale?
Response: { spread_type: "monthly", generated_at, cards[], summary }
/v1/tarot/readingAPI key requiredAn on-demand personal tarot draw. Never cached: every draw is unique.
Request: { spreadType: "single"|"three_card"|"celtic_cross", allowReversals?, question?, locale? }
Response: Opaque reading object (shape varies by spread type).
Analytics
Admin-portal surfaces, not general third-party endpoints: every route here requires an enterprise-tier key.
/v1/analytics/summaryAPI key required (enterprise tier)Headline usage metrics for a time window.
Request: query: range? (24h|7d|30d, default 24h)
Response: { totalRequests, cacheHitRate, uniqueKeys, avgLatencyMs, requestsByTier[], requestsByStatus[] }
/v1/analytics/timeseriesAPI key required (enterprise tier)Chartable request/cache-hit volume over time.
Request: query: range?
Response: { buckets: [{ timestamp, requests, hits }] }
/v1/analytics/top-keysAPI key required (enterprise tier)Busiest API keys by request count.
Request: query: range?, limit? (default 10, max 100)
Response: { keys: [{ keyId, keyName, prefix, tier, requests, cacheHits }] }
Tenants
Admin-only white-label tenant management, enterprise tier required.
/v1/tenantsAPI key required (enterprise tier)Paginated, searchable, sortable white-label tenant list.
Request: query: page?, limit? (max 100), q?, sort?, dir?
Response: { tenants[], total, page, limit }
/v1/tenants/:idAPI key required (enterprise tier)Single tenant detail plus 30-day usage summary.
Response: { tenant, usage: { totalApiKeys, totalRequests30d, cacheHitRate30d } }; 404 if not found.
B2C Users
Admin-only consumer account management, enterprise tier required.
/v1/b2c-usersAPI key required (enterprise tier)Paginated, searchable, sortable B2C consumer account list.
Request: query: page?, limit? (max 100), q?, sort?, dir?
Response: { users[], total, page, limit }
/v1/b2c-users/:idAPI key required (enterprise tier)Grant or revoke the super-admin bypass flag on a user.
Request: { isSuperAdmin: boolean }
Response: The updated user row. 404 if not found.
Branding
/v1/branding/:platformKeyNo auth requiredAdmin-managed branding asset overrides (favicon/app-icon/lockup) for a platform.
Request: params: platformKey ("web"|"portal-horoscope"|"portal-tarot")
Response: { platformKey, assets: Record<assetType, url> }; cached 10 minutes.
Contact
/v1/contactNo auth requiredThe platform's admin-managed public contact identity.
Response: { displayName, contactEmail }; cached 10 minutes.
Webhooks
Unlike every endpoint above (which you call), this is a true webhook: Stripe calls this route. You will never call it directly.
/v1/webhooks/stripeStripe webhook signatureReceives and processes inbound Stripe billing events, verified via Stripe's signature scheme.
Request: Raw Stripe event payload; requires a Stripe-Signature header.
Response: 200 { received: true } on success; 400 if the signature is missing or invalid.