IO Aerospace MCP Server

MCP server for aerospace calculations: orbital mechanics, ephemeris, DSN operations, ...

15AGPL-3.0other

Install

Config snippet generator goes here (5 client tabs)

README

# IO Aerospace MCP Server

## Use it now
> Hosted in production (no setup needed): https://mcp.io-aerospace.org/
>
> **Transport Protocols:**
> - **Streamable-HTTP** (recommended): https://mcp.io-aerospace.org/ - Modern MCP transport protocol
> - **SSE** (legacy): https://mcp.io-aerospace.org/sse - For backward compatibility with older MCP clients only
>
> Note: Use the base URL with modern MCP clients - they will automatically use the streamable-HTTP transport. Only use the `/sse` endpoint if you have an older client that specifically requires SSE protocol.

A Model Context Protocol (MCP) server for aerospace and astrodynamics calculations, providing tools for celestial body ephemeris, orbital mechanics, and space mission analysis.

## Overview

This MCP server provides two transport options:
- **STDIO Transport**: Standard input/output communication (recommended for local MCP clients)
- **HTTP Transport**: Supports both modern streamable-HTTP and legacy SSE protocols for web-based integrations
  - **Streamable-HTTP** (default, recommended): Modern MCP protocol at the base URL
  - **SSE** (legacy): Available at `/sse` endpoint for backward compatibility only

The server includes comprehensive tools for:
- Celestial body ephemeris and state vector calculations
- Orbital mechanics and geometry computations
- Deep Space Network (DSN) ground station operations
- Solar system object properties and characteristics
- Mathematical conversions for aerospace calculations
- Time system conversions and utilities

## Astrodynamics Framework

This server is powered by the IO Aerospace Astrodynamics framework, which provides the core algorithms for ephemerides, orbital mechanics, geometry, and time systems.

- Repository: https://github.com/IO-Aerospace-software-engineering/Astrodynamics

## Use the hosted server (recommended)

You can start integrating immediately against the production instance:
- **Base URL (streamable-HTTP)**: https://mcp.io-aerospace.org/ - Use this with modern MCP clients
- **SSE endpoint (legacy)**: https://mcp.io-aerospace.org/sse - Only for older clients requiring SSE protocol

**Important**: Modern MCP clients (2024+) should use the base URL with streamable-HTTP transport. The SSE endpoint is maintained only for backward compatibility with older implementations.

Example (legacy SSE - browser/Node):
```javascript
// Only use this if you have an old client that requires SSE
const eventSource = new EventSource('https://mcp.io-aerospace.org/sse');

eventSource.onmessage = (event) => {
  console.log('message', event.data);
};

eventSource.onerror = (err) => {
  console.error('sse error', err);
};
```

Self-hosting is optional; see below for Docker and .NET instructions.

## Project Structure

```
mcp-server/
├── AI/                           # AI tools and models
│   ├── Tools/                    # Core calculation tools
│   ├── Models/                   # Data models and types
│   └── Converters/              # Type converters
├── Data/                         # Data providers and solar system kernels
│   ├── SolarSystem/             # SPICE kernel files
│   └── SolarSystemObjects/      # Celestial body definitions
├── Server.Http/                 # HTTP transport server (streamable-HTTP + legacy SSE)
├── Server.Stdio/                # STDIO transport server
├── docker-compose.yml           # Development Docker configuration
├── docker-compose.prod.example.yml  # Production template
└── deploy-production.sh         # Production deployment script
```

## Prerequisites

- .NET 9.0 SDK or runtime
- Docker (for containerized deployment)
- Solar system kernels data (SPICE kernels)

## Available Tools

### CelestialBodyTools
- **GetEphemerisAsStateVectors**: Calculate state vectors (position and velocity) of celestial bodies
- **GetCelestialBodyProperties**: Retrieve geophysical properties of planets and moons

### OrbitalParametersTools
- **ConvertStateVectorToKeplerianElements**: Convert state vectors to Keplerian orbital elements
- **ConvertStateVectorToEquinoctialElements**: Convert state vectors to equinoctial elements
- **ConvertStateVectorToEquatorialCoordinates**: Convert state vectors to equatorial coordinates
- **ConvertKeplerianElementsToStateVector**: Convert Keplerian elements back to state vectors
- **ConvertEquinoctialElementsToStateVector**: Convert equinoctial elements back to state vectors
- **ConvertStateVectorToTheGivenFrame**: Transform state vectors between reference frames

### GeometryFinderTools
- **FindCoordinateConstraint**: Find time windows when coordinate constraints are met
- **FindDistanceConstraint**: Find time windows when distance constraints are satisfied
- **FindOccultingConstraint**: Find occultation and eclipse events

### SiteTools
- **GetDeepSpaceStationPlanetodeticCoordinates**: Get latitude, longitude, and altitude of DSS stations
- **GetDeepSpaceStationStateVector**: Calculate state vectors for ground stations
- **GetHorizontalCoordinates**: Get azimuth and el