Purpose
Asterwise MCP Server wraps astrology and divination calculations as MCP tools, enabling AI clients that support the MCP protocol (such as Claude Desktop, Cursor, VS Code) to call the calculation capabilities of Vedic astrology (Jyotish) and Western astrology, and to generate interpretations that follow classical Jyotish methods.
Main Capabilities
The server exposes a total of 118 read-only tools, organized by Python module. The categories reflect the code structure, and some tools are used across traditions (for example, the matchmaking tools include both the Sanskrit Dashakoot and Tamil Porutham methods).
- western — 25 tools (charts, transits, returns, progressions, void-of-course Moon, planetary hours, profection, eclipses, day view, daily factors, events, horary, symbols)
- natal — 13 tools (charts, dasha tree, house systems)
- factors — 5 tools (tarabala, Vedic daily factors, Vedic events, BPHS symbols, reference charts)
- numerology — 11 tools (profile, compatibility, life path number)
- tarot — 9 tools (draw, spreads, suit reference)
- vedic_reference — 8 tools (nakshatra, planetary qualities, ayanamsha, classical reference)
- numerology_gaps — 7 tools (expression, soul urge, personality, maturity, balance, karma, personal cycles)
- panchanga — 6 tools (Panchanga day with all limbs and moments, monthly calendar, muhurta search, choghadiya, rahu kaal, hora)
- crystals — 5 tools (list, by planet, recommendation, single item)
- dasha — 5 tools (vimshottari, ashtottari, yogini, char, transit)
- matchmaking — 5 tools (dashakoot, porutham, thirumana, papasamyam, compatibility)
- horoscope — 4 tools (daily/weekly/monthly/yearly)
- yoga_dosha — 4 tools (yogas, doshas, sade sati, pitra dosha)
- angel_numbers — 3 tools (today, personal, lookup)
- varshaphal — 3 tools (annual chart, saham, harsha bala)
- dreams — 2 tools (symbols, personal)
- panchanga_ext — 3 tools (festival and fasting calendar, Tamil panchanga, place name geocoding)
For the complete tool list, see docs.asterwise.com or the MCP server's tool list endpoint.
Accuracy and Verification
Every position is verified against an independently run Swiss Ephemeris (asterwise.com/proof), and compared with NASA JPL Horizons, with a median error of 0.050 arcseconds across 80 positions (asterwise.com/accuracy). For a comparison with seven other astrology APIs, see asterwise.com/compare.
Usage
Quick Start
- Get an API Key: register for free at asterwise.com/dashboard. The Sandbox tier provides 500 calls per month, no credit card required, no time limit.
- Connect Claude Desktop: add the configuration in ~/Library/Application Support/Claude/claude_desktop_config.json.
- Connect Cursor: add the configuration in the project's .cursor/mcp.json.
- Test the connection.
Authentication Methods (three supported)
- Method One — API Key (Quick Start): pass the Asterwise API Key (starting with aw_) as the Authorization: Bearer <api-key> or X-API-Key: <api-key> header. The two are equivalent; choose based on the MCP client's capabilities.
- Method Two — OAuth 2.1 (Production): exchange the API Key for a short-lived token, returning {"access_token": "...", "expires_in": 3600, ...}, then use Authorization: Bearer <access_token>. VisThe token is a stateless HS256 JWT. The API Key is encrypted with a key derived from JWT_SECRET and carried inside the token, and only the SHA-256 hash of the key appears in the sub claim. JWT_SECRET must be kept confidential.
- Method three — OAuth 2.1 authorization code (for MCP clients: Claude, Cursor, VS Code, Smithery): the client logs in through the standard authorization code flow with PKCE (S256), and the discovery endpoint is at /.well-known/oauth-authorization-server. Two client identification methods are supported:
- Client ID Metadata Documents (currently preferred by the MCP specification): use an HTTPS URL as the client_id. That URL must provide a JSON document in which client_id equals that URL and which contains client_name, redirect_uris, and token_endpoint_auth_method: "none". Such clients are public clients: no secret, PKCE only, and they support the authorization_code and refresh_token grants, with refresh tokens rotated after each use. The redirect URI must be https, or http on localhost / 127.0.0.1 / [::1] (port ignored, per RFC 8252). Copyable reference document:https://asterwise.com/public/oauth/example-client.json。
- Dynamic Client Registration (POST /oauth/register, deprecated in the MCP specification but still supported): returns client_id and client_secret, and the secret is required at /oauth/token.
Server-side retrieval of the metadata document is protected against SSRF (public addresses only, no redirect following, 64 KB, 10 seconds), and it is cached according to the document's Cache-Control: max-age (60 seconds to 24 hours, default 1 hour). The consent page displays the host that published the document.
stdio access
For hosts that use stdio rather than HTTP (Glama hosted builds, local Claude Desktop entries, quick tests): when using stdio, the key comes from ASTERWISE_API_KEY; the server can also start without a key and list tools, but tool calls require a key. Logs are output to stderr.
Running locally
Copy .env.example to .env and set at least the corresponding variables. uvicorn server:app uses the same entry point as the production Dockerfile and railway.toml, so locally it also has authentication middleware, OAuth routes, and /health. Runtime dependencies are pinned in requirements.txt, and requirements-dev.txt adds testing tools.
Use cases
Suitable for scenarios that require Vedic or Western astrological chart casting, dasha calculation, marriage compatibility matching, Panchanga queries, numerology, and tarot drawing within an AI client.
Limitations
- All tools are read-only.
- The free Sandbox tier allows 500 calls per month.
- The official text's description of fees and pricing mentions only the free Sandbox tier; pricing for other tiers is not currently provided.
- Coverage requirement: core modules (auth, client, errors, logging_config, models, runtime, server) are mandatory at 78%, and tool modules are not within the coverage gate (see .coveragerc).
- License: MIT, see LICENSE. For security reports, see SECURITY.md. Status page:https://status.asterwise.com。
- The official text does not provide content such as specific installation commands or the complete list of environment variables, so it is not currently provided.