mcp-stargazing
mcp-stargazing
地球上のあらゆる場所について、天体(太陽、月、惑星、恒星、深宇宙天体)の高度、出没時刻を計算します。オプションで光害分析も可能です。
機能
高度/方位角の計算: あらゆる天体の仰角と方位を算出します。
出没時刻: 天体が地平線上に現れる、または沈む時刻を特定します。
光害分析: 光害マップ(GeoTIFF形式)を読み込み、分析します。
コード実行対応:
シリアライズ可能な戻り値: すべてのツールはJSONシリアライズ可能なデータ(日付はISO文字列)を返すため、LLMで直接利用可能です。
ページネーション:
analysis_areaはページング(page,page_size)をサポートしており、大規模なデータセットを効率的に処理できます。標準化されたレスポンス:
{ "data": ..., "_meta": ... }という統一されたレスポンス形式により、可観測性とエラーハンドリングが向上しています。
パフォーマンス:
非同期実行: 天体計算をノンブロッキングで実行します。
キャッシュ: Simbadクエリや地域分析のためのインテリジェントなキャッシュ機能。
プロキシサポート: HTTP/HTTPSプロキシをネイティブサポート(天体データのダウンロードに便利)。
タイムゾーン対応: ローカル時間またはUTCで動作します。
データ駆動: 10,000以上の深宇宙天体(メシエ天体およびNGC)のデータベースを統合し、スマートな推奨機能を提供します。
Related MCP server: chuk-mcp-celestial
インストール
このプロジェクトでは、依存関係管理に uv を使用しています。
ローカルインストール
uvのインストール:pip install uv依存関係の同期:
uv syncこれにより
.venvに仮想環境が作成され、pyproject.tomlで定義されたすべての依存関係がインストールされます。環境の有効化:
source .venv/bin/activateデータの初期化 (ナイトリープランナーに必須): 最新のメシエおよび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サーバーの使用方法
MCPサーバーを起動して、AIエージェントやその他のクライアントにツールを公開します。
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)。
例
ナイトリープランナー:
python examples/nightly_forecast_demo.py月の明かりを考慮し、今夜観測可能な惑星と深宇宙天体の厳選リストを表示します。
可視惑星:
python examples/visible_planets_demo.py現在観測可能な惑星をリストアップします。
月情報:
python examples/moon_phase_demo.py30日間の月齢カレンダーを出力します。
オーケストレーション:
python examples/code_execution_orchestration.py完全なワークフローを実演: 時刻取得 -> 天体位置取得 -> 天気確認 -> スポット検索。
標準化されたレスポンス形式をプログラムで処理する方法を示します。
ページネーション:
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