Skip to main content
Glama

pterasim-mcp - UVLM + surrogate aerodynamics for MCP agents

TL;DR: Expose PteraSoftware's analytical/UVLM solvers through MCP so agents can request aerodynamic coefficients with provenance metadata.

Table of contents

  1. What it provides

  2. Quickstart

  3. Run as a service

  4. Agent playbook

  5. Stretch ideas

  6. Accessibility & upkeep

  7. Contributing

Related MCP server: OpenVSP MCP Server

What it provides

Scenario

Value

Surrogate aerodynamics

Evaluate lightweight rigid-vortex-lattice models without a GUI, returning aerodynamic coefficients as structured data.

High-fidelity UVLM

When PteraSoftware is installed, the service switches to its UVLM solver and records provenance metadata.

Controller integration

Provide consistent outputs that downstream MCP tools (e.g., ctrltest-mcp) can ingest for control and evidence pipelines.

Quickstart

1. Install

uv pip install "git+https://github.com/Three-Little-Birds/pterasim-mcp.git"

2. Run an analytic solve

from pterasim_mcp import PterasimInput, simulate_pterasim

request = PterasimInput(
    span_m=0.8,
    mean_chord_m=0.12,
    stroke_frequency_hz=12.0,
    stroke_amplitude_rad=0.55,
    cruise_velocity_m_s=6.0,
    air_density_kg_m3=1.225,
    cl_alpha_per_rad=6.2,
    cd0=0.03,
    planform_area_m2=0.18,
)
response = simulate_pterasim(request)
print(response.metadata["solver"])            # "analytic" or "pterasoftware_uvlm"
print(response.thrust_N, response.lift_N, response.torque_Nm)

Typical metadata payload:

```json
{
  "solver": "pterasoftware_uvlm",
  "thrust_delta_pct_vs_analytic": -4.1,
  "lift_delta_pct_vs_analytic": -2.7
}

If a Python 3.13 environment with `PteraSoftware` (≥3.2) is available, the wrapper will prefer UVLM and note the solver in the metadata. Install it inside a dedicated environment:

```bash
uv python install 3.13
uv venv .venv-pterasim --python 3.13
source .venv-pterasim/bin/activate
pip install pterasoftware==3.2.0
uv pip install "git+https://github.com/Three-Little-Birds/pterasim-mcp.git"

If the UVLM solve fails for any reason (missing binaries, convergence issues, or the current PteraSoftware regression that removes geometry.airfoil), the wrapper logs a warning and falls back to the analytic surrogate—you will see solver: "analytic" in the metadata and no delta fields. UVLM runs with thousands of timesteps can take minutes; batch analytic sweeps first and promote only promising cases to the high-fidelity environment. Analytic-only mode works on Python 3.11 without PteraSoftware. Until the UVLM API stabilizes upstream, treat the analytic path as the supported/default mode.

Run as a service

CLI (STDIO / Streamable HTTP)

uvx pterasim-mcp  # runs the MCP over stdio
# or python -m pterasim_mcp
python -m pterasim_mcp --transport streamable-http --host 0.0.0.0 --port 8000 --path /mcp

Use python -m pterasim_mcp --describe to emit metadata without starting the server.

FastAPI (REST)

uv run uvicorn pterasim_mcp.fastapi_app:create_app --factory --port 8003

python-sdk tool (STDIO / MCP)

from mcp.server.fastmcp import FastMCP
from pterasim_mcp.tool import build_tool

mcp = FastMCP("pterasim-mcp", "Wing UVLM & surrogate solver")
build_tool(mcp)

if __name__ == "__main__":
    mcp.run()

ToolHive smoke test

uvx --with 'mcp==1.20.0' python scripts/integration/run_pterasim.py
# ToolHive 2025+ defaults to Streamable HTTP; match that transport when registering
# the workload manually so IDE clients avoid the SSE 502 bug.

Agent playbook

  • Scenario sweeps - vary span, frequency, or flapping amplitude and log derivatives for control studies.

  • Solver comparison - leverage metadata to benchmark surrogate vs UVLM deltas and store the comparisons for regression dashboards.

  • Design flows - combine with openvsp-mcp to generate geometry + aerodynamics pipelines.

Stretch ideas

  1. Generate JSONL experiment logs that feed directly into ctrltest-mcp or reinforcement-learning agents.

  2. Use the metadata to route results into Grafana dashboards for solver provenance.

  3. Auto-promote surrogate runs to UVLM once a high-fidelity environment is detected.

Accessibility & upkeep

  • Tests simulate solver responses; run uv run pytest before pushing.

  • Keep .venv-pterasim aligned with the PteraSoftware version you report in metadata.

Contributing

  1. uv pip install --system -e .[dev]

  2. Run uv run ruff check . and uv run pytest

  3. Include sample metadata/CSV artefacts in PRs so reviewers can confirm provenance handling.

MIT license - see LICENSE.

Available Tools

1 tool
pterasim.simulateB

Generate aerodynamic coefficients with UVLM fallback. Supply wing geometry, flapping schedule, and timestep count. Returns forces, torques, and solver metadata. Example: {"span_m":0.8,"chord_m":0.12,"num_timesteps":180}

ParametersJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
lift_NYes
metadataNoSolver details and diagnostics
thrust_NYes
torque_NmYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'UVLM fallback' and 'solver metadata,' hinting at computational behavior and potential fallback mechanisms, but doesn't detail performance characteristics, error conditions, or what 'high fidelity' entails. It adds some context but leaves gaps for a simulation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with two sentences covering purpose, inputs, outputs, and an example. Every sentence adds value, though the example could be better integrated. It's appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (aerodynamic simulation with 11 parameters) and no annotations, the description is moderately complete. It covers purpose and outputs (aided by the output schema), but lacks details on parameter interactions, fallback behavior, and error handling. The example helps but doesn't fully compensate for the schema's 0% coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides an example with key parameters (span_m, chord_m, num_timesteps) and mentions 'wing geometry, flapping schedule, and timestep count,' which helps interpret the schema. However, it doesn't fully explain all 11 parameters or their relationships, leaving some ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Generate aerodynamic coefficients with UVLM fallback' and specifies the required inputs ('wing geometry, flapping schedule, and timestep count') and outputs ('forces, torques, and solver metadata'). It's specific about what the tool does, though it doesn't need to distinguish from siblings since none exist.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal usage guidance. It lists what to supply but doesn't explain when to use this tool versus alternatives, mention prerequisites, or provide context about when the UVLM fallback might be triggered. With no siblings, this is less critical, but still lacks comprehensive guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool has a clear, singular purpose focused on aerodynamic simulation with specific inputs and outputs.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'pterasim.simulate' follows a clear and logical pattern that would be consistent if more tools existed.

Tool Count2/5

A single tool is too few for a server named 'Pterasim MCP Server', which suggests a broader aerodynamic simulation domain. This minimal toolset limits functionality and likely leaves significant gaps in coverage.

Completeness2/5

The server appears to focus on aerodynamic simulation, but with only a simulate tool, there are obvious gaps. Missing operations might include geometry creation, parameter analysis, result visualization, or data export, making the surface incomplete for typical simulation workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Three-Little-Birds/pterasim-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server