divineapi-western-astrology-mcp

v1.10.0
divineapi-western-astrology-mcp Checked 2 days ago Published 14 days ago

Official MCP server for Divine API's Western Astrology services — Natal, Synastry, Transit, Composite, Progressions

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). 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.

Summary extracted from the README.

Western Astrology MCP Server (Natal Chart, Synastry, Transits) by DivineAPI

Western Astrology MCP Server 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).

Docs Trial MCP PyPI Status License: MIT Ask DeepWiki

Hosted server URL:

https://mcp.divineapi.com/western/mcp

One-click install (adds the hosted server with placeholder credentials):

Add to Cursor Install in VS Code

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-Key and X-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.

  1. Open Customize > Connectors, click + Add, then Add custom connector.
  2. Name: DivineAPI Western Astrology. URL: https://mcp.divineapi.com/western/mcp. Click Continue.
  3. 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, year fields plus hour, min, sec (send sec as 0 if unknown).
  • place is a plain lowercase city string; lat and lon are decimals; tzone is a decimal UTC offset (for example -5 or 5.5), not a zone name.
  • Calculations are tropical. house_system defaults to placidus and accepts placidus, koch, porphyry, regiomontanus, campanus, equal, whole-sign, morinus, alcabitius or the single-letter codes B, 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_details needs a return_key from divine_western_planet_returns_list; divine_western_prenatal_details needs a prenatal_key from divine_western_prenatal_list; divine_western_fixed_stars_details needs star names from divine_western_fixed_stars_list.
  • divine_western_dominants needs method: TRADITIONAL or MODERN.
  • Transit tools need the transit date (and, for weekly, monthly and full reports, a transit_planet).
  • lan sets 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.

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

License

MIT. See LICENSE.