spedas-mcp

spedas-mcp

Unified SPEDAS-oriented MCP server for Claude Code and Codex agents, providing tools to discover and fetch heliophysics and planetary science data from CDAWeb, NASA PDS, and SPICE kernels.

Category
Visit Server

README

SPEDAS MCP

spedas_mcp is the SPEDAS organization MCP server for agentic heliophysics workflows. It presents one SPEDAS-facing data layer and organizes capabilities by data source category instead of by the internal backend packages used to implement them.

The current design follows Jason's A+B direction:

  • A. SPEDAS data layer — one unified entry point for source categories such as cdaweb, pds, and spice/geometry.
  • B. SPEDAS science workflow layer — high-level planning tools that let Claude Code, Codex, OpenCode, LingTai, or another agent start from a science question before choosing source-specific operations.

The xhelio-* packages are implementation backends. They should stay visible to maintainers, but they should not be the user's first mental model.

Repository

Layered capability map

1. Data layer tools

Start here when the user asks for data, datasets, parameters, products, archives, or cache status.

  • browse_data_sources(source_type="all", query=None) — browse SPEDAS data source categories, or drill into one category.
  • load_data_source(source_type, source_id) — load source context, e.g. a CDAWeb observatory, PDS mission, or SPICE mission/frame context.
  • browse_data_parameters(source_type, dataset_id, dataset_ids=None) — browse parameters/metadata for CDAWeb or PDS datasets; for SPICE, returns geometry/frame context.
  • fetch_data_product(source_type, dataset_id, parameters, start=None, stop=None, output_dir=None, format="csv", limit=None) — unified measurement/archive data fetch for CDAWeb/PDS. SPICE requests are routed to geometry tools instead.
  • manage_data_cache(source_type="all", action="status", cache_dir=None, mission=None) — unified cache status/maintenance for the source categories.

Supported source_type values:

source_type Use for Main data-layer path
cdaweb heliophysics observatory time-series, plasma/fields/particles, solar wind, CDF-like intervals browse_data_sourcesload_data_sourcebrowse_data_parametersfetch_data_product
pds Planetary Plasma Interactions archives, planetary mission datasets, PDS metadata/products browse_data_sourcesload_data_sourcebrowse_data_parametersfetch_data_product
spice geometry, ephemeris, trajectory, distance, coordinate frames/transforms browse_data_sourcesload_data_source → geometry tools

2. Science workflow tools

Start here for open-ended science requests.

  • spedas_overview() — compact map of capability groups and recommended workflow.
  • search_spedas_data_sources(question, target=None, observables=None) — recommend which data source categories should lead a request.
  • plan_spedas_observation(science_goal, start=None, stop=None, target=None, observables=None, data_sources=None) — produce a source-specific plan before fetching data.
  • compare_cdaweb_pds_spice(science_goal="") — explain source boundaries and choose the right source family.
  • create_spedas_analysis_bundle(study_name, output_dir, ...) — create a request/provenance scaffold with requests/, data/, plots/, provenance/, and notes/ folders.

3. Geometry tools

SPICE is exposed as a data source category, but geometry operations are clearer as explicit tools:

  • list_spice_missions()
  • get_ephemeris(mission, target, start, stop, step="1h", frame="J2000", observer=None)
  • compute_distance(mission, target, observer, start, stop, step="1h")
  • transform_coordinates(mission, coordinates, from_frame, to_frame, epoch=None)
  • list_coordinate_frames(mission=None)
  • manage_spice_kernels(action, mission=None, cache_dir=None)

4. Compatibility low-level tools

These remain available for clients that already know the source-specific operations:

  • CDAWeb: browse_observatories, load_observatory, browse_parameters, fetch_data, manage_cdaweb_cache
  • PDS: browse_pds_missions, load_pds_mission, browse_pds_parameters, fetch_pds_data, manage_pds_cache
  • SPICE: the geometry tools above plus manage_spice_kernels

Future cleanup can hide or rename some compatibility tools if we decide to make a breaking API pass. For now the primary docs and spedas_overview route users to the unified data layer.

Recommended agent workflow

  1. Call spedas_overview().
  2. For a natural-language science request, call search_spedas_data_sources(...) or plan_spedas_observation(...).
  3. Use the data layer:
    • browse_data_sources(source_type="all")
    • browse_data_sources(source_type="cdaweb" | "pds" | "spice")
    • load_data_source(...)
    • browse_data_parameters(...)
    • fetch_data_product(...) for CDAWeb/PDS measurement/archive products
  4. Use geometry tools directly for SPICE ephemeris, distance, frame, and coordinate-transform work.
  5. For any real analysis, call create_spedas_analysis_bundle(...) and write fetched files under the generated data/ directory.
  6. Return compact summaries and file paths. Do not paste large science arrays into chat.

Quick start for local development

git clone https://github.com/spedas/spedas_mcp.git
cd spedas_mcp
uv sync --extra dev --extra mcp
uv run --extra mcp python -m spedas_mcp

Run tests and smoke checks:

uv run --extra dev --extra mcp python -m pytest -q
uv run --extra mcp python scripts/smoke_mcp_list_tools.py --json
uv run --extra dev --extra mcp python scripts/validate_plugin_packages.py

The list-tools smoke starts the stdio MCP server with isolated temporary cache directories, performs MCP initialize + list_tools, and verifies the expected advertised tool names. It does not fetch CDAWeb/PDS data or download SPICE kernels.

MCP client configuration

Example stdio configuration:

{
  "mcpServers": {
    "spedas": {
      "command": "uv",
      "args": ["run", "--extra", "mcp", "python", "-m", "spedas_mcp"],
      "cwd": "/path/to/spedas_mcp"
    }
  }
}

For plugin-style distribution, see:

  • plugins/spedas-claude/ — Claude Code wrapper.
  • .agents/plugins/spedas-codex/ — Codex plugin wrapper.
  • plugins/README.md — plugin packaging notes.

Maintainer-facing positioning

spedas_mcp should be thick at the SPEDAS data/workflow layer and thin at the backend implementation layer:

  • Users see one SPEDAS MCP and one data layer.
  • Data source categories are scientific concepts: CDAWeb, PDS, SPICE/geometry.
  • Backend packages remain maintainable internal implementation surfaces.
  • Higher-level tools should encode reusable SPEDAS scientific method: source selection, planning, provenance, and artifact discipline.

See docs/maintainer_note.md and docs/examples/agent_workflow.md for the current framing.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured