astro-mcp
astro-mcp
Astrologischer MCP-Server – hochpräzise Astrologie-Werkzeuge für LLM-Agenten.
Implementiert 14 Werkzeuge, die auf Swiss Ephemeris (pyswisseph) basieren, und integriert sich in jeden Model Context Protocol-Client (Claude Desktop usw.).
Werkzeuge
# | Name | Beschreibung |
1 |
| Vollständiges Geburtshoroskop: Planeten, Winkel, Häuser, Aspekte |
2 |
| Transit-Aspekte zum Geburtshoroskop, Mondphase, Lunationen und Mond ohne Aspekte |
3 |
| Tag-für-Jahr-Progressionen + Solar Arc |
4 |
| Jährliches Sonnenrückkehr-Horoskop |
5 |
| Bewertet Kandidaten-Geburtszeiten anhand von Lebensereignissen |
6 |
| Monatliches Mondrückkehr-Horoskop (bzw. -Horoskope) |
7 |
| Aspekte zwischen Horoskopen + Hausüberlagerungen |
8 |
| Mittelpunkt- oder Davison-Composite-Horoskop |
9 |
| Jährliche Profektion – Jahresherr und aktivierte Häuser |
10 |
| 24 Planetenstunden für jeden Tag/Ort |
11 |
| 12 arabische Teile / Lose (Glückspunkt, Geist, Ehe usw.) |
12 |
| Tabelle der Planetenpositionen über einen Datumsbereich |
13 |
| Findet genaue Daten eines bestimmten Aspekts |
14 |
| Antiskia- und Kontra-Antiskia-Punkte, optional mit Transiten |
Related MCP server: auseklis
Installation
# 1. Clone
git clone https://github.com/DrewCyber/astro-mcp
cd astro-mcp
# 2. Create virtual environment
python3.11 -m venv .venv
source .venv/bin/activate
# 3. Install package + dev dependencies
pip install -e ".[dev]"
# 4. Download Swiss Ephemeris data files
bash scripts/download_ephe.sh
# 5. Set environment variable
export EPHE_PATH="$(pwd)/ephe"
# 6. Run tests
pytest tests/Claude Desktop-Konfiguration
Fügen Sie Folgendes zu ~/Library/Application Support/Claude/claude_desktop_config.json hinzu:
{
"mcpServers": {
"astro": {
"command": "/path/to/astro-mcp/.venv/bin/python",
"args": ["-m", "astro_mcp"],
"env": {
"EPHE_PATH": "/path/to/astro-mcp/ephe",
"GEOCODING_PROVIDER": "nominatim",
"GEOCODING_USER_AGENT": "astro-mcp/1.0",
"LOG_LEVEL": "WARNING"
}
}
}
}Umgebungsvariablen
Variable | Standard | Beschreibung |
|
| Pfad zu den Swiss-Ephemeris- |
|
|
|
| — | Erforderlich, wenn |
|
| Nominatim-Benutzeragent |
|
| LRU-Cache-Größe für Geocoding-Ergebnisse |
|
| Persistenter Geocode-Cache, damit Lookups einen Neustart überleben. Speichert nur Stadt → Breite/Länge/Zeitzone. Leer lassen, um zu deaktivieren |
|
|
|
|
| Globaler Orbis-Multiplikator (0.1–3.0) |
|
|
|
|
| Python-Logging-Stufe |
Architektur
src/astro_mcp/
├── server.py # MCP server — tool registration and dispatch
├── schemas.py # Pydantic input models (source of the JSON schemas)
├── config.py # Settings from environment variables
├── core/
│ ├── models.py # Data models and astrological constants
│ ├── errors.py # AstroError and the structured error codes
│ ├── ephemeris_provider.py # Swiss Ephemeris wrapper (pyswisseph)
│ ├── geocoding.py # City → lat/lon/tz (geopy + timezonefinder)
│ ├── moon.py # Lunar phase, lunations and void-of-course
│ └── formatters.py # LLM-optimized serialization
└── tools/
├── natal.py # Tool 1
├── transits.py # Tool 2
├── progressions.py # Tool 3
├── returns.py # Tools 4 + 6
├── rectification.py # Tool 5
├── synastry.py # Tools 7 + 8
├── profections.py # Tool 9
├── planetary_hours.py # Tool 10
├── arabic_parts.py # Tool 11
├── ephemeris.py # Tools 12 + 13
└── antiscia.py # Tool 14Ausgabeformat
Alle Werkzeuge geben kompaktes JSON ohne Leerzeichen zurück, um LLM-Kontext-Token zu minimieren (etwa 75 % kleiner als ausführliches JSON). Planetenkürzel werden abgekürzt (Su, Mo, Me usw.), Aspekte verwenden 3-Buchstaben-Codes (Cnj, Tri, Squ), und das Rückläufigkeits-Flag ("R":true) wird weggelassen, wenn direkt, um zusätzliche Token zu sparen.
Fehler verwenden denselben Vertrag, sodass ein Client nie Prosa parsen muss:
{"error":true,"code":"INPUT_ERROR","message":"Invalid arguments for 'calculate_natal_chart'.","hint":"birth_location.lat: Input should be less than or equal to 90"}Planetenkürzel
Unterstützte Codes in allen Werkzeugen:
SuSonneMoMondMeMerkurVeVenusMaMarsJuJupiterSaSaturnUrUranusNeNeptunPlPlutoChChironLiSchwarzer Mond Lilith (mittlerer Apogäum)NNNordknoten (standardmäßig wahrer Knoten; mittlerer Knoten beiNODE_TYPE=mean)SNSüdknotenAsteroiden (wo
include_asteroidsunterstützt wird):CeCeres,PaPallas,JunJuno,VesVesta
API-Hinweise
get_ephemerisakzeptiert entweder einen einzelnenplanetoder eine Liste von Planeten.get_ephemeris.stepunterstützt1h,2h,3h,6h,12h,1d,7d,30d.get_ephemerisgibt jetzt eintimezone-Feld zurück und formatiertdtinoutput_tz.find_aspect_exact_dates.modeunterstützt:transit-to-transitfür zwei bewegte Körpertransit-to-natalfür Transit zu einem natalen Planeten/Winkelauto(Standard) leitet den Modus aus dem Vorhandensein vonbirth_*ab
Tests
pytest tests/ -v --cov=src/astro_mcp --cov-report=term-missingGolden-Chart-Regressionen sind inline in der Testsuite (tests/test_audit_regressions.py) enthalten und wurden gegen Astro.com und Solar Fire verifiziert.
Lizenz
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Swiss Ephemeris for AI agents: exact natal charts, transits, synastry and birth-place resolution
Western natal charts, horoscopes, transits and synastry for AI agents, verified vs NASA JPL.
Real astrology for AI agents: cosmic weather, synastry, timing, astrocartography, and divination.
Vedic and Western astrology for AI agents: charts, dasha, matchmaking, panchanga, numerology, tarot.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMulti-tradition astrology engine that computes real birth charts, transits, and synastry for AI agents via MCP tools.8-
- AlicenseAqualityCmaintenanceAstrology MCP server that computes natal charts, transits, synastry, progressions, returns, eclipses, retrogrades, and moon phases from a real ephemeris, enabling AI agents to provide accurate astrological calculations without hallucination.1261 npm1MIT
- AlicenseAqualityDmaintenanceCalculates astrological natal charts with high precision using Swiss Ephemeris, supporting multiple house systems and location inputs.218 npm5AGPL 3.0
- AlicenseAqualityAmaintenanceVedic and Western astrology for AI agents: 103 read-only tools for natal charts, dasha, kundali matching with Rajju and Vedha vetoes, panchanga, numerology and tarot, backed by Swiss Ephemeris and verified against NASA JPL Horizons.103MIT