Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@chuk-mcp-celestialWhen is the next full moon and what time does the sun rise in Seattle tomorrow?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chuk-mcp-celestial
MCP server for US Navy astronomical and celestial data - The definitive celestial MCP server providing moon phases, solar eclipses, sun/moon rise/set times, and Earth's seasons from the official US Navy Astronomical Applications API.
π Try it now - Hosted version available! - No installation required.
Features
π Comprehensive Celestial Data:
Moon phases with exact timing (New Moon, First Quarter, Full Moon, Last Quarter)
Sun and moon rise/set/transit times for any location
Solar eclipse predictions with local circumstances
Earth's seasons (equinoxes, solstices, perihelion, aphelion)
β‘ Flexible Providers:
Navy API - Authoritative US Navy data, all features
Skyfield - 28x faster, offline calculations, research-grade accuracy
Hybrid mode - Mix providers per-tool (e.g., Skyfield for moon phases, Navy for eclipses)
S3 storage - Cloud-based ephemeris storage via chuk-virtual-fs
π Type-Safe & Robust:
Pydantic v2 models for all responses - no dictionary goop!
Enums for all constants - no magic strings!
Full async/await support with httpx
Comprehensive error handling
π Multi-Server Integration:
Combine celestial + time + weather for comprehensive astronomical intelligence
Answer complex questions like "Will the moon be visible tonight with current weather?"
β Production Ready:
70%+ test coverage with pytest
GitHub Actions CI/CD
Automated releases to PyPI
Type checking with mypy
Code quality with ruff
Installation
Comparison of Installation Methods
Method | Setup Time | Requires Internet | Updates | Best For |
Hosted | Instant | Yes | Automatic | Quick testing, production use |
uvx | Instant | Yes (first run) | Automatic | No local install, always latest |
Local | 1-2 min | Only for install | Manual | Offline use, custom deployments |
Option 1: Use Hosted Version (Recommended)
No installation needed! Use our public hosted version:
Option 2: Install via uvx (No Installation Required)
Run directly without installing:
Option 3: Install Locally
Basic Installation (Navy API only):
With Skyfield Support (offline calculations, 28x faster):
Then configure in your MCP client:
Optional: Configure hybrid provider mode (create celestial.yaml):
Quick Start
Claude Desktop Configuration
Choose one of the installation methods above and add to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Hosted version (easiest):
uvx version (no install):
Local installation:
Then ask questions like:
"When is the next full moon?"
"What time does the sun rise in Seattle tomorrow?"
"Are there any solar eclipses visible from New York in 2024?"
"When are the equinoxes this year?"
Using with mcp-cli
Test the server interactively with mcp-cli:
Example session:
As a Python Library
Using MCP Server Tools (Default Provider)
Using Providers Directly
Hybrid Approach (Best of Both Worlds)
Available Tools
get_moon_phases(date, num_phases)
Get upcoming moon phases starting from a given date.
Parameters:
date(str): Start date (YYYY-MM-DD)num_phases(int): Number of phases to return (1-99, default 12)
Returns: MoonPhasesResponse with list of phase data
get_sun_moon_data(date, latitude, longitude, timezone?, dst?, label?)
Get complete sun and moon data for one day at a specific location.
Parameters:
date(str): Date (YYYY-MM-DD)latitude(float): Latitude in decimal degrees (-90 to 90)longitude(float): Longitude in decimal degrees (-180 to 180)timezone(float, optional): Timezone offset from UTC in hoursdst(bool, optional): Apply daylight saving timelabel(str, optional): User label for the query
Returns: OneDayResponse (GeoJSON Feature) with sun/moon rise/set/transit times, twilight, moon phase, and illumination
get_solar_eclipse_by_date(date, latitude, longitude, height?)
Get local solar eclipse circumstances for a specific date and location.
Parameters:
date(str): Eclipse date (YYYY-MM-DD)latitude(float): Observer latitudelongitude(float): Observer longitudeheight(int, optional): Height above sea level in meters (default 0)
Returns: SolarEclipseByDateResponse (GeoJSON Feature) with eclipse type, magnitude, obscuration, duration, and local circumstances
get_solar_eclipses_by_year(year)
Get a list of all solar eclipses occurring in a specific year.
Parameters:
year(int): Year to query (1800-2050)
Returns: SolarEclipseByYearResponse with list of eclipse events
get_earth_seasons(year, timezone?, dst?)
Get Earth's seasons and orbital events for a year.
Parameters:
year(int): Year to query (1700-2100)timezone(float, optional): Timezone offset from UTCdst(bool, optional): Apply daylight saving time
Returns: SeasonsResponse with equinoxes, solstices, perihelion, and aphelion
Architecture
No Dictionary Goop
All responses are strongly-typed Pydantic models:
No Magic Strings
All constants use enums:
Async Native
All API calls use async/await with httpx:
Provider Architecture
This server supports multiple calculation providers via a factory pattern, allowing you to choose between different astronomical calculation backends:
Available Providers
Provider | Speed | Accuracy | Offline | Features |
Navy API | Standard (~700ms) | Authoritative | β | All features |
Skyfield | Fast (~25ms) | Research-grade | β | Moon phases, seasons |
Configuration
Create a celestial.yaml file to configure providers:
Config file locations (checked in order):
Path from
CELESTIAL_CONFIG_PATHenvironment variable./celestial.yaml(current directory)~/.config/chuk-mcp-celestial/celestial.yaml(user config)
Environment variable overrides:
CELESTIAL_PROVIDER- Default providerCELESTIAL_MOON_PHASES_PROVIDER- Provider for moon phasesSKYFIELD_STORAGE_BACKEND- Storage backend (local/s3/memory)SKYFIELD_S3_BUCKET- S3 bucket nameSKYFIELD_S3_REGION- S3 regionSee
celestial.yaml.examplefor all options
Ephemeris Storage with chuk-virtual-fs
Skyfield requires JPL ephemeris files (~32 MB) for astronomical calculations. This server uses chuk-virtual-fs to provide flexible storage options:
Storage Backends:
S3 (Recommended for production) - Cloud storage with AWS S3
Persistent across deployments
Shared across multiple instances
No local disk required
Easy CDN integration
Local - Traditional filesystem storage
Good for development and offline use
No cloud dependencies
Requires local disk space
Memory - In-memory storage for testing
Ephemeral storage
Fast but non-persistent
Download Ephemeris Files:
Features:
β Auto-creates S3 bucket if it doesn't exist
β Skips files that already exist in storage
β Use
--forceto re-download existing filesβ Batch download with
--allflag
Note: For S3 backend, create a .env file with AWS credentials:
Available ephemeris files:
de440s.bsp- 32 MB, covers 1849-2150 (β recommended)de421.bsp- 17 MB, covers 1900-2050 (smaller, older)de440.bsp- 114 MB, covers 1550-2650 (most comprehensive)
How it works:
Ephemeris files are stored in your configured backend (S3, local, or memory)
On first use, Skyfield provider downloads files to a local temp cache
Skyfield reads from the cache for fast calculations
Cache persists across provider instances for performance
See COMPARISON_REPORT.md for detailed accuracy and performance comparison between providers.
Deployment
Docker
Build and run with Docker:
The server will be available at http://localhost:8000 in HTTP mode.
Fly.io
Deploy to Fly.io:
Configuration (fly.toml):
Environment variables for provider settings
S3 bucket configuration
AWS credentials via
fly secrets(not in file)Auto-scales to 0 when not in use
Ephemeris Setup for Production:
Development
Setup
Testing
Code Quality
Quick Reference
Common Tasks
Download ephemeris files:
Configure providers (celestial.yaml):
Environment variables (.env):
Test provider comparison:
Multi-Server Integration
The chuk-mcp-celestial server works beautifully with other MCP servers to answer complex questions:
Recommended Server Combinations
Celestial + Time + Weather = Complete Astronomical Intelligence
Example Multi-Server Queries
1. Moon Visibility with Location Intelligence
2. Sunrise + Current Time
3. Eclipse + Weather Forecast
Why Multi-Server Works Better
Single Server | Multi-Server Combination |
"Moon rises at 12:55 UTC" | "Moon rises at 12:55 (7:55am local time)" |
"Sunrise at 07:41" | "Sunrise at 07:41, currently 21:43, sunset was at 15:56" |
"Eclipse on 2024-4-8" | "Eclipse on 2024-4-8, weather: partly cloudy, 60% visibility chance" |
Server Responsibilities
Celestial Server (this server):
π Moon phases, positions, rise/set times
βοΈ Sun rise/set times, twilight, transit
π Solar eclipse predictions and local circumstances
π Earth's seasons and orbital events
Time Server:
β° Precise current time with NTP synchronization
π Timezone conversions and DST handling
π Date/time calculations
Weather Server:
πΊοΈ Geocoding (convert place names to coordinates)
β Weather forecasts and current conditions
π Historical weather data
π¨ Air quality information
Testing Multi-Server Setup
Then ask questions like:
"When is sunset in Tokyo and what time is it there now?"
"What phase is the moon tonight and will it be cloudy?"
"When is the next eclipse visible from London and what's the forecast?"
Data Source
This MCP server uses the official US Navy Astronomical Applications Department API (https://aa.usno.navy.mil/data/api), which provides:
Highly accurate astronomical data
Historical data from 1700-2100 (varies by endpoint)
Solar eclipse data from 1800-2050
Official US government source
Comparison with Other Services
Feature | chuk-mcp-celestial | Other Services |
Data Source | US Navy (official) | Various APIs |
Type Safety | Full Pydantic models | Often dictionaries |
Enums | Yes (no magic strings) | Usually strings |
Async | Native httpx | Mixed |
Eclipse Data | Local circumstances | Often just dates |
Historical Range | 200-400 years | Usually limited |
Test Coverage | 70%+ | Varies |
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes
Run tests and checks (
make check)Commit your changes
Push to the branch
Open a Pull Request
License
MIT License - see LICENSE file for details
Credits
Built on chuk-mcp-server
Data provided by US Navy Astronomical Applications Department
Inspired by chuk-mcp-open-meteo