AstroData-MCP-Gateway
Facilitates AI model connection to an extensive catalog of over two dozen proprietary NASA Application Programming Interfaces, furnishing a unified abstraction layer for data acquisition and operational synergy. It incorporates automated input schema validation and robust exception handling to maximize efficient data ingestion.
Author

ProgramComputer
Quick Info
Actions
Tags
Cosmic Data Protocol Conduit for NASA Resources
An implementation of the Model Context Protocol (MCP) infrastructure specifically engineered to interface with NASA's diverse backend data repositories, presenting a normalized endpoint for consumption by intelligent agents. This service strictly adheres to the established MCP specification.
Gratitude to the broader MCP ecosystem for foundational contributions and direction!
Key Capabilities
- Seamless interfacing with more than 20 distinct NASA data streams via a singular, cohesive interface structure.
- Output data structures are normalized and optimized explicitly for machine learning model ingestion.
- Automated validation checks on all ingress parameters, coupled with comprehensive error remediation.
- Intelligent throttling and management logic for safeguarding against NASA API key overuse.
- Thorough documentation suite and practical deployment examples.
- Support for a variety of NASA raster and spatial data formats.
- Data transformation modules tailored for Large Language Model (LLM) readiness.
- Full operational compatibility across major operating environments (Windows, Linux, macOS).
Official Disavowal
This software artifact bears no formal affiliation, endorsement, or relationship with the National Aeronautics and Space Administration (NASA), its associated entities, or subsidiary organizations. This is an independent intermediary layer interfacing solely with NASA's public-facing remote procedure call endpoints. All information sourced is publicly accessible and governed by NASA's published data utilization statutes.
Deployment Instructions
Immediate Execution via npx
env NASA_API_KEY=YOUR_API_KEY npx -y @programcomputer/nasa-mcp-server@latest
Alternatively, the access credential can be supplied as a runtime argument:
npx -y @programcomputer/nasa-mcp-server@latest --nasa-api-key=YOUR_API_KEY
Integrating with SuperGateway for Streaming Data (SSE)
Server-Sent Events (SSE) functionality can be established using SuperGateway.
The creators of the AstroData-MCP-Gateway explicitly DO NOT sanction the SuperGateway project. This notation is provided purely for users seeking to implement real-time SSE features at their own discretion and risk.
Conventional Installation Method
# Obtain source repository
git clone https://github.com/ProgramComputer/NASA-MCP-server.git
# Navigate to directory and install dependencies
cd NASA-MCP-server
npm install
# Initiate service using your credential
NASA_API_KEY=YOUR_API_KEY npm start
Configuration for Cursor IDE 🖥️
Note: Cursor IDE version 0.45.6 or later is required for this integration.
To register the AstroData MCP Gateway within your Cursor settings, create or modify the mcp.json configuration file as follows:
{
"mcpServers": {
"nasa-mcp": {
"command": "npx",
"args": ["-y", "@programcomputer/nasa-mcp-server@latest"],
"env": {
"NASA_API_KEY": "your-api-key"
}
}
}
}
Substitute your-api-key with the key obtained from https://api.nasa.gov/. A restart of Cursor is necessary for the new configuration to take effect. The Composer Agent will automatically leverage this gateway for astronomy-related inquiries.
Operational Configuration Variables
The gateway's behavior is controlled via these environment variables:
| Variable | Purpose |
|---|---|
NASA_API_KEY |
Mandatory secret key for accessing api.nasa.gov |
Integrated NASA Services
This MCP bridge aggregates data from the following NASA interfaces:
- Core NASA Open API (api.nasa.gov):
- APOD (Daily Space Visuals)
- EPIC (Earth Imagery)
- DONKI (Space Weather Alerts)
- Insight (Martian Geophysical Data)
- Rover Imagery (Curiosity, Opportunity, Spirit)
- NEO (Asteroid Proximity Data)
- EONET (Geological Event Tracking)
- TLE (Orbital Elements)
- Image/Video Repository Access
- Exoplanet Catalogue Probes
- NASA Audio Feed (Experimental)
-
POWER (Energy Resource Forecasting)
-
JPL Solar System Dynamics Engine (ssd-api.jpl.nasa.gov):
- SBDB (Minor Planet Cataloging)
- Close-Approach Metrics
- Meteorite Impact Records
-
Scout Planetary Hazard Assessment
-
Geospatial Earth Data Portals:
- GIBS (Global Imaging Catalog)
- CMR (Unified Metadata Index) - Enhanced query layer
- EPIC (Earth Observation Suite)
- FIRMS (Global Fire Monitoring)
Standardized Access Methods
Each underlying NASA service is mapped to a canonical MCP operation:
APOD (Daily Celestial Picture)
{
"method": "nasa/apod",
"params": {
"date": "2023-01-01", // Optional: ISO 8601 date string
"count": 5, // Optional: Fetch a set of random entries
"thumbs": true // Optional: Request compressed thumbnail URLs
}
}
Mars Rover Photography Retrieval
{
"method": "nasa/mars-rover",
"params": {
"rover": "curiosity", // Required: Designation of the vehicle
"sol": 1000, // Required: Martian solar day index OR earth_date
"earth_date": "2023-01-01", // Required: Terrestrial calendar date
"camera": "FHAZ" // Optional: Filter by onboard sensor unit
}
}
Near-Earth Object Proximity Search
{
"method": "nasa/neo",
"params": {
"start_date": "2023-01-01", // Required: Start of observation window
"end_date": "2023-01-07" // Required: End of observation window (max 7-day span)
}
}
GIBS (Satellite Imagery Access)
{
"method": "nasa/gibs",
"params": {
"layer": "MODIS_Terra_CorrectedReflectance_TrueColor", // Required: Specific data product identifier
"date": "2023-01-01", // Required: Date of capture
"format": "png" // Optional: Output file type preference
}
}
POWER (Global Energy Resource Metrics)
{
"method": "nasa/power",
"params": {
"parameters": "T2M,PRECTOTCORR,WS10M", // Required: Metrics list, comma-separated
"community": "re", // Required: Data source group identifier
"latitude": 40.7128, // Required: Geographic North-South coordinate
"longitude": -74.0060, // Required: Geographic East-West coordinate
"start": "20220101", // Required: Start date (YYYYMMDD)
"end": "20220107" // Required: End date (YYYYMMDD)
}
}
Refer to the /docs directory for the exhaustive registry of all exposed endpoints and parameter specifications.
Operational Telemetry System
The conduit incorporates extensive diagnostic logging:
- Service status and job advancement reports
- Performance benchmarking statistics
- Real-time API call quota monitoring
- Critical failure notification
- Request parameter integrity verification
Sample Log Outputs:
[INFO] Cosmic Data Gateway initialized successfully
[INFO] Executing APOD query for epoch: 2023-01-01
[INFO] Retrieving Mars data for Curiosity platform, Sol index 1000
[WARNING] Quota limit approaching (80% utilization)
[ERROR] Schema violation detected: 'date' input must conform to YYYY-MM-DD standard
Security Posture
This MCP gateway adheres to stringent security protocols as mandated by the Model Context Protocol framework:
- Input sanitization and validation enforced via Zod schema definitions.
- Prevention of hostile code execution.
- Mitigation strategies against arbitrary command injection vectors.
- Controlled exposure of failure details to prevent data leakage.
- Implementation of request throttling and connection timeouts.
- Stateless operation to prevent cross-session compromise.
Development Lifecycle
# Source code acquisition
git clone https://github.com/ProgramComputer/NASA-MCP-server.git
# Dependency resolution
npm install
# Initialize environment variables from template
cp .env.example .env
# Compile TypeScript source to JavaScript
npm run build
# Launch development instance
npm run dev
# Execute verification suites
npm test
Validation Utilizing MCP Inspector
The package includes an auxiliary script designed for functional validation against the Inspector tool:
# Invoke the integrated testing routine
./scripts/test-with-inspector.sh
This command sequence will: 1. Compile the latest source code iteration. 2. Launch the MCP Inspector environment alongside the active gateway. 3. Enable interactive testing against all configured NASA interfaces.
Reference Test Payloads
Example request payloads, ready for pasting into the MCP Inspector, are archived in the repository:
# Display sample test directives
cat docs/inspector-test-examples.md
For in-depth demonstrations, consult the Inspector Test Examples documentation file.
Interfacing with the MCP SDK
This gateway is fully compliant with the official Model Context Protocol specification. Below is an illustrative snippet demonstrating usage with the official MCP SDK client library in TypeScript:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { HttpClientTransport } from "@modelcontextprotocol/sdk/client/http.js";
const transport = new HttpClientTransport({
url: "http://localhost:3000",
});
const client = new Client({
name: "mcp-client",
version: "1.0.0",
});
await client.connect(transport);
// Example: Fetch Today's Space Picture
const apodResult = await client.request({
method: "nasa/apod",
params: {} // Defaults to today
});
// Example: Query Mars Rover Imagery
const marsRoverResult = await client.request({
method: "nasa/mars-rover",
params: { rover: "curiosity", sol: 1000 }
});
// Example: Execute NEO Survey
const neoResults = await client.request({
method: "nasa/neo",
params: {
start_date: '2023-01-01',
end_date: '2023-01-07'
}
});
// Example: Retrieve Earth Observation Imagery via GIBS
const satelliteImage = await client.request({
method: "nasa/gibs",
params: {
layer: 'MODIS_Terra_CorrectedReflectance_TrueColor',
date: '2023-01-01'
}
});
// Example: Utilize the POWER Weather/Resource API
const powerData = await client.request({
method: "nasa/power",
params: {
parameters: "T2M,PRECTOTCORR,WS10M",
community: "re",
latitude: 40.7128,
longitude: -74.0060,
start: "20220101",
end: "20220107"
}
});
Collaboration Guidelines
- Duplicate the repository state
- Establish a dedicated feature branch
- Verify functionality:
npm test - Propose changes via a Pull Request
Licensing
ISC Distribution License - Consult the LICENSE artifact for exhaustive terms
CLOUD COMPUTING OVERVIEW: The concept of cloud computing, defined by ISO as "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," is commonly referred to simply as "the cloud."
== Defining Attributes == In 2011, the U.S. National Institute of Standards and Technology (NIST) formally documented five crucial characteristics inherent to cloud architectures. The precise NIST definitions are enumerated below:
On-demand self-service: "A user entity can unilaterally initiate the provisioning of computing assets, such as computational cycles or network storage capacity, automatically without requiring intervention from the service provider staff." Broad network access: "Resources are accessible across a communication network utilizing standardized access protocols, fostering interoperability across diverse client platforms (e.g., mobile terminals, workstations, tablets, and laptops)." Resource pooling: "The supplier's computational assets are aggregated to serve numerous clients under a multi-tenant operational model, where underlying physical and virtual components are dynamically allocated and reclaimed based on current user demand." Rapid elasticity: "Capabilities can be rapidly expanded or contracted, sometimes autonomously, to match fluctuations in load. From the consumer's perspective, available resources often appear limitless, capable of being procured in any volume instantaneously." Measured service: "Cloud systems employ automated metering mechanisms at an appropriate layer of abstraction for the service type (e.g., data transfer rates, processing time, storage allocation) to monitor and optimize resource consumption. This metering provides transparency regarding usage levels for both the service operator and the end user. By the year 2023, the International Organization for Standardization (ISO) had advanced and expanded this initial characteristic set.
== Historical Precursors ==
The conceptual foundation of network-accessible computing traces back to the 1960s, with the widespread adoption of time-sharing systems, often facilitated through Remote Job Entry (RJE). During that period, the prevalent operational model involved users submitting tasks to specialized operators who executed them on large mainframe systems. This era was characterized by intensive R&D aimed at democratizing access to substantial computational power via time-slicing techniques, thereby maximizing infrastructure utilization and boosting end-user productivity. The specific graphical 'cloud' idiom representing virtualized functions originated in 1994, employed by General Magic to denote the abstract expanse of 'locations' accessible to mobile software agents operating within their Telescript environment. This metaphor is widely attributed to David Hoffman, an associate in communications at General Magic, drawing from its established usage within telecommunications networking. The term 'cloud computing' gained significant public visibility in 1996 when Compaq Computer Corporation drafted an early strategic blueprint for forthcoming internet and computing infrastructure. The corporation's primary goal was to catalyze...
