Provides access to NASA's public APIs including Astronomy Picture of the Day (APOD), Mars rover photos, Near-Earth Objects tracking, DONKI space weather events, and EPIC Earth imagery from the DSCOVR satellite.
MCP TypeScript NASA Server
A TypeScript-based MCP (Model Context Protocol) server that provides seamless integration with NASA's public APIs, enabling AI assistants to access space and astronomy data including APOD, Mars rover photos, Near-Earth Objects, space weather, and Earth imagery.
š Features
š 5 NASA API Tools: APOD, Mars Rovers, NEO Feed, DONKI Space Weather, EPIC Earth Imagery
š Resources Support: Access NASA data via URI-based resources (static & dynamic)
š¬ Prompts Templates: Pre-built prompts for education and analysis
š¦ NPX Ready: Run instantly with
npx mcp-ts-stdio-nasaš§ Type-Safe: Full TypeScript implementation with Zod validation
šÆ MCP Compliant: Full Model Context Protocol specification support
ā” Easy Setup: Works with Claude Desktop and other MCP clients
š API Key Support: Use your own NASA API key or the demo key
š Quick Start
Run with NPX (Recommended - No Installation Required)
This command downloads and runs the latest version directly from npm.
Install Globally
Install as Dependency
š§ Configuration
Claude Desktop Setup
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Environment Variables
Create a .env file in your project root:
š ļø Available Tools
1. nasa_apod - Astronomy Picture of the Day
Get NASA's daily featured astronomy image with detailed explanation.
Parameters:
date(optional): Date in YYYY-MM-DD format
Example Query:
2. nasa_mars_rover_photos - Mars Rover Photography
Fetch photos from Mars rovers including Curiosity, Opportunity, Spirit, and Perseverance.
Parameters:
rover: Rover name (curiosity, opportunity, spirit, perseverance)sol(optional): Martian dayearth_date(optional): Earth date in YYYY-MM-DDcamera(optional): Camera type (FHAZ, RHAZ, NAVCAM, etc.)limit: Maximum photos to return (1-25)
Example Query:
3. nasa_neo_feed - Near Earth Objects
Track asteroids and comets passing near Earth.
Parameters:
start_date(optional): Start date in YYYY-MM-DDend_date(optional): End date in YYYY-MM-DD
Example Query:
4. nasa_donki_space_weather - Space Weather Events
Monitor solar flares, coronal mass ejections, and other space weather phenomena.
Parameters:
event_type: Event type (FLR, SEP, CME, IPS, MPC, GST, RBE)start_date(optional): Start dateend_date(optional): End date
Event Types:
FLR: Solar FlareSEP: Solar Energetic ParticleCME: Coronal Mass EjectionIPS: Interplanetary ShockMPC: Magnetopause CrossingGST: Geomagnetic StormRBE: Radiation Belt Enhancement
Example Query:
5. nasa_epic_earth_imagery - Earth Polychromatic Imaging
Get full-disc Earth images from the DSCOVR satellite.
Parameters:
image_type: natural or enhanceddate(optional): Date in YYYY-MM-DDlimit: Maximum images (1-20)
Example Query:
š Resources
Resources provide direct access to NASA data via URIs:
Static Resources
nasa://config- NASA API configuration and statusnasa://missions/current- List of current NASA missionsnasa://neo/today- Today's Near-Earth Objects
Dynamic Resources (with URI templates)
nasa://apod/{date}- APOD for specific date (e.g.,nasa://apod/2024-01-15)nasa://rover/{rover}/latest- Latest photos from Mars rovers
Example Usage:
š¬ Prompts
Pre-configured prompts for common NASA data queries:
1. explain-apod - Educational APOD Explanation
Parameters:
date(optional): YYYY-MM-DD formataudience(optional): child, student, or expert
Example:
2. space-weather-report - Space Weather Analysis
Parameters:
days(optional): 1-7 days to analyzefocus(optional): solar-flares, cme, geomagnetic, or all
Example:
3. asteroid-analysis - NEO Risk Assessment
Parameters:
timeframe(optional): today, week, or monthhazardous_only(optional): true/false
Example:
š Status
ā Published and Working - The package has been successfully published to npm and tested with Claude Desktop.
Latest Version: 0.2.0
npm Package: mcp-ts-stdio-nasa
Installation: Works via npx, global install, or as a dependency
š» Development
Setup
Scripts
npm run build- Build TypeScript to JavaScriptnpm run clean- Clean build artifactsnpm run dev- Watch mode for developmentnpm run lint- Run ESLintnpm run format- Format with Prettiernpm run mcp:inspect- Test with MCP Inspector
Testing with MCP Inspector
This opens the MCP Inspector for interactive testing of all tools.
š Project Structure
š NASA API Information
This server uses NASA's public APIs. You can:
Use
DEMO_KEYfor testing (limited rate)Get a free API key at https://api.nasa.gov/
Most endpoints allow 1000 requests/hour with an API key
API Documentation
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
NASA for providing public APIs
Anthropic for the MCP specification
Model Context Protocol community
š§ Contact
Author: Jez (Jeremy Dawes)
Email: jeremy@jezweb.net
Website: www.jezweb.com.au
š Links
Made with ā¤ļø for the space and AI communities