mcp-stargazing
mcp-stargazing
지구상의 모든 위치에 대해 천체(태양, 달, 행성, 별 및 심우주 천체)의 고도, 뜨는 시간, 지는 시간을 계산하며, 선택적으로 광공해 분석 기능을 제공합니다.
주요 기능
고도/방위각 계산: 모든 천체의 고도와 나침반 방향을 확인합니다.
뜨는 시간/지는 시간: 천체가 지평선 위로 나타나거나 사라지는 시간을 결정합니다.
광공해 분석: 광공해 지도(GeoTIFF 형식)를 로드하고 분석합니다.
코드 실행 준비 완료:
직렬화 가능한 반환값: 모든 도구는 JSON 직렬화가 가능한 데이터(날짜는 ISO 문자열)를 반환하므로 LLM에서 직접 사용할 수 있습니다.
페이지네이션:
analysis_area는 대규모 데이터 세트를 효율적으로 처리하기 위해 페이지네이션(page,page_size)을 지원합니다.표준화된 응답: 더 나은 관측 가능성과 오류 처리를 위해
{ "data": ..., "_meta": ... }형태의 통일된 응답 형식을 사용합니다.
성능:
비동기 실행: 차단되지 않는 천체 계산.
캐싱: Simbad 쿼리 및 지역 분석을 위한 지능형 캐싱.
프록시 지원: HTTP/HTTPS 프록시에 대한 기본 지원(천문 데이터 다운로드 시 유용).
시간대 인식: 현지 시간 또는 UTC 시간으로 작동합니다.
데이터 기반: 스마트 추천을 위해 10,000개 이상의 심우주 천체(Messier 및 NGC) 데이터베이스가 통합되어 있습니다.
Related MCP server: chuk-mcp-celestial
설치
이 프로젝트는 의존성 관리를 위해 uv를 사용합니다.
로컬 설치
uv설치:pip install uv의존성 동기화:
uv sync이 명령은
.venv에 가상 환경을 생성하고pyproject.toml에 정의된 모든 의존성을 설치합니다.환경 활성화:
source .venv/bin/activate데이터 초기화 (Nightly Planner에 필요): 최신 Messier 및 NGC 카탈로그 데이터를
src/data/objects.json으로 다운로드합니다.python scripts/download_data.py참고: 방화벽 뒤에 있는 경우, 이 스크립트를 실행하기 전에
HTTP_PROXY환경 변수가 설정되어 있는지 확인하십시오.
Docker 설치
모든 의존성과 데이터 초기화를 자동으로 처리하는 Docker를 사용하여 서버를 실행할 수도 있습니다.
이미지 빌드:
docker build -t mcp-stargazing .참고: 프록시 뒤에 있는 경우 빌드 중에 프록시 URL을 전달하십시오:
docker build --build-arg HTTP_PROXY=http://127.0.0.1:7890 -t mcp-stargazing .컨테이너 실행:
# Basic run (SHTTP mode on port 3001) docker run -p 3001:3001 mcp-stargazing # With Environment Variables docker run -p 3001:3001 \ -e QWEATHER_API_KEY=your_key \ -e STARGAZING_DB_CONFIG=your_db_config \ mcp-stargazing
MCP 서버 사용법
AI 에이전트나 다른 클라이언트에 도구를 노출하려면 MCP 서버를 시작하십시오.
1. 환경 설정
.env 파일을 생성하거나 변수를 내보냅니다:
# Weather tools
# 推荐:使用你账号专属的 API Host(公共域名将从 2026 年起逐步停止服务)
export QWEATHER_API_HOST="abc1234xyz.def.qweatherapi.com"
# 鉴权(二选一)
# 1) API KEY(兼容旧用法)
export QWEATHER_API_KEY="your_api_key"
# 2) JWT(推荐,更安全)
# export QWEATHER_JWT_TOKEN="your_jwt_token"
# 如需临时兼容旧公共域名(不推荐),显式开启:
# export QWEATHER_ALLOW_PUBLIC_HOST=1
# Optional: Proxy for downloading astronomical data (Simbad/IERS)
# Highly recommended if you are in a restricted network environment
export HTTP_PROXY="http://127.0.0.1:7890"
export HTTPS_PROXY="http://127.0.0.1:7890"2. 서버 시작
Streamable HTTP (SHTTP) 모드 (대부분의 에이전트에 권장):
# Basic start
python -m src.main --mode shttp --port 3001 --path /shttp
# With proxy explicitly passed (overrides env vars)
python -m src.main --mode shttp --port 3001 --path /shttp --proxy http://127.0.0.1:7890SSE 모드:
python -m src.main --mode sse --port 3001 --path /sse3. 응답 형식
모든 도구는 표준화된 JSON 형식으로 데이터를 반환합니다:
{
"data": {
// Tool-specific return data
"altitude": 45.5,
"azimuth": 180.0
},
"_meta": {
"version": "1.0.0",
"status": "success"
}
}4. 사용 가능한 도구
get_celestial_pos: 고도/방위각 계산.get_celestial_rise_set: 뜨는 시간/지는 시간 계산 (ISO 문자열 반환).get_moon_info: 상세한 달의 위상, 조명 및 나이 정보.get_visible_planets: 현재 지평선 위에 있는 모든 행성의 위치 목록.get_constellation: 별자리 중심의 위치(고도/방위각) 찾기.get_nightly_forecast: 오늘 밤 관측하기 가장 좋은 천체(행성 + 심우주) 목록을 반환하는 스마트 플래너.get_weather_by_name/get_weather_by_position: 현재 날씨 가져오기.get_local_datetime_info: 현재 현지 시간 정보 가져오기.analysis_area: 특정 지역에서 가장 좋은 별 관측 장소 찾기.입력값:
top_left,bottom_right,time,page,page_size.반환값: 관측 조건이 포함된 장소 목록 및 페이지네이션 메타데이터(
total,resource_id).
예제
Nightly Planner:
python examples/nightly_forecast_demo.py달빛을 고려하여 오늘 밤 볼 수 있는 행성과 심우주 천체의 엄선된 목록을 보여줍니다.
Visible Planets:
python examples/visible_planets_demo.py현재 떠 있는 행성 목록을 보여줍니다.
Moon Info:
python examples/moon_phase_demo.py30일간의 달 위상 달력을 출력합니다.
Orchestration:
python examples/code_execution_orchestration.py전체 워크플로우 시연: 시간 가져오기 -> 천체 위치 가져오기 -> 날씨 확인 -> 장소 찾기.
표준화된 응답 형식을 프로그래밍 방식으로 처리하는 방법을 보여줍니다.
Pagination:
python examples/pagination_demo.pyresource_id를 사용하여 대규모 결과 세트를 페이지별로 가져오는 방법을 시연합니다.
프로젝트 구조
유지보수성과 코드 실행 지원을 위해 프로젝트가 모듈화되어 있습니다:
.
├── src/
│ ├── functions/ # Tool implementations grouped by domain
│ │ ├── celestial/ # Celestial calculations (pos, rise/set)
│ │ ├── weather/ # Weather API integration
│ │ ├── places/ # Location and area analysis
│ │ └── time/ # Time utilities
│ ├── cache.py # Caching logic for analysis results
│ ├── response.py # Standardized response formatting
│ ├── server_instance.py # FastMCP server instance (avoids circular imports)
│ ├── main.py # Entry point and tool registration
│ ├── celestial.py # Core astronomy logic (Astropy wrappers)
│ ├── placefinder.py # Grid analysis logic
│ └── qweather_interaction.py # Weather API client
├── tests/ # Unified test suite
│ ├── test_celestial.py
│ ├── test_weather.py
│ ├── test_serialization.py # Validates JSON return formats
│ └── test_integration.py # End-to-end flow tests
├── examples/ # Usage examples
├── docs/ # Documentation and improvement plans
└── pyproject.toml # Project configuration and dependencies테스트
통합 테스트 모음을 실행합니다:
pytest tests/주요 테스트 항목:
test_serialization.py: 모든 도구가 올바른 스키마를 가진 유효한 JSON을 반환하는지 확인합니다.test_integration.py: 외부 API를 모킹하여 전체 도구 체인을 검증합니다.
기여
Code Execution with MCP 모범 사례를 따르십시오.
모든 새 도구는
src.response.format_response를 사용하여 표준 JSON 응답을 반환해야 합니다.새로운 기능에 대한 테스트를
tests/에 추가하십시오.
Available Tools
21 toolsanalysis_areaA
Analyze a geographic area for suitable stargazing locations.
Use when: you need synchronous place candidates or cached pages for a fixed regional query. Do not use when: the search needs background polling/cancellation or a complete night plan. Requires: south/west/north/east bounds; keep search parameters fixed while changing pages. Follow-up: analysis_area with the same query for other pages; submit_area_analysis for background work; plan_stargazing_session for dates, weather, and target decisions.
This tool searches for dark, accessible locations with good viewing conditions. Results are cached based on search parameters. Server configuration changes can invalidate cached pages without changing resource_id. A configuration change during calculation returns structured CONFIGURATION_ERROR; resubmit after the configuration is stable. Cache lifetime is not source-data age.
Fast mode: Set road_radius_km=0 to skip road connectivity checks.
This avoids OSMnx network downloads from Overpass API and is much faster —
use it when you only need candidate locations with light pollution and
elevation data, without road distance analysis.
Args: south, west, north, east: Bounding box coordinates. max_locations: Maximum number of candidate locations to find (before pagination). min_height_diff: Minimum elevation difference for prominence. road_radius_km: Search radius for road access. Set to 0 to skip road checks. network_type: Type of road network ('drive', 'walk', etc.). avoid_popular_spots: Penalize heuristically popular locations when ranking results. prefer_quiet_at_night: Favor locations that are likelier to quiet down at night. popularity_radius_km: Preference horizon for the popularity heuristics. db_config_path: Optional path to database config. page: Page number (1-based). page_size: Number of results per page.
Returns: Dict with keys "data", "_meta". "data" contains: - items: List of location results for the current page. - total: Total number of locations found. - page: Current page number. - page_size: Current page size. - resource_id: Cache key for the non-pagination search parameters.
Inputs: east (required), west (required), north (required), south (required), +10 more. Returns: object
cancel_area_analysis_taskAIdempotent
Logically cancel queued/running area work and discard its late results.
Use when: a submitted area task is no longer needed and its late result must not publish. Do not use when: you want to delete cached data or interrupt another domain's operation. Requires: task_id returned by submit_area_analysis in the same server runtime. Returns: idempotent cancellation snapshot; an existing terminal state stays unchanged. A running provider call keeps its execution slot until it actually finishes. Follow-up: get_area_analysis_task to confirm state and execution_pending; wait for physical work to drain before considering resubmission.
Inputs: task_id (required). Returns: object
get_area_analysis_resultARead-onlyIdempotent
Page a successful area task's existing cached result without recomputing.
Use when: get_area_analysis_task reports succeeded and you need its original result pages. Do not use when: the task is queued/running and you only need to poll its state. Requires: the successful task_id, page >= 1, and page_size >= 1. Returns: cached items, pagination metadata, and resource_id with the task's publication version checked; this call never silently recomputes missing data. Follow-up: get_area_analysis_result with the same task_id for other pages; get_area_analysis_task for state; resubmit the normalized request on TASK_RESULT_EXPIRED.
Inputs: task_id (required), page, page_size. Returns: object
get_area_analysis_taskARead-onlyIdempotent
Poll an area task's state, deadline, failure, and normalized request.
Use when: you have a task_id and need execution state, failure, or remaining physical work. Do not use when: you need result pages; do not submit a new job merely to poll. Requires: task_id returned by submit_area_analysis in the same server runtime. Returns: task snapshot with state, failure, request, and execution_pending. Running progress is unknown; success does not guarantee the separate result cache still exists. Follow-up: get_area_analysis_result after success; cancel_area_analysis_task if unwanted. On TASK_RUNTIME_CHANGED, resubmit the original request rather than polling the old ID.
Inputs: task_id (required). Returns: object
get_best_stargazing_planA
Create a composite stargazing plan for a region and time.
Use when: an existing bbox-first integration needs ranked regional places for one night. Do not use when: starting a new intent-based integration, providing a place name, comparing several nights, or only requesting weather facts. Requires: south/west/north/east bounds, observation time, and timezone. Returns: data.query, ranked data.candidates with scores, windows, weather and targets, and data.summary; all within the standard response envelope. recommendation_score is a relative ranking, not a probability or go/no-go threshold. _meta.status=success can still contain summary.warnings and candidate notes. Only candidates with dated weather and a usable window can be recommended. Missing-weather references retain their place weight without renormalization; weather base score/contribution/weight are zero compatibility placeholders, not bad-weather facts. summary.recommended_location_name is null when none qualify. Missing night-hour weather is unknown, not clear; a null best_observation_window is not an all-night opening. night_window is civil darkness (Sun below -6 degrees), not astronomical darkness (-18 degrees) or guaranteed exposure time. Inspect the returned candidate coordinates; a regional result is not a fixed-site plan. Follow-up: plan_stargazing_session is preferred for new integrations; get_multiday_stargazing_plan preserves bbox-first comparison across nights.
Inputs: east (required), time (required), west (required), north (required), +14 more. Returns: object
get_celestial_posA
Calculate the altitude and azimuth angles of a celestial object.
Use when: you need one named object's position at a specified place and instant. Do not use when: you need an all-night target list or a complete observing decision. Requires: object name, observer coordinates, observation time, and its IANA timezone. Follow-up: get_celestial_rise_set for events; get_nightly_forecast for night targets; plan_stargazing_session for a complete observing decision.
Args: celestial_object: Name of object (e.g. "sun", "moon", "andromeda") lon: Observer longitude in degrees lat: Observer latitude in degrees time: Observation time string "YYYY-MM-DD HH:MM:SS" time_zone: IANA timezone string
Returns: Dict with keys "data", "_meta". "data" contains "altitude" and "azimuth" (degrees).
Inputs: lat (required), lon (required), time (required), time_zone (required), +1 more. Returns: object
get_celestial_rise_setA
Calculate the rise and set times of a celestial object.
Use when: you need one object's rise/set events. Choose calendar_day for the local date containing time, or next_events for the next rise and next set after time. Do not use when: you need a continuous observing window or a complete night plan. Requires: object name, observer coordinates, time, timezone, and the intended event scope. Follow-up: get_celestial_pos for position; plan_stargazing_session for observing windows.
Args:
celestial_object: Name of object (e.g. "sun", "moon", "andromeda")
lon: Observer longitude in degrees
lat: Observer latitude in degrees
time: Date string "YYYY-MM-DD HH:MM:SS"
time_zone: IANA timezone string
event_scope: "calendar_day" (default) finds the events in the local calendar
day containing time. "next_events" finds the next rise and next set
independently, rolling into following days when needed.
Returns: Dict with keys "data", "_meta". "data" contains "rise_time" and "set_time".
Inputs: lat (required), lon (required), time (required), time_zone (required), +2 more. Returns: object
get_constellationA
Get the position (altitude/azimuth) of the center of a constellation.
Use when: you need a named constellation's center position at a place and instant. Do not use when: you need to identify which constellation contains arbitrary coordinates, or to choose individual observing targets. Requires: constellation name, observer coordinates, time, and timezone. Follow-up: get_nightly_forecast for individual night targets; plan_stargazing_session for a complete observing decision.
Args: constellation_name: Name of constellation (e.g. "Orion", "Ursa Major") lon: Observer longitude in degrees lat: Observer latitude in degrees time: Observation time string "YYYY-MM-DD HH:MM:SS" time_zone: IANA timezone string
Returns: Dict with keys "data", "_meta". "data" contains name, altitude, azimuth.
Inputs: lat (required), lon (required), time (required), time_zone (required), +1 more. Returns: object
get_local_datetime_infoA
Retrieve the current datetime and timezone.
Use when: you need the server environment's current time and local timezone. Do not use when: you need time at a remote observing site or already have its timezone. Requires: no inputs; local means the server environment, not the user's observing site. Follow-up: use the observing site's explicit time_zone in celestial and plan_stargazing_session requests; do not infer it from the server timezone.
Returns: Dict with keys "data", "_meta". "data" contains "current_time" (ISO string).
Inputs: no named parameters. Returns: object
get_moon_infoA
Get detailed information about the Moon's phase and position.
Use when: you need lunar phase or illumination facts, with optional observer-local events. Do not use when: you need to rank observing sites or assess a target's overall suitability. Requires: time and timezone; supply both lat and lon for local position and rise/set. Follow-up: get_telescope_targets for equipment-aware targets; plan_stargazing_session for the combined effect of moonlight, weather, place, and observing goals.
When lat and lon are provided, also returns the Moon's local
altitude, azimuth, moonrise, and moonset relative to the observer.
Args: time: Date string "YYYY-MM-DD HH:MM:SS" time_zone: IANA timezone string lat: Observer latitude in degrees (optional, for local position) lon: Observer longitude in degrees (optional, for local position)
Returns: Dict with keys "data", "_meta". "data" contains illumination, phase_name, age_days, elongation, earth_distance, and optionally altitude/azimuth plus moonrise/moonset (UTC unix timestamps).
Inputs: time (required), time_zone (required), lat, lon. Returns: object
get_multiday_stargazing_planA
Compare one to seven consecutive nights and recommend the best night and place.
Use when: an existing bbox-first integration compares one to seven consecutive nights. Do not use when: starting a new intent-based integration, querying nonconsecutive dates, more than seven nights, or checking background task status. Requires: south/west/north/east bounds, local start_date, timezone, and optional night count. Returns: normalized data.query, per-night plans, the best night, and summary; each night uses its own civil-dark window. recommendation_score is a relative ranking, not a probability or go/no-go threshold. _meta.status=success can still contain per-night errors, warnings and candidate notes. Compare the dated forecast hours for each night; do not reuse summary.current or summary.daily as night weather. Missing night-hour coverage is unknown, not clear. Civil darkness (Sun below -6 degrees) is not astronomical darkness (-18 degrees) or guaranteed exposure time; a null best_observation_window is not an all-night opening. Follow-up: plan_stargazing_session is preferred for new integrations; get_best_stargazing_plan for the compatible single-night regional detail.
Inputs: east (required), west (required), north (required), south (required), +15 more. Returns: object
get_nightly_forecastA
Get a curated list of best objects to view for the night.
Use when: place and night are known and you need general night targets and a night window. Do not use when: you need telescope-specific target matching or regional site selection. Requires: observer coordinates, time within the intended night, timezone, and optional limit. Interpretation: this is an astronomy forecast, not a weather forecast. Deep-sky altitude and score are evaluated at the supplied time; deep_sky.score sorts lower first and must not be compared with telescope suitability_score (higher first). The legacy transit_alt is an altitude estimate at that scoring time, not a separately solved meridian transit. night_window is civil darkness (Sun below -6 degrees), not astronomical darkness (-18 degrees) or guaranteed exposure time. Follow-up: get_telescope_targets for known optics; get_shooting_plan for an imaging schedule; plan_stargazing_session when place or night still needs comparison.
Args: lon: Observer longitude in degrees lat: Observer latitude in degrees time: Observation time "YYYY-MM-DD HH:MM:SS" inside the intended night. A bare date means local midnight and can belong to the previous evening's night. time_zone: IANA timezone string limit: Max number of deep-sky objects to return (default 20)
Returns: Standard envelope; data contains: - moon_phase: Moon details - planets: List of visible planets - deep_sky: Sorted list of deep sky objects (Messier/NGC) - night_window: Civil-dark window for the requested night
Inputs: lat (required), lon (required), time (required), time_zone (required), +1 more. Returns: object
get_shooting_planA
Generate a single-night astrophotography shooting plan.
Use when: optics, place, and night are fixed and you need matched targets in timed slots. Do not use when: you still need to choose a site or compare nights, or only need target ranks. Requires: focal length, observer coordinates, time, and the observing timezone (defaults to UTC); optional sensor, optical, and minimum-altitude settings. Follow-up: get_telescope_targets for target details; plan_stargazing_session to reconsider place, date, equipment preset, or observing constraints.
Runs match_telescope_targets then generate_shooting_schedule, returning targets + moon + timed shooting slots in one response. Interpretation: target altitude is at civil dusk, not the requested clock time; use altitude_curve or get_celestial_pos for another time. The schedule uses a civil-dark window (Sun below -6 degrees), not astronomical darkness (-18 degrees), and does not validate weather, access, obstructions or achieved integration time. Empty/null slots or exposure values are not an all-night imaging commitment.
Returns: data.targets[] — same structure as get_telescope_targets data.moon — {illumination, phase, moonrise, moonset, always_down, always_up, dark_fraction, altitude_curve} data.plan — {date, slots[{start_time, end_time, target_name}], total_exposure_min, moon_phase, moon_illumination, moon_delay_min} data.config — the TelescopeConfig used data.total — number of matched targets
Inputs: lat (required), lon (required), time (required), focal_length_mm (required), +12 more. Returns: object
get_telescope_targetsA
Recommend astrophotography targets for a telescope setup.
Use when: place, time, and optics are known and you need ranked deep-sky imaging targets. Do not use when: you only need naked-eye targets, a timed schedule, or a choice of sites. Requires: focal length, observer coordinates, time, and timezone; supply known sensor and optical details for matching. For equipment presets use plan_stargazing_session. Follow-up: get_shooting_plan for timed imaging slots; plan_stargazing_session if the observing place or night still needs comparison; get_celestial_pos for altitude at a specific clock time (the target altitude field is at civil dusk).
Given a telescope/camera configuration and observing location+time, returns a ranked list of deep-sky objects best suited for imaging. Interpretation: altitude is at civil dusk, not at the requested clock time; azimuth is at civil midnight. Use altitude_curve or get_celestial_pos for another time. transit_alt is the sampled peak within the civil-night window, in degrees; transit_time and curve time values are UTC Unix seconds. Null rise/set values mean no crossing was found inside that window, not that an object can never rise/set. suitability_score is a heuristic (higher is better), not a probability or weather clearance. Missing photometry is unknown; do not infer a seasonal visibility error from missing magnitude or from the civil-dusk altitude alone.
Args: focal_length_mm: Telescope focal length in mm (e.g. 250 for RedCat51) lon: Observer longitude in degrees lat: Observer latitude in degrees time: Observation time string "YYYY-MM-DD HH:MM:SS" time_zone: IANA timezone string (e.g. "Asia/Shanghai", "UTC") aperture_mm: Telescope aperture in mm (optional, for limiting magnitude) sensor_width_mm: Camera sensor width in mm (optional) sensor_height_mm: Camera sensor height in mm (optional) sensor_pixel_size_um: Camera pixel size in microns (optional) central_obstruction_pct: Central obstruction percentage (0-50) reducer_factor: Focal reducer factor (default 1.0) barlow_factor: Barlow/extender factor (default 1.0) mount_type: "equatorial" or "altaz" (default "equatorial") filter_type: Filter type — "Hα", "OIII", "SII", or None for LRGB limit: Maximum number of targets to return (default 20)
Returns: data.targets[] — ranked list, best first. Each target has: name, type, magnitude, catalog altitude (civil dusk, degrees), azimuth (civil midnight, degrees), dawn_altitude angular_size_arcmin, angular_size_min_arcmin, angular_size_pa_deg surface_brightness (mag/arcmin²), fov_fit_score, fov_fill_ratio suitability_score (0-100), mosaic_recommended, optimal_rotation_deg rise_time, set_time, transit_time (UTC unix timestamps), transit_alt (degrees) altitude_curve[{time, alt}] civil_dusk, civil_dawn, observation_time data.moon — {illumination, phase, altitude_curve, always_down, always_up, dark_fraction, moonrise, moonset} data.config — the TelescopeConfig used data.total — number of targets returned
Inputs: lat (required), lon (required), time (required), time_zone (required), +11 more. Returns: object
get_tool_catalogA
Get metadata for all registered MCP tools.
Use when: you need the wrapped catalog with full documentation and parameter summaries. Do not use when: your client only needs standard MCP tools/list discovery or a business result. Requires: no inputs; this call discovers tools and does not perform observing analysis. Follow-up: choose a tool from its use/do-not-use guidance; plan_stargazing_session is the primary entry for complete observing decisions.
Returns: Dict with keys "data", "_meta". "data.tools" contains tool metadata objects.
Inputs: no named parameters. Returns: object
get_weather_by_nameA
通过地点名称获取综合天气(当前 + 小时预报 + 日预报)。
Use when: you have a place name and need weather facts for that resolved location. Do not use when: you already have exact coordinates or need a complete observing decision. Requires: an unambiguous place name; use full administrative names for Chinese locations. Provider selection can remain at the server's default aggregation policy. Follow-up: get_weather_by_position for precise coordinates; plan_stargazing_session to combine weather with darkness, targets, and alternative observing sites.
Geocoding uses offline China gazetteer (CJK) → Photon → Nominatim cascade. Weather data is aggregated from multiple providers with graceful fallback. Open-Meteo needs no API key; network/provider failures can still occur. Atmospheric fields: summary.current.atmosphere and summary.hourly[*].atmosphere contain optional model estimates with their own valid time and per-field provenance. Inspect summary.atmosphere_sources for source failures and resolution. Missing/null means unknown. CAMS global is approximately 45 km and natively 3-hourly; hourly output may be interpolated. AOD is column extinction, not surface visibility. Boundary-layer height is above local model ground, not a pollution ceiling. No AQI or pollution attribution is inferred. Interpretation: summary.current is current weather, summary.daily is calendar-day aggregation, and summary.hourly contains timestamped forecasts. For a future observing night select the actual hourly timestamps across local midnight and inspect providers and source for failures/provenance. Missing/null or out-of-horizon hours are unknown, not clear weather. Forecasts are predictions, not observations of future conditions; do not assume all providers or fields cover the same dates.
中文地名提示:建议使用完整行政区划名称,如 "浙江安吉"、"杭州西湖区"。
内置离线行政区划数据会正确解析到对应的行政区(如安吉县),而非 POI 商铺。
需要精确定位时优先使用 get_weather_by_position(lat, lon)。
Args: place_name: 地点名称。中文请使用完整行政区划(如 "浙江省安吉县"),避免仅用2-3字短名。 provider: provider 模式,可选 all/qweather/open-meteo/wttr。
Returns: Dict,包含 keys: "data", "_meta"(成功时)或 "error", "_meta"(失败时)。
Inputs: place_name (required), provider.
get_weather_by_positionA
通过经纬度获取综合天气(当前 + 小时预报 + 日预报)。
Use when: you have precise coordinates and need current and forecast weather facts. Do not use when: you only have a place name or need ranked observing sites or night targets. Requires: latitude and longitude; provider selection can remain at the default policy. Follow-up: get_weather_by_name for place-name input; plan_stargazing_session to compare observing places and nights using weather and other evidence.
Weather data is aggregated from multiple providers with graceful fallback. Open-Meteo needs no API key; network/provider failures can still occur. Atmospheric fields: summary.current.atmosphere and summary.hourly[*].atmosphere contain optional model estimates with their own valid time and per-field provenance. Inspect summary.atmosphere_sources for source failures and resolution. Missing/null means unknown. CAMS global is approximately 45 km and natively 3-hourly; hourly output may be interpolated. AOD is column extinction, not surface visibility. Boundary-layer height is above local model ground, not a pollution ceiling. No AQI or pollution attribution is inferred. Interpretation: summary.current is current weather, summary.daily is calendar-day aggregation, and summary.hourly contains timestamped forecasts. For a future observing night select the actual hourly timestamps across local midnight and inspect providers and source for failures/provenance. Missing/null or out-of-horizon hours are unknown, not clear weather. Forecasts are predictions, not observations of future conditions; do not assume all providers or fields cover the same dates.
Args: lat: 纬度 lon: 经度 provider: provider 模式,可选 all/qweather/open-meteo/wttr。
Returns: Dict,包含 keys: "data", "_meta"(成功时)或 "error", "_meta"(失败时)。
Inputs: lat (required), lon (required), provider.
light_pollution_mapA
Get light pollution data for a specific area.
Use when: you need a bounding-box grid of light pollution measurements for a map or analysis. Do not use when: you need ranked places or a complete observing decision. Requires: south/west/north/east bounds and optional grid zoom. Returns: data.grid points with brightness, Bortle class, and SQM, plus bounds and zoom. Follow-up: analysis_area for synchronous place candidates; submit_area_analysis for background place analysis; plan_stargazing_session for an observing decision.
Returns a grid of light pollution data points including brightness, Bortle class, and SQM.
Args: south, west, north, east: Bounding box coordinates. zoom: Grid resolution zoom level (default: 10). Higher = more detailed.
Inputs: east (required), west (required), north (required), south (required), +1 more. Returns: object
list_visible_planetsA
Get a list of solar system planets currently visible (above horizon).
Use when: you need planets above the observer's horizon at a specified instant. Do not use when: you need all-night visibility, darkness guarantees, or equipment ranking. Requires: observer coordinates, time, and timezone; above-horizon visibility alone does not establish dark-sky or telescope observing conditions. Follow-up: get_celestial_pos or get_celestial_rise_set for a selected planet; plan_stargazing_session for a planetary observing decision.
Args: lon: Observer longitude in degrees lat: Observer latitude in degrees time: Observation time string "YYYY-MM-DD HH:MM:SS" time_zone: IANA timezone string
Returns: Dict with keys "data", "_meta". "data" is a list of planet dicts (name, altitude, azimuth).
Inputs: lat (required), lon (required), time (required), time_zone (required). Returns: object
plan_stargazing_sessionPlan Stargazing SessionARead-onlyIdempotent
Preferred end-to-end planning entry point for choosing when, where, and what to observe across one to seven nights.
Use when: you need a complete observing decision or comparisons of places and nights. Do not use when: you only need raw weather, celestial facts, or task status. Requires: request.location (place name, center/radius, or exact bounds) and start_date; timezone, one-to-seven nights, observing goal, equipment preset/overrides, and supported preference fields have explicit defaults or are optional. A center/radius is a regional search, not a plan locked to the center point. The radius becomes an approximate search box, not a strict circular distance filter. Quietness/popularity adjustments require the corresponding preference flags. Pass request as a JSON object, not a JSON string; inspect resolved_location before describing a candidate as the exact user-specified site. Returns: normalized request, decision, alternatives, evidence, uncertainties, missing inputs, ranking-change conditions, and next actions in the standard envelope. Weather evidence uses dated night-hour forecasts. Missing weather or no usable window excludes a candidate from decision and alternatives; unranked_planning_reference evidence retains known location/sky facts with weather_unknown or no_usable_window status. If none qualify, decision=null. Partial coverage remains provisional. The night_window remains civil darkness. For deep_sky, observation windows require at least two continuous astronomical-dark hours, cloud <=25%, rain probability <=20%, and wind <=20 km/h, with known rain/wind fields. These are heuristic screening limits, not verified imaging success probabilities. Interpretation: recommendation_score is a relative ranking, not a probability or an absolute go/no-go threshold. _meta.status=success means execution succeeded; decision=null means no selected session. A null observation_window means no usable window was established, not an all-night opening. Inspect evidence, uncertainties, missing_inputs and next_actions even on success. nightly_weather_unavailable and no_usable_observation_window are high-uncertainty warnings; long_range_forecast requires a forecast recheck near departure. Never replace missing night hours with summary.current or summary.daily, or infer a provider from weather wording. Civil darkness means Sun below -6 degrees, not astronomical darkness at -18 degrees; its duration is not guaranteed exposure time. Popularity/quiet scores are heuristics, not measured noise or calibrated crowd probabilities. When equipment is supplied, decision.targets already contains equipment-matched targets; use that list to answer the selected session's target question without a second lookup. Read selected_target_window_check evidence before claiming shootability: complete equipment curves with no 25-degree, 30-minute model slot in the selected weather window are excluded. Missing or partial curves and generic targets remain unknown references. Altitude-only checks have unknown Moon constraints; independent slots may overlap and do not verify per-slot Moon separation, tracking or actual exposure. Keep the returned target order; do not compare scores across generic and equipment rankings. This is a synchronous call and can exceed a client default deadline; a timeout does not establish that a background planning task exists. Follow-up: get_shooting_plan for an imaging schedule at the selected place/night; get_weather_by_position for updated weather facts. Inspect missing inputs and next actions before treating a degraded decision as final.
Inputs: request (required). Returns: object
submit_area_analysisA
Submit bounded background place analysis and return its task identifier.
Use when: a geographic place search may outlive one tool call and needs background control. Do not use when: you need a complete observing decision or only want to poll an existing task. Requires: request.bounds and optional place-search preferences; max_locations must be from 1 to 100. Returns: task snapshot with task_id, resource_id, state, and normalized request. Active duplicate queries share a task. Completed retries may use cached data. Follow-up: get_area_analysis_task to poll; get_area_analysis_result after success; cancel_area_analysis_task if no longer needed; plan_stargazing_session for decisions.
Inputs: request (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most low-level tools are clearly separated, but the planning surface has notable overlap: plan_stargazing_session, get_best_stargazing_plan, and get_multiday_stargazing_plan all produce observing recommendations with only legacy/preferred wording distinguishing them. Similarly, analysis_area versus submit_area_analysis is understandable from descriptions, but the set still asks the agent to choose among several closely related workflows.
The names are overwhelmingly snake_case and follow predictable patterns such as get_*, list_*, submit_*, cancel_*, and plan_*. A few names break the verb_noun convention, notably analysis_area and light_pollution_map, but the overall convention remains readable and stable.
At 21 tools, the server is somewhat heavy for the domain, and the count is inflated by legacy bbox-first planning endpoints and full background-task lifecycle tools. The breadth is justified by real subdomains such as weather, celestial facts, site search, equipment planning, and scheduling, but the total is borderline for easy tool selection.
The surface covers the apparent domain thoroughly: planning, weather by name and coordinates, celestial positions and rise/set events, moon and planet facts, constellation lookup, light pollution, synchronous and background site analysis, task polling/cancellation/result paging, equipment-specific targets, and shooting schedules. Background area-analysis lifecycle is complete enough to avoid obvious dead ends.
Maintenance
Related MCP Connectors
Elevation-corrected sun, moon, twilight, solar and tide data for any point on Earth
Offline observational astronomy: positions, rise/set, moon phases, eclipses, and seasons.
Read-only astronomy calculations: sun, moon, planets, eclipses, twilight and star positions.
Sunrise, sunset, twilight, golden hour and moon times for any place on Earth. Free, no API key.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides altitude-azimuth coordinates for celestial objects including planets, over 117,000 stars, and 14,000 deep sky objects based on system time and configurable location.31-
- AlicenseAqualityFmaintenanceProvides authoritative astronomical data including moon phases, solar eclipses, and sun/moon rise and set times using the US Navy API or offline Skyfield calculations. It enables users to query Earth's seasons and celestial events for any location and date.81Apache 2.0
- AlicenseAqualityDmaintenanceProvides astronomical calculations using the Swiss Ephemeris library, including planetary positions, houses, chart points, and asteroids for any date and location.412MIT
- AlicenseNot gradedqualityBmaintenanceProvides offline astronomical computations for planet and moon positions, rise/set times, phases, eclipses, and seasons via MCP.198 npm5Apache 2.0