README.md•1.97 kB
# xfoil-mcp
[](LICENSE)
[](pyproject.toml)
[](https://github.com/yevheniikravchuk/xfoil-mcp/actions/workflows/ci.yml)
Domain-neutral Model Context Protocol (MCP) toolkit for running [XFOIL](https://web.mit.edu/drela/Public/web/xfoil/) polar analyses from agents or automation scripts. The package bundles reusable Pydantic models, an MCP-ready FastAPI server, and a python-sdk tool factory so you can embed XFOIL in your own workflows without inheriting any Orthodrone-specific schema.
## Features
- Typed request/response models for polar sweeps.
- Reusable `compute_polar` helper that streams commands to the XFOIL CLI.
- Optional FastAPI app and python-sdk tool shims for quick integration.
- MIT-licensed, fully typed, and covered by unit tests.
## Installation
```bash
pip install "git+https://github.com/yevheniikravchuk/xfoil-mcp.git"
```
> PyPI publication is on the roadmap; until then install directly from the Git repository or vendor the package.
## Quickstart (FastAPI)
```python
from xfoil_mcp.fastapi_app import create_app
app = create_app()
```
Run locally:
```bash
uv run uvicorn xfoil_mcp.fastapi_app:create_app --factory --host 127.0.0.1 --port 8001
```
## Quickstart (python-sdk tool)
```python
from mcp.server.fastmcp import FastMCP
from xfoil_mcp.tool import build_tool
mcp = FastMCP("xfoil-mcp", "XFOIL polar analysis")
build_tool(mcp)
if __name__ == "__main__":
mcp.run()
```
Launch via STDIO transport:
```bash
uv run mcp dev examples/xfoil_tool.py
```
## Environment
Set `XFOIL_BIN` to the path of your XFOIL executable if it is not already on `PATH`.
## Local development
```bash
uv pip install --system -e .[dev]
uv run ruff check .
uv run pytest
```
## License
MIT — see [LICENSE](LICENSE).