Astro Agent
Provides live astronomical telemetry and space data, including ISS tracking, NASA APOD, and solar weather, via a Model Context Protocol server with SSE and JSON-RPC support.
README
🌌 Astro Agent — Space Telemetry & Celestial AI Dashboard
Astro Agent is an immersive, full-stack web application designed for astronomical research, live satellite tracking, and cosmic exploration. Built with an elegant, glassmorphic dark user interface, it provides a unified hub for real-time aerospace telemetry, celestial constellation mapping, and an intelligent space-focused conversational agent.
The application leverages a robust React (Vite) frontend paired with a secure Express.js server, ensuring responsive performance and complete protection of sensitive API credentials.
🎨 Application Previews
1. Astro Agent Dashboard (Homepage)
The main homepage features a professional, high-fidelity three-column dashboard layout designed for maximum scannability and modular data integration:
- Left Column: Live telemetry trackers including Quick Telemetry Scan hot-probes (Satellite, Solar, and Planetary), a click-to-expand NASA APOD thumbnail card, and the main ISS Downlink console showing essential coordinate tracking stats.
- Center Column: The Astro Agent Chat Interface, powered by server-side Gemini AI, allowing users to send custom telemetry context probes or query celestial phenomena.
- Right Column: Dynamic network diagnostics displaying uplink status and the live geocentric Polar Constellation Radar with interactive observer location presets.

2. Expanded ISS Telemetry Console (Sidebar / Popup)
Clicking the ISS Telemetry block or the expand button triggers a dense, telemetry-focused modal console. It displays a real-time tracking reticle over an orbit image of the ISS, synchronized cockpit clock parameters, and precise sliders mapping Latitude, Longitude, Altitude, Orbit Speed, Solar Collection Efficiency, and Communication Link channels.

3. NASA APOD Detailed Viewer (Popup)
Clicking the NASA Picture of the Day (APOD) card opens an elegant overlay modal. It displays a stunning high-resolution view of the cosmic image (or video frame) on the left side, and a scrollable technical documentation panel explaining the capture on the right.

🚀 Key Features & Workflows
1. Real-Time Satellite Tracking Downlink
- 10s Interval Polling: Every 10 seconds, the client fetches fresh orbital telemetry from the server proxy
/api/iss-telemetry. - Elapsed-Time Tickers: Live indicators display exactly how many seconds have elapsed since the last downlink was received, preventing stale telemetry.
- Self-Healing Fallbacks: Built-in network check boundaries automatically switch the ISS viewport to a flat vector blueprint layout if remote image CDNs fail, maintaining cockpit operational status.
2. Secure Server-Side Gemini AI (Astro Core)
- Prompt Injection Probes: Hot-probe telemetry buttons ("Scan Satellites", "Solar Activity", "Planetary Status") dynamically build structured astronomical queries and feed them to Gemini.
- Contextual Understanding: The AI is pre-tuned to act as a cosmic-focused astrodynamics agent, utilizing custom prompts and diagnostic contexts.
3. Celestial Star Constellation Radar
- Polar Projections: Projects active celestial offsets onto a rotating client-side SVG polar coordinate radar.
- Observer Location Presets: Seamless dropdown options update the geocentric observer coordinates instantly (presets for Sydney, Houston, Svalbard, Tokyo, etc.).
4. Fully-Compliant Model Context Protocol (MCP) Server
Astro Agent exposes a native, standard-compliant Model Context Protocol (MCP) server on its Express.js backend, allowing external AI clients, coding assistants, or LLMs to fetch live astronomical telemetry securely:
- Dual Transports: Supports both standard SSE (Server-Sent Events) stream-routing and lightweight direct JSON-RPC 2.0 HTTP POST triggers.
- Registered Tools:
get_iss_telemetry: Queries live orbital positions, velocity parameters, altitude tracking, thermal grids, and solar battery efficiencies.get_apod: Delivers the Astronomy Picture of the Day containing full scientific description logs.get_solar_weather: Pulls active sunspot sweeps, solar wind estimates, flare warnings, and auroral probabilities.
🔌 Integrating the MCP Server (Claude Desktop / Cursor)
To allow external LLM clients to read live data from your Astro Agent tools, configure the server in your local client setup files:
For Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"nasa-astro-agent": {
"command": "node",
"args": ["/absolute/path/to/astro-agent/dist/server.cjs"],
"env": {
"NASA_API_KEY": "your_nasa_api_key_here",
"NODE_ENV": "production"
}
}
}
}
For Real-Time SSE Transport:
Simply stream directly from the active running cockpit instance:
- SSE Endpoint:
http://localhost:3000/api/mcp/sse - POST Message Route:
http://localhost:3000/api/mcp/message
🔒 Security & Safe GitHub Publishing (No Exposed API Keys)
Astro Agent is fully optimized for public publishing to platforms like GitHub without any risk of exposing your private API keys. It adheres to strict modern security best practices:
- Full-Stack Proxying: All queries to external APIs (Google Gemini, NASA APIs) are processed server-side via secure backend routes. The frontend makes simple requests to relative local endpoints:
/api/chat/api/apod/api/iss-telemetry
- Environment Isolation: API keys are never written, embedded, or hardcoded into the React codebase. Instead, they are retrieved from environment variables inside Node's execution context:
process.env.GEMINI_API_KEYprocess.env.NASA_API_KEY
- Secure .gitignore Rules: The project includes a preconfigured
.gitignorefile that safely blocks local.envcredential files from ever being added to a Git commit, while allowing.env.exampleto serve as an open, clean template.
⚙️ Environment Variables
Copy the structure of .env.example and save it as .env in the root folder of your project prior to starting:
# ====================================================================
# ASTRO AGENT SYSTEM CREDENTIALS
# ====================================================================
# Google Gemini AI Key (Retrieve from Google AI Studio: https://aistudio.google.com)
# If left blank, Astro Agent runs in offline simulation backup mode.
GEMINI_API_KEY="AIzaSyYourSecretGeminiAPIKeyHere"
# NASA Open API Key (Retrieve instantly from https://api.nasa.gov)
# If left blank, the app gracefully falls back to rate-limited DEMO_KEY.
NASA_API_KEY="YourSecretNasaAPIKeyHere"
# Environment Settings
NODE_ENV="production"
PORT=3000
🛠️ Installation & Compilation
Ensure Node.js is installed locally on your system, then follow these commands to launch:
1. Retrieve Packages
npm install
2. Run Local Development Server
Launches the dual-channel Express.js proxy and integrates Vite's frontend bundler simultaneously on port 3000:
npm run dev
Open http://localhost:3000 in your browser.
3. Compile & Start in Production
Bundle the React client into high-performance static files, bundle the backend Node code into optimized CommonJS, and start the production build:
# Bundle Frontend and Backend
npm run build
# Start production server
npm start
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。