AI-Powered Space Mission Tracking Platform with Real-Time Data
Galactic Grid is a complete Model Context Protocol (MCP) implementation that brings live space data directly to your fingertips. This web application features an AI assistant that doesn't just chat - it provides real-time updates on space missions, International Space Station position, and rocket launches using live data streams from NASA, SpaceX, and other space agencies.
What makes this special: This is a full production implementation of MCP, demonstrating how AI assistants can use live tools and real-time data sources. The AI automatically fetches current information every time you ask a question, so you're always getting the most up-to-date space data available.
Get Real-Time Space Updates - Ask questions like "Where is the ISS right now?" and receive live data fetched directly from NASA APIs at the moment you ask. Every query triggers fresh data retrieval, ensuring you always have current information.
Live ISS Tracking - Watch the International Space Station's position update in real-time on Earth, including coordinates, altitude, and orbital information. The tracker automatically refreshes every 10 seconds with live NASA data.
Stream Space Mission Data - Get current information about SpaceX missions, upcoming rocket launches, and space agency activities. The AI uses MCP tools to fetch the latest data from multiple space APIs simultaneously.
Experience Live MCP Integration - See a working Model Context Protocol implementation in action, where the AI seamlessly calls live tools and resources to provide you with real-time space information.
Beautiful Space Interface - Navigate through a space-themed interface with Earth visualization and star fields, all powered by live data streams.
- Node.js 18 or newer
- pnpm package manager
- OpenAI API key (for the AI chat feature)
- Get the code
git clone https://github.com/samiur-r/galactic-grid.git
cd galactic-grid- Install dependencies
pnpm install- Set up your API keys
Copy the example environment file:
cp .env.example .env.localEdit .env.local and add your API keys:
# Required for AI chat
OPENAI_API_KEY=your_openai_api_key_here
# Optional - for higher rate limits with space APIs
NASA_API_KEY=your_nasa_api_key_here- Start the application
pnpm run dev- Open in your browser
Visit http://localhost:3000 and start exploring space data.
The chat interface on the left side of the screen connects to an AI assistant that can answer space-related questions using live data. Try asking:
- "Where is the ISS right now?"
- "Tell me about SpaceX missions"
- "What rockets are launching soon?"
- "Show me ISS orbital data"
The AI will automatically use the appropriate tools to fetch real-time information and provide detailed responses.
The ISS tracker on the right side shows the International Space Station's current position above Earth. It displays:
- Current latitude and longitude coordinates
- Altitude above Earth's surface
- Orbital velocity and period
- Automatic updates every 10 seconds
You can toggle the auto-refresh feature or manually update the position using the controls.
Run the comprehensive test to verify everything is working:
node scripts/test-client.mjs http://localhost:3000This will test all the AI tools and data sources to make sure they're responding correctly.
Galactic Grid uses a "self-serving" architecture where the application provides its own MCP (Model Context Protocol) server. Here's how the data flows:
- Frontend UI - React interface for chat and ISS tracking
- AI Chat API - GPT-4 powered assistant with access to MCP tools
- MCP Server - Provides tools and resources for space data
- Space APIs - Live data from NASA, SpaceX, and other sources
The AI assistant has access to three main tools:
- getMissionDetails - Get detailed information about specific space missions
- getISSPosition - Real-time ISS position and orbital data from NASA
- getUpcomingLaunches - Upcoming rocket launches with countdown timers
- NASA APIs - Real ISS position and orbital data
- SpaceX API - Mission and launch information (using mock data currently)
- Launch Library - Global launch schedules (using mock data currently)
- Next.js 15 - Modern React framework with server-side rendering
- TypeScript - Type-safe JavaScript for better development
- Tailwind CSS - Utility-first styling for the space-themed interface
- Vercel AI SDK - Handles AI chat and streaming responses
- Model Context Protocol - Enables AI to use live tools and data
- OpenAI GPT-4 - Powers the intelligent space assistant
- Zod - Schema validation for all space data
- Space APIs - Integration with NASA, SpaceX, and Launch Library
galactic-grid/
βββ src/
β βββ app/
β β βββ api/
β β β βββ chat/route.ts # AI chat with MCP tools
β β β βββ mcp/route.ts # MCP server implementation
β β βββ layout.tsx # Application layout
β β βββ page.tsx # Main dashboard page
β βββ components/space/
β β βββ chat-interface.tsx # AI chat interface
β β βββ iss-tracker.tsx # ISS position tracker
β βββ lib/
β β βββ mcp/ # MCP client and utilities
β β βββ space-apis/ # Space API integration
β βββ types/
β βββ env.ts # Environment configuration
β βββ space.ts # Space data type definitions
βββ scripts/
β βββ test-client.mjs # Testing script for MCP tools
βββ .env.example # Environment variables template
βββ CLAUDE.md # Development guidelines
pnpm run dev- Start development serverpnpm run build- Build for productionpnpm run start- Start production serverpnpm run lint- Check code quality
The application is designed to be extensible. You can:
- Add new MCP tools in
src/app/api/mcp/route.ts - Integrate additional space APIs in
src/lib/space-apis/ - Create new UI components in
src/components/space/ - Expand the AI's capabilities by modifying the chat interface
All configuration is handled through environment variables:
# Required
OPENAI_API_KEY=your_openai_api_key_here
# Optional - for higher API rate limits
NASA_API_KEY=your_nasa_api_key_here
LAUNCH_LIBRARY_API_KEY=your_launch_library_key_hereFully Working Features:
- AI chat with live MCP tool integration
- Real-time ISS position tracking from NASA APIs
- Beautiful space-themed user interface
- Complete MCP server with tools and resources
- Type-safe development with full TypeScript support
Ready for Enhancement:
- Deploy to Vercel for public access
- Add more space agency API integrations
- Include 3D orbital visualization
- Add user authentication and personalized tracking
- Issues - Report bugs or request features on GitHub Issues
- Discussions - Ask questions on GitHub Discussions
We welcome contributions! To get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and test them
- Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
Thanks to the organizations and communities that make this project possible:
- NASA for providing open space data APIs
- SpaceX for making mission information publicly available
- MCP Community for developing the Model Context Protocol
- Vercel for the AI SDK and deployment platform
- OpenAI for GPT-4 integration capabilities
Built for space enthusiasts and developers interested in AI tool integration
Try asking the AI "Where is the ISS?" to see live NASA data in action