- API: https://api.rocketpy.org/
- MCP Server: https://api.rocketpy.org/mcp/
- Performs rocket simulations and returns simulation data
- Stores simulation input data in mongo-db
- Install python3 3.11.5 or above
- install mongodb-atlas
- Install dependencies
python3 -m pip install -r requirements.txt
uvloop does not support Windows and will fail during pip installation with:
RuntimeError: uvloop does not support Windows at the moment
Recommended Solution: Use Docker (easiest approach)
- make format
- make test
- make clean
- make build
- Setup MONGODB_CONNECTION_STRING:
$ touch .env && echo MONGODB_CONNECTION_STRING="$ConnectionString" > .env
- run docker compose:
docker-compose up --build -d
- Dev:
python3 -m uvicorn src:app --reload --port 3000 - Prod:
gunicorn -k uvicorn.workers.UvicornWorker src:app -b 0.0.0.0:3000
- The MCP bridge is mounted directly on the FastAPI app and is available at
/mcpalongside the REST API. - No extra process is required:
uvicorn src:appserves both the REST routes and the MCP transport.
βββ README.md # this file
βββ requirements.txt
βΒ Β
βββ lib
βΒ Β βΒ Β
βΒ Β βββ api.py # main app
β βββ secrets.py
βΒ Β βΒ Β
βΒ Β βββ controllers
βΒ Β βΒ Β βββ interface.py
βΒ Β βΒ Β βββ environment.py
βΒ Β βΒ Β βββ flight.py
βΒ Β βΒ Β βββ motor.py
βΒ Β βΒ Β βββ rocket.py
βΒ Β βΒ Β
βΒ Β βββ services
βΒ Β βΒ Β βββ environment.py
βΒ Β βΒ Β βββ flight.py
βΒ Β βΒ Β βββ motor.py
βΒ Β βΒ Β βββ rocket.py
βΒ Β βΒ Β
βΒ Β βββ routes
βΒ Β βΒ Β βββ environment.py
βΒ Β βΒ Β βββ flight.py
βΒ Β βΒ Β βββ motor.py
βΒ Β βΒ Β βββ rocket.py
βΒ Β βΒ Β
βΒ Β βββ repositories
βΒ Β βΒ Β βββ interface.py
βΒ Β βΒ Β βββ environment.py
βΒ Β βΒ Β βββ flight.py
βΒ Β βΒ Β βββ motor.py
βΒ Β βΒ Β βββ rocket.py
βΒ Β βΒ Β
βΒ Β βββ models
βΒ Β βΒ Β βββ interface.py
βΒ Β βΒ Β βββ environment.py
βΒ Β βΒ Β βββ flight.py
βΒ Β βΒ Β βββ motor.py
βΒ Β βΒ Β βββ rocket.py
βΒ Β βΒ Β βΒ Β
βΒ Β βΒ Β βββ sub
βΒ Β β βββ aerosurfaces.py
β β βββ tanks.py
βΒ Β βΒ Β
βΒ Β βββ views
βΒ Β βββ interface.py
βΒ Β βββ environment.py
βΒ Β βββ flight.py
βΒ Β βββ motor.py
βΒ Β βββ rocket.py
βΒ Β
βββ tests
- OpenAPI standard: https://api.rocketpy.org/redoc
- Swagger UI: https://api.rocketpy.org/docs
General API workflow. Current available models are: Environment, Flight, Rocket and Motor.
sequenceDiagram
participant User
participant API
participant MongoDB
User ->> API: POST /model
API ->> MongoDB: Persist API Model as a document
MongoDB -->> API: Model ID
API -->> User: 201 ModelCreated View
User ->> API: GET /model/:id
API ->> MongoDB: Read API Model document
MongoDB -->> API: API Model document
API -->> User: 200 API ModelView
User ->> API: PUT /model/:id
API ->> MongoDB: Update API Model document
API -->> User: 204
User ->> API: DELETE /model/:id
API ->> MongoDB: Delete API Model document
MongoDB -->> API: Deletion Confirmation
API -->> User: 204
sequenceDiagram
participant User
participant API
participant MongoDB
participant RocketPy lib
User ->> API: GET model/:id/simulate/
API -->> MongoDB: Retrieve API Model document
MongoDB -->> API: API Model document
API ->> RocketPy: Initialize RocketPy native class and simulate
RocketPy lib -->> API: Simulation Results
API -->> User: Simulation Results
User ->> API: GET /model/:id/rocketpy
API -->> MongoDB: Retrieve API Model document
MongoDB -->> API: API Model document
API ->> RocketPy: Initialize RocketPy native class
RocketPy lib -->> API: RocketPy native class
API -->> User: RocketPy native class as .dill binary (amd64)