NASA MCP Server

ISC License
104
23
  • Apple
  • Linux

Integrations

  • Provides access to 20+ NASA data sources including APOD, Mars Rover Photos, EPIC, DONKI, NEO, EONET, TLE, JPL Solar System Dynamics, Earth Data APIs, and POWER, allowing AI models to retrieve and process space imagery, celestial object data, and Earth observation information through a standardized interface.

  • Implements input validation and sanitization for NASA API requests using Zod schemas to ensure proper formatting and security.

NASA MCP 서버

NASA API용 모델 컨텍스트 프로토콜(MCP) 서버로, AI 모델이 NASA의 방대한 데이터 소스와 상호 작용할 수 있는 표준화된 인터페이스를 제공합니다. 이 서버는 공식 모델 컨텍스트 프로토콜 사양을 구현합니다.

MCP 커뮤니티의 지원과 지도에 큰 감사를 표합니다!

특징

  • 단일하고 일관된 인터페이스를 통해 20개 이상의 NASA 데이터 소스에 액세스
  • AI 소비에 최적화된 표준화된 데이터 형식
  • 자동 매개변수 검증 및 오류 처리
  • NASA API 키에 대한 속도 제한 관리
  • 포괄적인 문서 및 예제
  • 다양한 NASA 이미지 형식 지원
  • LLM 호환성을 위한 데이터 변환 및 포맷팅
  • 크로스 플랫폼 지원(Windows, macOS, Linux)

부인 성명

이 프로젝트는 NASA(미국 항공우주국) 또는 그 자회사나 계열사와 제휴, 보증 또는 관련이 없습니다. NASA의 공개 API에 접근하는 독립적인 구현입니다. 사용되는 모든 NASA 데이터는 공개적으로 이용 가능하며 NASA의 데이터 사용 정책이 적용됩니다.

설치

npx로 실행

지엑스피1

API 키를 명령줄 인수로 전달할 수도 있습니다.

npx -y @programcomputer/nasa-mcp-server@latest --nasa-api-key=YOUR_API_KEY

서버 전송 이벤트(SSE)에 SuperGateway 사용

SSE(Server-Sent Events)에 SuperGateway를 사용할 수 있습니다.

NASA-MCP-server 개발자는 SuperGateway 저장소를 보증하지 않습니다. 이 정보는 SSE 기능을 자체적으로 구현하려는 사용자를 위해 제공됩니다.

수동 설치

# Clone the repository git clone https://github.com/ProgramComputer/NASA-MCP-server.git # Install dependencies cd NASA-MCP-server npm install # Run with your API key NASA_API_KEY=YOUR_API_KEY npm start

커서에서 실행

커서 구성 🖥️ 참고: 커서 버전 0.45.6+ 필요

커서에서 NASA MCP 서버를 구성하려면:

커서 구성 디렉토리에 다음 내용으로 mcp.json 파일을 만들거나 편집하세요.

{ "mcpServers": { "nasa-mcp": { "command": "npx", "args": ["-y", "@programcomputer/nasa-mcp-server@latest"], "env": { "NASA_API_KEY": "your-api-key" } } } }

your-api-key https://api.nasa.gov/ 의 NASA API 키로 바꾸세요.

구성을 추가한 후 Cursor를 다시 시작하여 새로운 NASA 도구를 확인하세요. Composer Agent는 우주 관련 쿼리에 적합한 경우 NASA MCP를 자동으로 사용합니다.

환경 변수

서버는 다음 환경 변수로 구성할 수 있습니다.

변하기 쉬운설명
NASA_API_KEYNASA API 키(api.nasa.gov에서 받으세요)

NASA API 포함

이 MCP 서버는 다음 NASA API를 통합합니다.

  1. NASA 오픈 API (api.nasa.gov):
    • APOD(오늘의 천문 사진)
    • EPIC(지구 다색 이미징 카메라)
    • DONKI(우주 날씨 알림, 지식, 정보 데이터베이스)
    • 인사이트(화성 기상청)
    • 화성 탐사선 사진
    • NEO(Near Earth Object Web Service)
    • EONET(지구 관측소 자연 현상 추적기)
    • TLE(2줄 요소)
    • NASA 이미지 및 비디오 라이브러리
    • 외계행성 아카이브
    • NASA 사운드 API(베타)
    • POWER (전 세계 에너지 자원 예측)
  2. JPL 태양계 역학 API (ssd-api.jpl.nasa.gov):
    • SBDB(소형체 데이터베이스)
    • SBDB 근접 접근 데이터
    • 파이어볼 데이터
    • 스카우트 API
  3. 지구 데이터 API :
    • GIBS(글로벌 영상 검색 서비스)
    • CMR(공통 메타데이터 저장소) - 고급 검색 기능으로 강화됨
    • EPIC(지구 다색 이미징 카메라)
    • FIRMS(소방자원관리시스템 화재정보)

API 메서드

각 NASA API는 표준화된 MCP 방법을 통해 노출됩니다.

APOD(오늘의 천문 사진)

{ "method": "nasa/apod", "params": { "date": "2023-01-01", // Optional: YYYY-MM-DD format "count": 5, // Optional: Return a specified number of random images "thumbs": true // Optional: Return URL of video thumbnail } }

화성 탐사선 사진

{ "method": "nasa/mars-rover", "params": { "rover": "curiosity", // Required: "curiosity", "opportunity", or "spirit" "sol": 1000, // Either sol or earth_date is required "earth_date": "2023-01-01", // YYYY-MM-DD format "camera": "FHAZ" // Optional: Filter by camera type } }

지구 근처 천체

{ "method": "nasa/neo", "params": { "start_date": "2023-01-01", // Required: YYYY-MM-DD format "end_date": "2023-01-07" // Required: YYYY-MM-DD format (max 7 days from start) } }

GIBS(글로벌 이미지 검색 서비스)

{ "method": "nasa/gibs", "params": { "layer": "MODIS_Terra_CorrectedReflectance_TrueColor", // Required: Layer ID "date": "2023-01-01", // Required: YYYY-MM-DD format "format": "png" // Optional: "png" or "jpg" } }

POWER (전 세계 에너지 자원 예측)

{ "method": "nasa/power", "params": { "parameters": "T2M,PRECTOTCORR,WS10M", // Required: Comma-separated list "community": "re", // Required: Community identifier "latitude": 40.7128, // Required: Latitude "longitude": -74.0060, // Required: Longitude "start": "20220101", // Required: Start date (YYYYMMDD) "end": "20220107" // Required: End date (YYYYMMDD) } }

사용 가능한 모든 메서드와 매개변수에 대한 전체 문서는 /docs 디렉토리의 API 참조에서 확인하세요.

로깅 시스템

서버에는 포괄적인 로깅이 포함되어 있습니다.

  • 운영 현황 및 진행 상황
  • 성과 지표
  • 요금 제한 추적
  • 오류 조건
  • 요청 검증

로그 메시지 예:

[INFO] NASA MCP Server initialized successfully [INFO] Processing APOD request for date: 2023-01-01 [INFO] Fetching Mars Rover data for Curiosity, sol 1000 [WARNING] Rate limit threshold reached (80%) [ERROR] Invalid parameter: 'date' must be in YYYY-MM-DD format

보안 고려 사항

이 MCP 서버는 모델 컨텍스트 프로토콜 사양을 따르는 보안 모범 사례를 구현합니다.

  • Zod 스키마를 사용한 입력 검증 및 정리
  • 임의의 코드 실행 금지
  • 명령 주입에 대한 보호
  • 정보 유출을 방지하기 위한 적절한 오류 처리
  • API 요청에 대한 속도 제한 및 시간 초과 제어
  • 세션 전체에서 악용될 수 있는 지속적인 상태가 없습니다.

개발

# Clone the repository git clone https://github.com/ProgramComputer/NASA-MCP-server.git # Install dependencies npm install # Copy the example environment file and update with your API keys cp .env.example .env # Build the TypeScript code npm run build # Start the development server npm run dev # Run tests npm test

MCP Inspector로 테스트

NASA MCP 서버에는 MCP Inspector를 사용하여 API를 테스트하는 데 도움이 되는 스크립트가 포함되어 있습니다.

# Run the provided test script ./scripts/test-with-inspector.sh

이렇게 하면:

  1. 최신 변경 사항이 포함되도록 프로젝트를 빌드하세요.
  2. NASA MCP 서버가 실행 중인 상태에서 MCP Inspector를 시작합니다.
  3. 모든 NASA API를 대화형으로 테스트할 수 있습니다.

테스트 요청 예시

저장소에는 MCP 검사기에 복사하여 붙여넣을 수 있는 각 API에 대한 예제 테스트 요청이 포함되어 있습니다.

# View the example test requests cat docs/inspector-test-examples.md

자세한 예는 Inspector Test Examples 문서를 참조하세요.

MCP 클라이언트 사용

이 서버는 공식 모델 컨텍스트 프로토콜(MCP)을 따릅니다. MCP SDK와 함께 사용하는 방법의 예는 다음과 같습니다.

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: Get today's Astronomy Picture of the Day const apodResult = await client.request({ method: "nasa/apod", params: {} }); // Example: Get Mars Rover photos const marsRoverResult = await client.request({ method: "nasa/mars-rover", params: { rover: "curiosity", sol: 1000 } }); // Example: Search for Near Earth Objects const neoResults = await client.request({ method: "nasa/neo", params: { start_date: '2023-01-01', end_date: '2023-01-07' } }); // Example: Get satellite imagery from GIBS const satelliteImage = await client.request({ method: "nasa/gibs", params: { layer: 'MODIS_Terra_CorrectedReflectance_TrueColor', date: '2023-01-01' } }); // Example: Use the new POWER 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" } });

기여하다

  1. 저장소를 포크하세요
  2. 기능 브랜치를 생성하세요
  3. 테스트 실행: npm test
  4. 풀 리퀘스트 제출

특허

ISC 라이센스 - 자세한 내용은 라이센스 파일을 참조하세요.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

APOD, 화성 탐사선 사진, 위성 이미지, 우주 날씨 데이터 등 NASA의 광범위한 데이터 소스와 AI 모델이 상호 작용할 수 있도록 표준화된 인터페이스를 제공하는 모델 컨텍스트 프로토콜 서버입니다.

  1. Features
    1. Disclaimer
      1. Installation
        1. Running with npx
        2. Using SuperGateway for Server-Sent Events (SSE)
        3. Manual Installation
        4. Running on Cursor
      2. Environment Variables
        1. Included NASA APIs
          1. API Methods
            1. APOD (Astronomy Picture of the Day)
            2. Mars Rover Photos
            3. Near Earth Objects
            4. GIBS (Global Imagery Browse Services)
            5. POWER (Prediction Of Worldwide Energy Resources)
          2. Logging System
            1. Security Considerations
              1. Development
                1. Testing with MCP Inspector
                  1. Example Test Requests
                2. MCP Client Usage
                  1. Contributing
                    1. License

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        A Model Context Protocol server that provides persistent task management capabilities for AI assistants, allowing them to create, update, and track tasks beyond their usual context limitations.
                        Last updated -
                        1
                        TypeScript
                      • -
                        security
                        F
                        license
                        -
                        quality
                        A demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.
                        Last updated -
                        Python
                        • Linux
                        • Apple
                      • A
                        security
                        F
                        license
                        A
                        quality
                        A Model Context Protocol server implementation that provides structured, AI-friendly access to eRegulations data, making it easier for AI models to answer user questions about administrative procedures.
                        Last updated -
                        4
                        28
                        TypeScript
                        • Linux
                        • Apple
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A customizable Model Context Protocol server implementation that enables AI models to interact with external tools including weather queries, Google search, and camera control functionality.
                        Last updated -
                        8
                        Python
                        Apache 2.0
                        • Linux
                        • Apple

                      View all related MCP servers

                      ID: o0n1e0no5o