The Aerospace MCP server provides comprehensive aerospace engineering capabilities for flight planning, orbital mechanics, and aerodynamic analysis, accessible via HTTP API and Model Context Protocol (MCP).
Core Flight Operations:
Search airports by IATA code or city name with optional country filtering
Plan complete flight routes with performance estimates for specific aircraft types
Calculate great circle distances between geographic coordinates with polyline generation
Retrieve aircraft performance data using OpenAP models, including fuel consumption and flight time
Advanced Aerospace Analysis:
Aerodynamics: Wing analysis (VLM), airfoil polar generation, stability derivatives calculation, and propeller performance analysis (BEMT)
Atmospheric Modeling: International Standard Atmosphere (ISA) profiles and wind condition modeling
Coordinate Systems: Convert between aerospace reference frames (ECEF, ECI, geodetic)
Rocketry: 3DOF trajectory simulation, rocket sizing estimation, and launch optimization
Orbital Mechanics: Orbital element conversions, satellite orbit propagation (including J2 perturbations), ground track calculation, Hohmann transfers, and trajectory optimization using genetic algorithms and Monte Carlo analysis
UAV Operations: Energy consumption and endurance estimation
System Features:
Flexible search types with automatic detection
Customizable flight planning parameters (aircraft mass, cruise altitude, route resolution)
System status monitoring and capability verification
Provides access to IATA airport codes and standards for flight planning operations, enabling intelligent airport resolution and routing calculations.
Aerospace MCP - Flight Planning API & MCP Server
A comprehensive aerospace research and flight planning service providing both HTTP API and Model Context Protocol (MCP) integration. Built with FastMCP for streamlined MCP server development. Features intelligent airport resolution, great-circle route calculation, aircraft performance estimation, atmospheric modeling, coordinate frame transformations, aerodynamic analysis, propeller performance modeling, rocket trajectory optimization, orbital mechanics calculations, and spacecraft trajectory planning for aerospace operations.
⚠️ SAFETY DISCLAIMER
THIS SOFTWARE IS FOR EDUCATIONAL, RESEARCH, AND DEVELOPMENT PURPOSES ONLY
- NOT FOR REAL NAVIGATION: Do not use for actual flight planning or navigation
- NOT CERTIFIED: This system is not certified by any aviation authority
- ESTIMATES ONLY: Performance calculations are theoretical estimates
- NO WEATHER DATA: Does not account for weather, NOTAMs, or airspace restrictions
- NO LIABILITY: Authors assume no responsibility for any consequences of use
For real flight planning, always use certified aviation software and consult official sources including NOTAMs, weather reports, and air traffic control.
🚀 Quick Start
Option 1: UV (Recommended)
Option 2: Docker
Option 3: MCP Client (Claude Desktop)
Add to your Claude Desktop configuration:
Note: The env
section is optional and only needed if you want to enable the AI-powered agent tools for enhanced user experience.
MCP via CLI
📋 Table of Contents
- Features
- Installation
- Usage Examples
- Architecture
- FastMCP Migration
- Performance
- API Documentation
- MCP Integration
- Development
- Contributing
- License
✨ Features
Core Capabilities
- Airport Resolution: Intelligent city-to-airport mapping with 28,000+ airports worldwide
- Route Planning: Great-circle distance calculation with geodesic precision
- Performance Estimation: Aircraft-specific fuel and time calculations via OpenAP
- Atmospheric Modeling: ISA atmosphere profiles with optional enhanced precision
- Coordinate Transformations: ECEF, ECI, geodetic frame conversions for aerospace analysis
- Multiple Interfaces: HTTP REST API and Model Context Protocol (MCP) support
- Real-time Processing: Sub-second response times for flight planning requests
Space & Orbital Mechanics Capabilities
- 🛰️ Orbital Elements & State Vectors: Convert between Keplerian elements and Cartesian state vectors
- 🌍 Orbit Propagation: Numerical integration with J2 perturbations using RK4 method
- 🗺️ Ground Track Computation: Calculate satellite ground tracks for mission planning
- 🔄 Hohmann Transfers: Calculate optimal two-impulse orbital transfers
- 🤝 Orbital Rendezvous: Plan multi-maneuver rendezvous sequences
- 🎯 Trajectory Optimization: Genetic algorithms and particle swarm optimization
- 📊 Uncertainty Analysis: Monte Carlo sampling for trajectory robustness assessment
- 🚀 Lambert Problem: Two-body trajectory determination for given time-of-flight
Supported Operations
- ✅ Airport search by city name or IATA code
- ✅ Flight route planning with polyline generation
- ✅ Aircraft performance estimation (190+ aircraft types)
- ✅ Fuel consumption and flight time calculations
- ✅ Great-circle distance calculations
- ✅ Multi-leg journey planning
- ✅ Aircraft comparison analysis
- ✅ Atmospheric profile calculation (ISA standard atmosphere)
- ✅ Wind profile modeling (logarithmic/power law)
- ✅ Coordinate frame transformations (ECEF, ECI, geodetic)
- ✅ Wing aerodynamics analysis (VLM, lifting line theory)
- ✅ Airfoil polar generation and database access
- ✅ Aircraft stability derivatives calculation
- ✅ Propeller performance analysis (BEMT)
- ✅ UAV energy optimization and endurance estimation
- ✅ Motor-propeller matching analysis
- ✅ 3DOF rocket trajectory simulation with atmosphere integration
- ✅ Rocket sizing estimation for mission planning
- ✅ Launch angle optimization for maximum performance
- ✅ Thrust profile optimization using gradient descent
- ✅ Trajectory sensitivity analysis for design studies
- ✅ System capability discovery and status reporting
- ✅ Orbital mechanics calculations (Keplerian elements, state vectors, propagation)
- ✅ Ground track computation for satellite tracking and visualization
- ✅ Hohmann transfer planning for orbital maneuvers and mission design
- ✅ Orbital rendezvous planning for spacecraft proximity operations
- ✅ Trajectory optimization using genetic algorithms and particle swarm optimization
- ✅ Monte Carlo uncertainty analysis for trajectory robustness assessment
- ✅ Lambert problem solving for two-body trajectory determination
- ✅ Porkchop plot generation for interplanetary transfer opportunity analysis
- ✅ Optional SPICE integration with fallback to simplified ephemeris models
Technical Features
- 🚀 Fast: In-memory airport database for microsecond lookups
- 🔧 Flexible: Pluggable backend system (currently OpenAP)
- 📊 Accurate: Uses WGS84 geodesic calculations
- 🌐 Standards: Follows ICAO aircraft codes and IATA airport codes
- 🔒 Reliable: Comprehensive error handling and graceful degradation
- 📚 Well-documented: Complete API documentation with examples
💾 Installation
System Requirements
- Python: 3.11+ (3.12+ recommended for best performance)
- Memory: 512MB RAM minimum (1GB+ recommended)
- Storage: 200MB free space
- Network: Internet connection for initial setup
Method 1: UV Package Manager (Recommended)
UV is the fastest Python package manager and provides excellent dependency resolution:
Method 2: Pip (Traditional)
Method 3: Docker
Method 4: Conda/Mamba
Troubleshooting Installation
Common Issues
OpenAP Installation Problems:
GeographicLib Issues:
Import Errors:
🎯 Usage Examples
HTTP API Examples
Basic Flight Planning
Airport Search
Advanced Flight Planning
Python Client Examples
Simple Client
Batch Processing
Orbital Mechanics Examples
Python Examples
Trajectory Optimization Example
JavaScript/TypeScript Examples
🏗️ Architecture
System Overview
Key Components
- FastAPI Application (
main.py
)- RESTful endpoints for HTTP clients
- Auto-generated OpenAPI documentation
- Request/response validation with Pydantic
- MCP Server (
aerospace_mcp/server.py
)- Model Context Protocol implementation
- Tool-based interface for AI assistants
- Async request handling
- Core Services
- Airport Resolution: City → Airport mapping with intelligent selection
- Route Calculation: Great-circle paths with polyline generation
- Performance Estimation: OpenAP-based fuel and time calculations
- Data Layer
- In-memory Airport Database: 28,000+ airports loaded at startup
- OpenAP Integration: Aircraft performance models
- GeographicLib: Precise geodesic calculations
Design Principles
- Performance First: In-memory data structures for sub-millisecond lookups
- Graceful Degradation: Works without optional dependencies
- Type Safety: Full type hints and Pydantic validation
- Extensible: Plugin architecture for new backends
- Standards Compliant: ICAO, IATA, and OpenAP standards
🚀 FastMCP Migration
This project has been migrated from the traditional MCP SDK to FastMCP, providing significant improvements in developer experience and code maintainability.
What is FastMCP?
FastMCP is a high-level, Pythonic framework for building Model Context Protocol servers. It dramatically reduces boilerplate code while maintaining full MCP compatibility.
Migration Benefits
✅ 70% Less Code: Tool definitions went from verbose JSON schemas to simple Python decorators ✅ Better Type Safety: Automatic schema generation from type hints ✅ Cleaner Architecture: Modular tool organization across logical domains ✅ Improved Maintainability: Pythonic code that's easier to read and extend ✅ Full Compatibility: Same MCP protocol, works with all existing clients
Before vs After
Before (Traditional MCP SDK):
⚙️ Configuration (.env)
Both the HTTP server and MCP servers automatically load environment variables from a local .env
(via python-dotenv
).
AEROSPACE_MCP_MODE
:http
ormcp
(Docker entrypoint switch)AEROSPACE_MCP_HOST
: Bind host for HTTP (default0.0.0.0
)AEROSPACE_MCP_PORT
: Port for HTTP (default8080
)AEROSPACE_MCP_LOG_LEVEL
:debug|info|warning|error
(defaultinfo
)AEROSPACE_MCP_ENV
:development|production
(controls reload)LLM_TOOLS_ENABLED
:true|false
to enable AI agent tools (defaultfalse
)OPENAI_API_KEY
: Required if LLM tools are enabled
Example .env
:
After (FastMCP):
Architecture Improvements
The FastMCP refactoring introduced a modular architecture with tools organized by domain:
tools/core.py
- Core flight planning (search, plan, distance, performance)tools/atmosphere.py
- Atmospheric modeling and wind analysistools/frames.py
- Coordinate frame transformationstools/aerodynamics.py
- Wing analysis and airfoil polarstools/propellers.py
- Propeller BEMT and UAV energy analysistools/rockets.py
- Rocket trajectory and sizingtools/orbits.py
- Orbital mechanics and propagationtools/optimization.py
- Trajectory optimization algorithms
Compatibility Notes
- Entry Point: Now uses
aerospace_mcp.fastmcp_server:run
- Dependencies: Includes
fastmcp>=2.11.3
instead of rawmcp
- Server Name: Still
aerospace-mcp
for client compatibility - All Tools: All 30+ tools maintain exact same names and parameters
⚡ Performance
Benchmarks
Operation | Response Time | Throughput | Memory Usage |
---|---|---|---|
Health Check | < 1ms | 10,000+ req/sec | ~5MB |
Airport Search | 1-5ms | 1,000+ req/sec | ~50MB |
Flight Planning | 200-500ms | 5-10 req/sec | ~100MB |
Distance Calc | 10-50ms | 100+ req/sec | ~50MB |
Optimization Tips
- Route Resolution: Use larger
route_step_km
values for faster processing - Caching: Implement client-side caching for repeated requests
- Batch Processing: Use async clients for multiple concurrent requests
- Memory: Increase available RAM for better OpenAP performance
Scaling Considerations
- Horizontal Scaling: Stateless design allows multiple instances
- Load Balancing: Standard HTTP load balancers work well
- Database: Consider external database for airport data at scale
- Caching: Add Redis for shared cache across instances
📖 API Documentation
Interactive Documentation
When running the server, comprehensive API documentation is available at:
- Swagger UI: http://localhost:8080/docs
- ReDoc: http://localhost:8080/redoc
- OpenAPI Schema: http://localhost:8080/openapi.json
Core Endpoints
GET /health
Health check and system status.
Response:
GET /airports/by_city
Search airports by city name.
Parameters:
city
(required): City name to searchcountry
(optional): ISO country code filter
Example: GET /airports/by_city?city=London&country=GB
POST /plan
Generate complete flight plan.
Request Body:
Response: Complete flight plan with route polyline and performance estimates.
Error Handling
All endpoints return standard HTTP status codes:
200
: Success400
: Bad Request (invalid parameters)404
: Not Found (airport/city not found)501
: Not Implemented (backend unavailable)
Error responses include detailed messages:
🤖 MCP Integration
Supported MCP Clients
- Claude Desktop: Native integration
- VS Code Continue: Plugin support
- Custom Clients: Standard MCP protocol
Available Tools
Tool | Description | Parameters |
---|---|---|
search_airports | Find airports by IATA or city | query , country , query_type |
plan_flight | Complete flight planning | departure , arrival , aircraft , route_options |
calculate_distance | Great-circle distance | origin , destination , step_km |
get_aircraft_performance | Performance estimates | aircraft_type , distance_km , cruise_altitude |
get_atmosphere_profile | ISA atmosphere conditions | altitudes_m , model_type |
wind_model_simple | Wind profile calculation | altitudes_m , surface_wind_mps , model |
transform_frames | Coordinate transformations | xyz , from_frame , to_frame , epoch_iso |
geodetic_to_ecef | Lat/lon to ECEF conversion | latitude_deg , longitude_deg , altitude_m |
ecef_to_geodetic | ECEF to lat/lon conversion | x , y , z |
wing_vlm_analysis | Wing aerodynamics analysis (VLM) | geometry , alpha_deg_list , mach |
airfoil_polar_analysis | Airfoil polar generation | airfoil_name , alpha_deg_list , reynolds , mach |
calculate_stability_derivatives | Stability derivatives calculation | geometry , alpha_deg , mach |
propeller_bemt_analysis | Propeller performance (BEMT) | geometry , rpm_list , velocity_ms , altitude_m |
uav_energy_estimate | UAV endurance and energy analysis | uav_config , battery_config , mission_profile |
get_airfoil_database | Available airfoil coefficients | None |
get_propeller_database | Available propeller data | None |
rocket_3dof_trajectory | 3DOF rocket trajectory simulation | geometry , dt_s , max_time_s , launch_angle_deg |
estimate_rocket_sizing | Rocket sizing for mission requirements | target_altitude_m , payload_mass_kg , propellant_type |
optimize_launch_angle | Launch angle optimization | geometry , objective , angle_bounds |
optimize_thrust_profile | Thrust profile optimization | geometry , burn_time_s , total_impulse_target , n_segments , objective |
trajectory_sensitivity_analysis | Parameter sensitivity analysis | base_geometry , parameter_variations , objective |
get_system_status | System health and capabilities | None |
elements_to_state_vector | Convert orbital elements to state vector | elements |
state_vector_to_elements | Convert state vector to orbital elements | state_vector |
propagate_orbit_j2 | Propagate orbit with J2 perturbations | initial_state , time_span_s , time_step_s |
calculate_ground_track | Calculate satellite ground track | orbit_states , time_step_s |
hohmann_transfer | Calculate Hohmann transfer orbit | r1_m , r2_m |
orbital_rendezvous_planning | Plan orbital rendezvous maneuvers | chaser_elements , target_elements |
genetic_algorithm_optimization | Trajectory optimization using GA | initial_trajectory , objective , constraints |
particle_swarm_optimization | Trajectory optimization using PSO | initial_trajectory , objective , constraints |
monte_carlo_uncertainty_analysis | Monte Carlo trajectory uncertainty analysis | trajectory , uncertainty_params , num_samples |
porkchop_plot_analysis | Generate porkchop plot for interplanetary transfers | departure_body , arrival_body , departure_dates , arrival_dates , min_tof_days , max_tof_days |
Claude Desktop Setup
- Open Claude Desktop Settings
- Add server configuration:
- Restart Claude Desktop
- Test with: "Search for airports in Tokyo"
VS Code Continue Setup
Add to your config.json
:
🛠️ Development
Development Setup
Testing
Code Quality
Project Structure
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.
Quick Contributing Guide
- Fork & Clone
- Setup Development Environment
- Make Changes
- Add features or fix bugs
- Write tests for new functionality
- Update documentation as needed
- Test & Format
- Submit Pull Request
- Clear title and description
- Reference any related issues
- Ensure CI/CD checks pass
Areas for Contribution
- New Aircraft Support: Add more aircraft types to OpenAP
- Weather Integration: Add weather data sources
- Route Optimization: Implement waypoint optimization
- UI/Frontend: Web interface for flight planning
- Database Backend: PostgreSQL/MongoDB integration
- Performance: Optimization and caching improvements
📚 Documentation
Complete Documentation
- Quick Start Guide - Get up and running in 5 minutes
- API Reference - Complete REST API documentation
- MCP Integration - Model Context Protocol setup
- Architecture Guide - System design and components
- Deployment Guide - Production deployment strategies
- Contributing Guide - Development and contribution guidelines
- Integration Guide - Client integration examples
Examples Repository
Check out the examples repository for:
- Complete client implementations
- Integration patterns
- Performance benchmarks
- Real-world use cases
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Third-Party Acknowledgments
- OpenAP: Aircraft performance modeling - TU Delft
- AirportsData: Airport database - mborsetti
- GeographicLib: Geodesic calculations - Charles Karney
- FastAPI: Modern web framework - Sebastián Ramírez
🆘 Support & Community
Getting Help
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and community support
- Documentation: Comprehensive guides in
/docs
- Examples: Code examples and tutorials
Community
- Discord: WIP for real-time chat
Professional Support
For enterprise support, consulting, or custom development:
- Email: hello@aeroastro.org
- Website: https://aeroastro.org
⭐ Star this repository if you find it useful!
Built with ❤️ for the aviation and software development communities.
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.
Enables flight planning and aviation operations through intelligent airport resolution, great-circle route calculation, and aircraft performance estimation. Supports 28,000+ airports worldwide and 190+ aircraft types for comprehensive flight planning via natural language.
Related MCP Servers
- -securityFlicense-qualityCreates travel agent-level flight plans using the fast-flights API, allowing users to search for flights and generate comprehensive travel itineraries.Last updated -5
- AsecurityFlicenseAqualityIntegration platform for aviation data sources including weather, NOTAMs, airport information, and flight planning APIs, enabling comprehensive pre-flight preparation and in-flight decision support.Last updated -102
- AsecurityFlicenseAqualityProvides tools to query flight and train information including flight searches, train tickets, weather forecasts, and transfer options between different transportation modes.Last updated -911
- -securityAlicense-qualityA server that provides real-time flight information query capabilities to AI assistants, allowing them to access detailed flight statuses, airport details, and related travel information.Last updated -108MIT License