Western Astrology MCP Server (Natal Chart, Synastry, Transits) by DivineAPI
Connect Claude, Cursor, VS Code or any Model Context Protocol (MCP) client to DivineAPI's Western astrology data: natal charts, synastry, transits, composite charts, progressions, planetary returns and prenatal charts, returned as JSON (and SVG for wheel charts).
Hosted server URL:
https://mcp.divineapi.com/western/mcp
One-click install (adds the hosted server with placeholder credentials):
After installing, replace YOUR_API_KEY and YOUR_AUTH_TOKEN in the server's headers with your own values. In VS Code you can use the inputs version of the config below instead, so the values are stored securely.
Connect in 1 minute
1. Get your credentials. Start the 14-day free trial (credit card required to activate the trial), then copy your API key and auth token from the DivineAPI dashboard.
2. Add the server to your client. The hosted server accepts your credentials in one of two ways:
- Request headers:
X-Divine-Api-KeyandX-Divine-Auth-Token(Cursor, VS Code, Claude Code). - Sign-in page (OAuth): the client opens a DivineAPI page where you paste the API key and auth token once (Claude.ai and Claude Desktop custom connectors).
Claude.ai and Claude Desktop (custom connector)
Custom connectors added in Claude.ai also appear in Claude Desktop.
- Open Customize > Connectors, click + Add, then Add custom connector.
- Name:
DivineAPI Western Astrology. URL:https://mcp.divineapi.com/western/mcp. Click Continue. - Keep the detected sign-in settings and click Add. When you connect, a DivineAPI sign-in page opens: paste your API key and auth token and click Connect.
If your Claude plan offers request headers for custom connectors, you can instead choose no sign-in and add the two headers X-Divine-Api-Key and X-Divine-Auth-Token.
Team and Enterprise plans: an owner adds the connector under Organization settings > Connectors first. Steps from Claude's custom connector guide.
Cursor
~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"divineapi-western-astrology": {
"url": "https://mcp.divineapi.com/western/mcp",
"headers": {
"X-Divine-Api-Key": "YOUR_API_KEY",
"X-Divine-Auth-Token": "YOUR_AUTH_TOKEN"
}
}
}
}
VS Code (GitHub Copilot agent mode)
.vscode/mcp.json. VS Code asks for both values on first start and stores them securely:
{
"inputs": [
{ "type": "promptString", "id": "divine-api-key", "description": "DivineAPI API key", "password": true },
{ "type": "promptString", "id": "divine-auth-token", "description": "DivineAPI auth token", "password": true }
],
"servers": {
"divineapi-western-astrology": {
"type": "http",
"url": "https://mcp.divineapi.com/western/mcp",
"headers": {
"X-Divine-Api-Key": "${input:divine-api-key}",
"X-Divine-Auth-Token": "${input:divine-auth-token}"
}
}
}
}
Claude Code
claude mcp add --transport http divineapi-western-astrology https://mcp.divineapi.com/western/mcp \
--header "X-Divine-Api-Key: YOUR_API_KEY" \
--header "X-Divine-Auth-Token: YOUR_AUTH_TOKEN"
Run /mcp inside Claude Code to check the connection.
Clients that send only one credential field
If a client can send only a single bearer token and no custom headers, send Authorization: Bearer YOUR_API_KEY:YOUR_AUTH_TOKEN (API key, a colon, then the auth token). The server splits it into the two credentials.
Example prompts
- "I was born on 24 May 1990 at 14:40 in New Delhi. Draw my natal wheel chart and list my planets, houses and aspects (Placidus)."
- "Compare my chart with my partner's: show the synastry aspect table and the emotional and financial compatibility readings."
- "Which transits hit my natal chart this week? Use Saturn as the transit planet."
- "Build our composite chart and list its planetary positions."
- "When is my next Saturn return, and what are its details?"
- "Show my secondary progressions and progressed lunar events for this year."
Tool groups
The table groups the tools defined in server.py. The hosted server is updated more often and can offer more tools; your MCP client always shows the live list.
| Group | What they cover | Host |
|---|---|---|
| Natal | Planetary positions, house cusps, aspect table, natal wheel chart (SVG), general sign report, general house report, Moon phases, ascendant report, Moon phase calendar, natal insights | astroapi-4 (wheel on astroapi-8) |
| Synastry | Planetary positions and house cusps for both people, bi-wheel chart, inter-chart aspect table, harmonious / conflicting / contrasting / intense aspect readings, physical, emotional, sexual, spiritual and financial compatibility | astroapi-4 (wheel and aspect table on astroapi-8) |
| Transits | Basic transit, custom transit (any moment and place), daily, weekly and monthly transits, transit house overlay, full transit, retrograde and combustion transits, transit wheel chart, transit planetary positions, planetary ingress | astroapi-4 and astroapi-8 |
| Composite | Composite planetary positions, house cusps, aspect table, wheel chart | astroapi-8 |
| Advanced natal | Arabic lots, asteroid positions, fixed stars list and details, planetary midpoints, eclipses, declinations and parallels, aspect patterns, chart shape, other minor bodies, dominants | astroapi-8 |
| Progressions and returns | Planet returns list and return details, progressed lunar events, planetary arc directions, secondary progressions | astroapi-8 |
| Prenatal | Prenatal list and prenatal details | astroapi-8 |
All tools are read-only (readOnlyHint: true) and each tool call makes one request to the DivineAPI REST API.
Inputs the model needs to know
- Dates are separate
day,month,yearfields plushour,min,sec(sendsecas0if unknown). placeis a plain lowercase city string;latandlonare decimals;tzoneis a decimal UTC offset (for example-5or5.5), not a zone name.- Calculations are tropical.
house_systemdefaults toplacidusand acceptsplacidus,koch,porphyry,regiomontanus,campanus,equal,whole-sign,morinus,alcabitiusor the single-letter codesB, C, E, K, M, O, P, R, W. - Two-person tools (synastry, composite) take a birth block for each person.
- Two-step tools:
divine_western_planet_return_detailsneeds areturn_keyfromdivine_western_planet_returns_list;divine_western_prenatal_detailsneeds aprenatal_keyfromdivine_western_prenatal_list;divine_western_fixed_stars_detailsneeds star names fromdivine_western_fixed_stars_list. divine_western_dominantsneedsmethod:TRADITIONALorMODERN.- Transit tools need the transit date (and, for weekly, monthly and full reports, a
transit_planet). lansets the response language. Western text reports support 12 languages:en,hi,ja,ru,pt,es,fr,de,it,nl,pl,tr.
Self-hosting
You only need this if you want to run the server yourself instead of using the hosted URL. The server reads your credentials from two environment variables: DIVINE_API_KEY and DIVINE_AUTH_TOKEN.
Local (stdio) with uv or pip
# uv (no install step)
uvx divineapi-western-astrology-mcp
# or pip
pip install divineapi-western-astrology-mcp
divineapi-western-astrology-mcp
Claude Desktop local config (claude_desktop_config.json; on macOS ~/Library/Application Support/Claude/, on Windows %APPDATA%\Claude\):
{
"mcpServers": {
"divineapi-western-astrology": {
"command": "uvx",
"args": ["divineapi-western-astrology-mcp"],
"env": {
"DIVINE_API_KEY": "YOUR_API_KEY",
"DIVINE_AUTH_TOKEN": "YOUR_AUTH_TOKEN"
}
}
}
}
To run exactly this repository's code:
git clone https://github.com/DivineAPI/mcp-western-astrology.git
cd mcp-western-astrology
pip install .
DIVINE_API_KEY=YOUR_API_KEY DIVINE_AUTH_TOKEN=YOUR_AUTH_TOKEN divineapi-western-astrology-mcp
Remote (streamable HTTP) with Docker
docker build -t divineapi-western-mcp .
docker run -p 8000:8000 -e MCP_JWT_SECRET=a-long-random-string divineapi-western-mcp
The MCP endpoint is then http://localhost:8000/mcp. Clients send their own X-Divine-Api-Key and X-Divine-Auth-Token headers. docker compose up maps the same server to port 8002 and passes the variables below from your shell.
| Variable | Used for |
|---|---|
DIVINE_API_KEY, DIVINE_AUTH_TOKEN |
Your DivineAPI credentials. Required in stdio mode; in HTTP mode, per-request headers or the sign-in page override them |
MCP_TRANSPORT |
stdio (default) or http (set by the Dockerfile) |
MCP_HOST |
Public host name for the OAuth sign-in flow and allowed hosts (default mcp.divineapi.com) |
MCP_JWT_SECRET |
Secret that signs session tokens. Set a fixed value so sign-ins survive restarts |
The OAuth sign-in flow expects HTTPS on MCP_HOST behind a reverse proxy that serves the server under /western/. Header authentication works without it.
Which plan includes this
The tools call the Western endpoints, so they use your Western plan (Western Nova, Western Atlas or Western Lumen); a tool works when your plan includes its endpoint. Compare plans at divineapi.com/pricing.
FAQ
Do I need a DivineAPI account to use the Western tools? Yes. Natal, synastry and transit tools call the Western REST endpoints with your API key and auth token, so a tool works when your Western plan includes its endpoint. Start with the 14-day free trial (credit card required to activate the trial); plans and prices are at divineapi.com/pricing.
Which MCP clients can draw a natal chart with it?
Clients with remote MCP support over streamable HTTP, such as Claude.ai, Claude Desktop, Claude Code, Cursor and VS Code. For a local-only client, uvx divineapi-western-astrology-mcp starts the same tools over stdio and reads DIVINE_API_KEY and DIVINE_AUTH_TOKEN.
Tropical or sidereal? Tropical, calculated with Swiss Ephemeris. For sidereal (Vedic) charts use the Vedic astrology MCP server.
Can it draw wheel charts? Yes. The natal, synastry (bi-wheel), transit and composite wheel tools return chart images.
My client lists synastry or transit tools that are not in the table. Why?
The table follows this repository's server.py. The hosted server and the PyPI package can be newer, and your client always shows the live list.
I want the REST API, not MCP.
Use the birth-chart-api repo or the API reference. SDKs: pip install divineapi, npm install divineapi, composer require divineapi/divineapi.
Related repos
| Repo | What it is |
|---|---|
| birth-chart-api | Western birth chart / natal chart REST API quickstart |
| astrology-api | Overview of all DivineAPI domains |
| mcp-indian-astrology | Vedic astrology MCP server |
| mcp-horoscope-numerology | Horoscope, tarot and numerology MCP server |
| divineapi-python | Python SDK (pip install divineapi) |
| divineapi-node | Node.js / TypeScript SDK (npm install divineapi) |
| divineapi-php | PHP SDK (composer require divineapi/divineapi) |
Support
- MCP overview: divineapi.com/mcp
- API reference: developers.divineapi.com/western-api
- Help center: support.divineapi.com
- API status: status.divineapi.com
License
MIT. See LICENSE.
Metadata
Release files for divineapi-western-astrology-mcp 1.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| divineapi_western_astrology_mcp-1.10.0.tar.gz | 64.0 kB | Without provenance | Details for divineapi_western_astrology_mcp-1.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| divineapi_western_astrology_mcp-1.10.0-py3-none-any.whl | Python 3 | none | any | Details for divineapi_western_astrology_mcp-1.10.0-py3-none-any.whl |
Total release size: 98.1 kB
Release files / divineapi_western_astrology_mcp-1.10.0.tar.gz
| Download URL | divineapi_western_astrology_mcp-1.10.0.tar.gz |
|---|---|
| Size | 64.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b41c79f2d2f2ca5af3dc0babe6fc36c9e6c1cde3b2031d952fb5a15162b8663a
|
|
BLAKE2b-256 checksum How to use checksums |
3ec1edb14346846534445755d85d7d75ec70d1430eba83e7dd72a1f51417be11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.13
|
Release files / divineapi_western_astrology_mcp-1.10.0-py3-none-any.whl
| Download URL | divineapi_western_astrology_mcp-1.10.0-py3-none-any.whl |
|---|---|
| Size | 34.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e2c2f2c0266257a5c9d4ac56363d8329ba607fcf2b936e0f0a6f07737eccbc3
|
|
BLAKE2b-256 checksum How to use checksums |
d64d2e5aa62bbaf73b39a6ab7bdf5ac9c5eda06e59a6ae6ea51eadf03270a215
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.13
|
Security for divineapi-western-astrology-mcp 1.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.