Skip to main content
Glama
DrewCyber

astro-mcp

by DrewCyber

astro-mcp

점성술 MCP 서버 — LLM 에이전트를 위한 고정밀 점성술 도구.

Swiss Ephemeris(pyswisseph)를 기반으로 하는 14개의 도구를 구현하며, 모든 Model Context Protocol 클라이언트(Claude Desktop 등)와 통합됩니다.

도구

#

이름

설명

1

calculate_natal_chart

전체 출생 차트: 행성, 앵글, 하우스, 애스펙트

2

calculate_transits

출생 차트에 대한 트랜싯 애스펙트, 달의 위상, 삭망 및 보이드 오브 코스

3

calculate_secondary_progressions

하루-1년 프로그레션 + 솔라 아크

4

calculate_solar_return

연간 솔라 리턴 차트

5

calculate_rectification_hints

후보 출생 시간을 인생 사건과 대조하여 점수화

6

calculate_lunar_return

월간 루나 리턴 차트

7

calculate_synastry

차트 간 애스펙트 + 하우스 오버레이

8

calculate_composite_chart

미드포인트 또는 데이비슨 컴포지트 차트

9

calculate_profections

연간 프로펙션 — 연주인 및 활성화된 하우스

10

get_planetary_hours

모든 날짜/위치에 대한 24개 행성시

11

calculate_arabic_parts

12개 아라빅 파트/롯(포춘, 스피릿, 메리지 등)

12

get_ephemeris

날짜 범위에 대한 행성 위치 표

13

find_aspect_exact_dates

특정 애스펙트의 정확한 날짜 찾기

14

calculate_antiscia

안티스키아 및 콘트라-안티스키아 포인트, 선택적 트랜싯 접촉 포함

Related MCP server: auseklis

설치

# 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 구성

~/Library/Application Support/Claude/claude_desktop_config.json에 추가:

{
  "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"
      }
    }
  }
}

환경 변수

변수

기본값

설명

EPHE_PATH

./ephe

Swiss Ephemeris .se1 데이터 파일 경로

GEOCODING_PROVIDER

nominatim

nominatim 또는 opencage

OPENCAGE_API_KEY

—

GEOCODING_PROVIDER=opencage인 경우 필수

GEOCODING_USER_AGENT

astro-mcp/1.0

Nominatim 사용자 에이전트

GEOCODE_CACHE_SIZE

512

지오코딩 결과용 LRU 캐시 크기

GEOCODE_CACHE_PATH

~/.cache/astro-mcp/geocode.json

재시작 후에도 조회가 유지되는 영구 지오코드 캐시. 도시 → 위도/경도/시간대만 저장. 비우면 비활성화

DEFAULT_HOUSE_SYSTEM

P

P=플라시두스, W=홀 사인, K=코흐

DEFAULT_ORB_FACTOR

1.0

전역 오브 승수(0.1–3.0)

NODE_TYPE

true

true=트루 노드, mean=민 노드(모든 도구에 일관되게 적용)

LOG_LEVEL

WARNING

Python 로깅 레벨

아키텍처

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 14

출력 형식

모든 도구는 LLM 컨텍스트 토큰을 최소화하기 위해 공백 없는 컴팩트 JSON을 반환합니다(상세 JSON보다 약 75% 작음). 행성 코드는 축약되고(Su, Mo, Me 등), 애스펙트는 3자리 코드(Cnj, Tri, Squ)를 사용하며, 추가 토큰을 절약하기 위해 직행일 때 역행 플래그("R":true)는 생략됩니다.

실패도 동일한 계약을 사용하므로 클라이언트는 문장을 파싱할 필요가 없습니다:

{"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"}

행성 코드

도구 전반에서 지원되는 코드:

  • Su 태양

  • Mo 달

  • Me 수성

  • Ve 금성

  • Ma 화성

  • Ju 목성

  • Sa 토성

  • Ur 천왕성

  • Ne 해왕성

  • Pl 명왕성

  • Ch 키론

  • Li 블랙 문 릴리스(민 아포지)

  • NN 북쪽 노드(기본값은 트루 노드; NODE_TYPE=mean일 때 민 노드)

  • SN 남쪽 노드

  • 소행성(include_asteroids가 지원되는 경우): Ce 세레스, Pa 팔라스, Jun 주노, Ves 베스타

API 참고 사항

  • get_ephemeris는 단일 planet 또는 행성 목록을 허용합니다.

  • get_ephemeris.step은 1h, 2h, 3h, 6h, 12h, 1d, 7d, 30d를 지원합니다.

  • get_ephemeris는 이제 timezone 필드를 반환하고 dt를 output_tz로 형식화합니다.

  • find_aspect_exact_dates.mode는 다음을 지원합니다:

    • 두 이동 천체에 대한 transit-to-transit

    • 출생 행성/앵글에 대한 트랜싯인 transit-to-natal

    • auto(기본값)는 birth_* 존재 여부에서 모드를 추론합니다.

테스트

pytest tests/ -v --cov=src/astro_mcp --cov-report=term-missing

골든 차트 회귀 테스트는 테스트 스위트(tests/test_audit_regressions.py)에 인라인으로 포함되어 있으며 Astro.com 및 Solar Fire와 대조하여 검증되었습니다.

라이선스

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Multi-tradition astrology engine that computes real birth charts, transits, and synastry for AI agents via MCP tools.
    8
    -
  • A
    license
    A
    quality
    C
    maintenance
    Astrology 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.
    12
    61 npm
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Calculates astrological natal charts with high precision using Swiss Ephemeris, supporting multiple house systems and location inputs.
    2
    18 npm
    5
    AGPL 3.0
  • A
    license
    A
    quality
    A
    maintenance
    Vedic 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.
    103
    MIT