NASA MCP Server
NASA MCP サーバー
NASA API用のモデルコンテキストプロトコル(MCP)サーバー。AIモデルがNASAの膨大なデータソースと連携するための標準化されたインターフェースを提供します。このサーバーは、公式のモデルコンテキストプロトコル仕様を実装しています。
サポートと指導をいただいた MCP コミュニティに心から感謝します。
特徴
単一の一貫したインターフェースを通じて 20 以上の NASA データ ソースにアクセスできます
AI利用に最適化された標準化されたデータ形式
自動パラメータ検証とエラー処理
NASA APIキーのレート制限管理
包括的なドキュメントと例
さまざまなNASA画像形式のサポート
LLM 互換性のためのデータ変換とフォーマット
クロスプラットフォームサポート(Windows、macOS、Linux)
Related MCP server: NASA APOD MCP Server
免責事項
このプロジェクトは、NASA(アメリカ航空宇宙局)またはその子会社・関連機関とは一切関係がなく、提携、承認、または関連関係もありません。NASAの公開APIにアクセスする独立した実装です。使用されているNASAのデータはすべて公開されており、NASAのデータ利用ポリシーに準拠しています。
インストール
npxで実行
env NASA_API_KEY=YOUR_API_KEY npx -y @programcomputer/nasa-mcp-server@latestAPI キーをコマンドライン引数として渡すこともできます。
npx -y @programcomputer/nasa-mcp-server@latest --nasa-api-key=YOUR_API_KEYサーバー送信イベント (SSE) に SuperGateway を使用する
Server-Sent Events (SSE) には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 以上が必要です
Cursor で 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 キー (api.nasa.gov で取得) |
NASA APIが含まれています
この MCP サーバーは、次の NASA API を統合します。
NASA オープン API (api.nasa.gov):
APOD(今日の天文写真)
EPIC(地球多色撮像カメラ)
DONKI(宇宙天気予報・知識・情報のデータベース)
インサイト(火星気象サービス)
火星探査車の写真
NEO(地球近傍天体ウェブサービス)
EONET(地球観測自然現象追跡システム)
TLE(2行要素)
NASA画像・動画ライブラリ
太陽系外惑星アーカイブ
NASA サウンド API (ベータ版)
POWER(世界のエネルギー資源予測)
JPL 太陽系ダイナミクス API (ssd-api.jpl.nasa.gov):
SBDB(小天体データベース)
SBDB接近データ
ファイアボールデータ
スカウトAPI
地球データ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 testMCP Inspectorによるテスト
NASA MCP サーバーには、MCP インスペクターを使用して API をテストするのに役立つスクリプトが含まれています。
# Run the provided test script
./scripts/test-with-inspector.shこれにより、次のようになります。
最新の変更が確実に含まれるようにプロジェクトをビルドします
NASA MCPサーバーが稼働している状態でMCPインスペクターを起動します。
NASAのすべてのAPIをインタラクティブにテストできます
テストリクエストの例
リポジトリには、MCP インスペクターにコピーして貼り付けることができる各 API のサンプル テスト リクエストが含まれています。
# View the example test requests
cat docs/inspector-test-examples.md詳細な例については、 「Inspector テストの例」ドキュメントを参照してください。
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"
}
});貢献
リポジトリをフォークする
機能ブランチを作成する
テストを実行:
npm testプルリクエストを送信する
ライセンス
ISC ライセンス - 詳細については LICENSE ファイルを参照してください
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables LLMs to query data from various NASA APIs, allowing access to astronomical data, space weather information, Earth imagery, and exoplanet information directly from compatible AI clients.Last updated216MIT
- Flicense-qualityDmaintenanceMulti-Agent Conversation Protocol server for accessing NASA's Astronomy Picture of the Day (APOD) API, allowing users to retrieve space imagery and related information through natural language interactions.Last updated
- AlicenseAqualityCmaintenanceMCP server providing AI agents with access to NASA and space/astronomy data including APOD, Mars rover photos, near-Earth asteroids, exoplanets, Earth imagery, natural events, and space weather.Last updated11MIT
- FlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that provides access to NASA's Astronomy Picture of the Day (APOD) API.Last updated2
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ProgramComputer/NASA-MCP-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server