Skip to main content

NASA CDAWeb data access for heliophysics — browse missions, inspect parameters, fetch CDF data

Project description

xhelio-cdaweb

NASA CDAWeb data access for heliophysics — browse missions, inspect parameters, fetch CDF data.

Works as a standalone Python library or as an MCP server for any MCP-compatible LLM client (Claude Desktop, Cursor, custom agents).

Installation

# Library only
pip install xhelio-cdaweb

# With MCP server
pip install xhelio-cdaweb[mcp]

MCP Server

Configuration (Claude Desktop, Cursor, etc.)

{
  "mcpServers": {
    "cdaweb": {
      "command": "xhelio-cdaweb-mcp"
    }
  }
}

Or run directly:

xhelio-cdaweb-mcp
python -m cdawebmcp

Tools

Tool Description
browse_missions() List all available CDAWeb missions with descriptions and dataset counts
load_mission(mission_id) Get the complete system prompt for a mission (role instructions + dataset catalog)
browse_parameters(dataset_id) Browse all variables in a dataset (name, type, units, description)
fetch_data(dataset_id, parameters, start, stop) Download CDF data, write to file, return metadata + per-column stats

Python Library

from cdawebmcp.catalog import browse_missions
from cdawebmcp.prompts import build_mission_prompt
from cdawebmcp.metadata import browse_parameters
from cdawebmcp.fetch import fetch_data

# List all 54 missions
missions = browse_missions()

# Get mission-specific system prompt
prompt = build_mission_prompt("ace")

# Browse dataset parameters
params = browse_parameters(dataset_id="AC_H2_MFI")

# Fetch data — returns DataFrames directly (no MCP needed)
result = fetch_data("AC_H2_MFI", ["Magnitude"], "2024-01-01", "2024-01-02")
mag = result["Magnitude"]
print(mag["data"])       # pandas DataFrame
print(mag["units"])      # "nT"
print(mag["stats"])      # per-column {min, max, mean, std, nan_ratio}

Catalog Updates

54 mission catalog JSONs are bundled. Rebuild from CDAWeb REST API:

python -m cdawebmcp.scripts.build_catalog
python -m cdawebmcp.scripts.build_catalog --mission psp
python -m cdawebmcp.scripts.build_catalog --discover

Development

pip install -e ".[dev]"
pytest tests/ -v

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xhelio_cdaweb-0.1.0.tar.gz (139.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xhelio_cdaweb-0.1.0-py3-none-any.whl (176.8 kB view details)

Uploaded Python 3

File details

Details for the file xhelio_cdaweb-0.1.0.tar.gz.

File metadata

  • Download URL: xhelio_cdaweb-0.1.0.tar.gz
  • Upload date:
  • Size: 139.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xhelio_cdaweb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e0862bd6282002af8ba0323a26d928de190dc60b90a28226cd643e05930b585
MD5 3a508c395a873734f4cab1758c459952
BLAKE2b-256 c10dd6c0a26969b9beefc55759230507a72061b6d492484a052a1020f9d32f18

See more details on using hashes here.

Provenance

The following attestation bundles were made for xhelio_cdaweb-0.1.0.tar.gz:

Publisher: publish.yml on huangzesen/xhelio-cdaweb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xhelio_cdaweb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xhelio_cdaweb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 176.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xhelio_cdaweb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f20e4295cfda9ecfd559f2db592619257c779568ab5daccbe3233c77e2c0deae
MD5 9f58aff1d41c62a60689063f22f7fe1a
BLAKE2b-256 149ba918d9105c75ae9316fc2461a7a0c6468af96152cb63ef2bdbe5b6989f37

See more details on using hashes here.

Provenance

The following attestation bundles were made for xhelio_cdaweb-0.1.0-py3-none-any.whl:

Publisher: publish.yml on huangzesen/xhelio-cdaweb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page