huangzesen avatar

XHelio-SPICE

huangzesen/xhelio-spice

Wraps SpiceyPy with automatic NAIF SPICE kernel downloads for spacecraft ephemeris queries. Exposes six MCP tools including get_ephemeris for position and velocity calculations, compute_distance between bodies, and transform_coordinates across reference frames like ECLIPJ2000, GSE, and spacecraft-relative RTN. Handles Parker Solar Probe, Solar Orbiter, STEREO-A, Juno, Voyager, and New Horizons with auto-managed kernels. Returns single timepoint results inline or timeseries as CSV. Reach for this when you need Claude to answer questions about spacecraft trajectories, orbital geometry, or heliophysics mission planning without manually wrangling kernel files from JPL NAIF archives.

tools
6
transport
STDIO
env var
1
last updated
Mar 12, 2026

Tools

6 tools

Public tool metadata for what this MCP can expose to an agent.

get_ephemerisPosition/velocity — single time (inline) or timeseries (CSV)

Position/velocity — single time (inline) or timeseries (CSV)

No parameter schema in public metadata yet.

compute_distanceDistance between two bodies

Distance between two bodies

No parameter schema in public metadata yet.

transform_coordinatesCoordinate frame transform

Coordinate frame transform

No parameter schema in public metadata yet.

list_spice_missionsSupported missions

Supported missions

No parameter schema in public metadata yet.

list_coordinate_framesAvailable frames with descriptions

Available frames with descriptions

No parameter schema in public metadata yet.

manage_kernelsKernel cache management

Kernel cache management

No parameter schema in public metadata yet.

Sponsors

Configuration

XHELIO_SPICE_KERNEL_DIR

Override the default kernel cache directory (~/.xhelio_spice/kernels/)

Readme

xhelio-spice

Spacecraft ephemeris made easy — auto-managed SPICE kernels for heliophysics missions.

xhelio-spice wraps SpiceyPy with automatic kernel download, caching, and loading. Ask for a spacecraft position and xhelio-spice handles the rest: downloading the right NAIF kernels, loading them in the correct order, and returning results as Python dicts or pandas DataFrames.

Installation

pip install xhelio-spice

For MCP server support (Claude Desktop, Claude Code, Cursor, etc.):

pip install xhelio-spice[mcp]

Quick Start

from xhelio_spice import get_position, get_trajectory

# Where is Parker Solar Probe right now?
pos = get_position("PSP", observer="SUN", time="2024-01-15", frame="ECLIPJ2000")
print(f"PSP is {pos['r_au']:.3f} AU from the Sun")

# Get a month of trajectory data as a DataFrame
df = get_trajectory(
    "PSP", observer="SUN",
    time_start="2024-01-01", time_end="2024-01-31",
    step="1h", frame="ECLIPJ2000",
)
print(df[["r_au"]].describe())

View the full README on GitHub

Details

Repository
github.com/huangzesen/xhelio-spice
Package
xhelio-spice
Transport
STDIO
Registry
MCP registry, active

More from huangzesen