About Agui Langgraph Fastmcp Demo
Agui Langgraph Fastmcp Demo is an MCP server in the Agents category.
Install
git clone https://github.com/NikhilBaravkarDataScientist/agui-langgraph-fastmcp-demoThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Agui Langgraph Fastmcp Demo
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
🚀 NASA Space Explorer
An interactive chatbot powered by NASA APIs that lets you explore space through natural conversation. Built with LangGraph, FastMCP, and real-time NASA data.
✨ Features
- 🌌 Astronomy Picture of the Day (APOD): Get NASA's stunning daily space images with descriptions
- 🔴 Mars Rover Photos: Access photos from Curiosity, Opportunity, and Spirit rovers
- ☄️ Near Earth Objects (NEO): Track asteroids and potentially hazardous objects near Earth
- 🔍 NASA Media Library: Search through NASA's vast collection of images and videos
- 💬 Natural Language Interface: Chat naturally about space topics and get real-time data
🏗️ Architecture
This application consists of three main components:
- Frontend (Next.js): Modern chat interface with space-themed UI
- Backend (FastAPI + LangGraph): Orchestrates LLM and tool calls using LangGraph
- Tools (FastMCP): MCP server providing NASA API tools
┌─────────────┐ ┌──────────────┐ ┌────────────┐
│ Frontend │─────▶│ Backend │─────▶│ Tools │
│ (Next.js) │ │ (FastAPI) │ │ (FastMCP) │
│ │◀─────│ (LangGraph) │◀─────│ NASA APIs │
└─────────────┘ └──────────────┘ └────────────┘
🚀 Quick Start
Prerequisites
- Docker and Docker Compose
- OpenAI API key
- NASA API key (optional - defaults to DEMO_KEY)
Setup
-
Clone the repository
git clone https://github.com/NikhilBaravkarDataScientist/agui-langgraph-fastmcp-demo.git cd agui-langgraph-fastmcp-demo -
Get your NASA API key (optional but recommended)
- Visit https://api.nasa.gov/
- Sign up for a free API key (takes 30 seconds)
- Free tier: 1,000 requests per hour
- Demo key (DEMO_KEY): 30 requests per hour per IP
-
Configure environment variables
cp .env.example .envEdit
.envand add your keys:OPENAI_API_KEY=your_openai_api_key_here NASA_API_KEY=your_nasa_api_key_here # or use DEMO_KEY -
Start the application
docker-compose up --build -
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Tools MCP Server: http://localhost:9000
💡 Usage Examples
Once the application is running, try these queries:
- "Show me today's astronomy picture" - Get APOD
- "Get photos from Mars Curiosity rover sol 1000" - Mars rover images
- "Are there any asteroids near Earth right now?" - NEO data
- "Search for images of the Hubble Space Telescope" - NASA media search
- "Show me pictures from Mars rover's NAVCAM camera" - Specific camera photos
- "What near earth objects were detected this week?" - Recent NEO activity
🛠️ NASA API Tools
The chatbot has access to these NASA API tools:
1. APOD (Astronomy Picture of the Day)
Get NASA's daily featured space image with explanation.
Parameters:
date(optional): Date in YYYY-MM-DD format
2. Mars Rover Photos
Fetch photos from Mars rovers.
Parameters:
sol: Martian sol (day) number (default: 1000)camera: Camera name - FHAZ, RHAZ, MAST, NAVCAM, etc. (default: "all")rover: Rover name - curiosity, opportunity, spirit (default: "curiosity")
3. Near Earth Objects (NEO)
Get data about asteroids near Earth.
Parameters:
start_date(optional): Start date in YYYY-MM-DD formatend_date(optional): End date in YYYY-MM-DD format (max 7 days)
4. NASA Image Search
Search NASA's media library.
Parameters:
query: Search keywordsmedia_type: image, video, or audio (default: "image")
🏃 Development
Running Individual Components
Backend only:
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload
Tools server only:
cd tools
pip install -r requirements.txt
python server.py
Frontend only:
cd frontend
npm install
npm run dev
Environment Variables
Backend:
OPENAI_API_KEY: Your OpenAI API key (required)NASA_API_KEY: Your NASA API key (optional, defaults to DEMO_KEY)
Tools:
NASA_API_KEY: Your NASA API key (optional, defaults to DEMO_KEY)
Frontend:
NEXT_PUBLIC_WS_URL: WebSocket URL for backend (default: ws://localhost:8000/ws/chat)
📁 Project Structure
.
├── backend/ # FastAPI backend with LangGraph
│ ├── app/
│ │ ├── graph/ # LangGraph nodes, edges, state
│ │ ├── llm/ # OpenAI LLM configuration
│ │ ├── mcp/ # MCP client for tool calls
│ │ └── utils/ # Utilities (memory, streaming)
│ └── requirements.txt
│
├── tools/ # FastMCP server with NASA tools
│ ├── server.py # MCP server setup
│ ├── tools.py # NASA API tool implementations
│ └── requirements.txt
│
├── frontend/ # Next.js frontend
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ └── lib/ # WebSocket utilities
│
└── docker-compose.yml # Docker orchestration
🔒 Security
- Never commit API keys to the repository
- Use environment variables for sensitive data
- The
.envfile is gitignored by default - NASA's DEMO_KEY is rate-limited and should only be used for testing
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📝 License
This project is open source and available under the MIT License.
🙏 Acknowledgments
- NASA Open APIs for providing free access to space data
- FastMCP for the MCP server framework
- LangGraph for agent orchestration
- LangChain for LLM integration
📚 Resources
Made with ❤️ and ☕ for space exploration enthusiasts
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.