Astro Skill
Portable Vedic astrology engine, agent skill, and MCP server. Deterministic kundali, dasha, panchang, and yoga calculations with JSON and Hindi/English PDF reports — reusable by any agent or MCP-compatible client.
The repo is split so each layer can be reused on its own:
astro/— the portable skill: calculator scripts, reference data, bundled Swiss Ephemeris + Devanagari font, and tests. Drop it into any agent or call the scripts directly from Python.services/astro_mcp/— a generic stdio MCP server exposing the same calculations plus SQLite storage as 11 stable tools.docs/— architecture, roadmap, deployment, and operations docs.
Features
- Kundali — lagna, rashi, nakshatra + pada, nine grahas (with retrograde), whole-sign houses, and dosha flags (e.g. Mangalik with classical cancellation rules).
- Planetary strength flags — dignity, digbala, vargottama, combustion, graha yuddha, functional benefic/malefic per lagna, and a composite per-planet strength verdict.
- Yogas — Gajakesari, Budhaditya, Pancha Mahapurusha, Raja, Neechabhanga, Vipreet (Harsha/Sarala/Vimala), Kaal Sarp (full/partial), Parivartana (maha/khala/dainya), and more — with cancellation checks where classical.
- Full 12-house bhava data — house lords with placement + strength, occupants, Parashari aspects received, and bhava karakas, surfaced in the report JSON for downstream analysis.
- Gochar narrative — month-by-month (quarterly for long windows) transit sampling across the current antardasha window, with true per-date ephemeris recomputation.
- Remedies data — per-planet mantra/gemstone/fasting/daan/ritual reference (Hindi + English) with prioritization by planetary weakness and running dasha.
- Navamsa (D9) divisional chart in both JSON and the PDF report.
- Vimshottari dasha — mahadasha + antardasha timeline with correct birth-balance handling (the sub-period actually running at birth, not a fresh lord/lord cycle).
- Daily Panchang — tithi, vara, nakshatra, yoga, karana, sunrise/sunset — anchored at sunrise (classical convention), with muhurta and yoga detection.
- Lahiri (Chitrapaksha) sidereal positions, whole-sign houses.
- High precision — bundled Swiss Ephemeris
.se1data (SWIEPH) with an automatic Moshier fallback; each output records the tier used incalculation.ephemeris. - Reports — structured JSON, and a factual PDF (birth summary, Lagna/Navamsa charts, planet table, dasha timeline, Panchang) via the in-process ReportLab renderer. Hindi/English, with a bundled Noto Sans Devanagari font.
- MCP server — 11 tools over stdio, with SQLite-backed client/report storage, input validation, and traversal-safe report filenames.
Pro report tier
This repo is the open engine — deterministic calculations, factual JSON, and a clean ReportLab PDF. On top of it there's a Pro report tier: an LLM-synthesized, pandit-grade Janma Patrika — bilingual narrative for every house, dasha and gochar; an honest chart-driven strength score; prioritized remedies; and a polished, print-ready design.
The engine here is deterministic and yours to build on. The Pro tier is a separate hosted/licensed layer aimed at astrologers and platforms who want a finished, client-ready report.
Want the Pro report tier for your product, practice, or platform? Reach out — adityaryawork@gmail.com.
Install (PyPI)
pip install astro-skill
# Run the stdio MCP server
astro-mcp
# or: python -m services.astro_mcp
Requires Python 3.11+. For development from source, use the editable install below.
Quick start (from source)
git clone https://github.com/adityarya24/astro-skill.git
cd astro-skill
python -m venv .venv && . .venv/bin/activate # Windows: .\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e ".[dev]"
# Checks
python -m pytest -q
python -m ruff check astro services scripts
All tests pass. For OS-specific venv details and MCP client config
examples, see docs/operations/install-smoke.md.
MCP server
services/astro_mcp/ is an importable package and a runnable stdio MCP
server. The same TOOLS registry powers the unit tests and the wire protocol
— no duplicated logic, and no environment variables required.
Tools (11): parse_birth_details, save_client_profile, find_client_profile,
list_client_reports, calculate_kundali, calculate_dasha,
calculate_gochar, calculate_compatibility, calculate_panchang,
generate_report_json, generate_pdf_report.
python -m services.astro_mcp # or `astro-mcp` after `pip install -e .`
Wire it into any MCP client (Claude Desktop, a Codex agent, or your own) by
pointing the client's MCP config at that command with cwd set to the repo
root. See services/astro_mcp/README.md for the
tool contract and config examples, and verify an install in one shot with:
python scripts/smoke_mcp_client.py
Sample commands
# Kundali JSON
python astro/scripts/kundali_calculator.py --dob 26/12/2019 --tob 09:15 \
--place Delhi --lat 28.6139 --lon 77.2090 --timezone Asia/Kolkata --json
# Panchang JSON
python astro/scripts/panchang_calculator.py --date 2026-05-21 \
--place Delhi --lat 28.6139 --lon 77.209 --timezone Asia/Kolkata --json
# Hindi PDF (in-process ReportLab renderer)
python astro/scripts/pdf_report.py --kundali-json chart.json --dasha-json dasha.json \
--panchang-json panchang.json --output report.pdf --language hi
Deployment
Run it as a Docker MCP server or straight from Python. The Dockerfile
builds a slim image (Python, dependencies, Devanagari font, ephemeris data).
See docs/deploy.md for build, run, smoke-test, and
MCP-client wiring instructions.
Documentation
docs/operations/install-smoke.md— fresh-clone install, MCP client config, smoke checklist.docs/deploy.md— Docker / MCP-client deployment.docs/architecture/generic-astro-platform.md— layering and reuse model.docs/architecture/astro-skill-roadmap.md— engine roadmap.services/astro_mcp/README.md— MCP server contract.astro/SKILL.md— agent skill instructions.
Production notes
- Positions use the bundled high-precision Swiss Ephemeris (SWIEPH) out of the box, not the lower-precision Moshier fallback.
- PDF rendering uses the in-process ReportLab backend — no browser dependency.
- Generated runtime data lives under an ignored
data/directory (or a caller-provided output directory). - MCP tools validate their JSON schemas and keep generated filenames detached from caller-controlled identifiers.
- GitHub Actions runs install, tests, ruff, and skill validation on push and pull requests.
Safety boundaries
These rules apply across every layer and downstream product:
- Reports are calculation-backed drafts, intended for review by an astrologer or operator before any final reading is shared.
- Missing birth details must be requested rather than guessed.
- Approximate or partial inputs must be marked clearly in any output.
- Do not generate death, accident, medical, or unavoidable-harm certainty predictions.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astro_skill-2.0.0.tar.gz.
File metadata
- Download URL: astro_skill-2.0.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e37cfa0116915f94022700edcd93b18c798e150adc6cb19f926984687bceb5fa
|
|
| MD5 |
6e71b12e2d4561bf12dc716a3ec14527
|
|
| BLAKE2b-256 |
07e3561f58afcb44824ff21e1958e33db4a5aa5df4c42392826487209afcb415
|
Provenance
The following attestation bundles were made for astro_skill-2.0.0.tar.gz:
Publisher:
release.yml on adityarya24/astro-skill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astro_skill-2.0.0.tar.gz -
Subject digest:
e37cfa0116915f94022700edcd93b18c798e150adc6cb19f926984687bceb5fa - Sigstore transparency entry: 2256207531
- Sigstore integration time:
-
Permalink:
adityarya24/astro-skill@d1df1f6c67936e95a092db780d6c06f6fe204e1b -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/adityarya24
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d1df1f6c67936e95a092db780d6c06f6fe204e1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file astro_skill-2.0.0-py3-none-any.whl.
File metadata
- Download URL: astro_skill-2.0.0-py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27556cd0e4f6e4900d96521579b71aba16b0fa428270867aae912aff78452723
|
|
| MD5 |
8d4c9760a1b6ee928cfd104da394a89c
|
|
| BLAKE2b-256 |
6204b21e8865c45438cfdf53e1165dfd40ae76df34ee4e96cf28b1044a7d52a7
|
Provenance
The following attestation bundles were made for astro_skill-2.0.0-py3-none-any.whl:
Publisher:
release.yml on adityarya24/astro-skill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astro_skill-2.0.0-py3-none-any.whl -
Subject digest:
27556cd0e4f6e4900d96521579b71aba16b0fa428270867aae912aff78452723 - Sigstore transparency entry: 2256207538
- Sigstore integration time:
-
Permalink:
adityarya24/astro-skill@d1df1f6c67936e95a092db780d6c06f6fe204e1b -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/adityarya24
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d1df1f6c67936e95a092db780d6c06f6fe204e1b -
Trigger Event:
push
-
Statement type: