Skip to main content

Py-Fatigue MCP

Py-Fatigue MCP is the companion server for the Py-Fatigue 3 Python library. It calls the same numerical routines and plotting methods you can use directly in Python. Installing py-fatigue-mcp also installs the core library. Py-Fatigue on PyPI · Py-Fatigue documentation · MCP documentation

  • Build, add, or apply a stress concentration factor to native CycleCount objects. Work with ASTM or four-point counting and residual recovery.
  • Evaluate S–N curves and Miner damage. Run ordered NASGRO across ten supported crack geometries.
  • Generate reproducible stress histories and ordered tensile blocks with py_fatigue.testing, then pass the specification to another tool.
  • Request native plots as PNG or ECharts HTML.

Quickstart

uv tool install py-fatigue-mcp
command -v py-fatigue-mcp

Use the executable path from the second command as the launch command in a local stdio MCP client. The local server requires no token. Local client setup · Hosted setup

Example prompts

Count cycles and plot the result

Use the Py-Fatigue MCP to count ASTM rainflow cycles for these stress
samples in MPa: [0, 75, -15, 50, 0]. Report the cycle weights and show
the native min–max histogram.

Expect four half-cycles with a total weight of 2. For a direct tool call, select cycle_count and pass {"stress": [0, 75, -15, 50, 0]}.

Calculate Miner damage

Use miner_damage on the same stress samples, with an illustrative
S–N slope of 3 and log10 intercept of 12. Report the total damage.

Expect a dimensionless total of about 7.7525e-7.

Combine and scale cycle counts

Count these two consecutive MPa windows separately:
[0, 75, -15, 50, 0, 60, -20, 90, 0, -30, 70, 0]
[0, 55, -25, 40, 0, 90, -5, 75, -15, 0]
Add the CycleCount objects in order, recover the joined residuals,
and apply a stress concentration factor of 1.25. Plot the resulting
mean–range histogram using Py-Fatigue.

Generate a synthetic stress history

Generate 32 seconds of Weibull stress samples at 16 Hz with seed 42,
shape a = 2, and stress bounds of -40 to 100 MPa. Use the full
generated history for cycle counting and show the native residual plot.

The generator returns a preview and a reusable specification for all 512 samples. MCP walkthroughs · Tool reference

HTTP pilot

From a development checkout, supply a strong secret as PY_FATIGUE_MCP_BEARER_TOKEN and run the HTTP adapter on loopback.

cd extensions/py-fatigue-mcp
uv run uvicorn py_fatigue_mcp.http_server:create_app --factory --host 127.0.0.1 --port 18732

The /mcp endpoint accepts inline inputs and requires an Authorization: Bearer header. Use HTTPS at the reverse proxy when the endpoint is reachable outside the host.

Release

The Py-Fatigue MCP workflow uploads through the repository's PYPI_API_TOKEN secret in the pypi-mcp environment. The token needs permission to publish py-fatigue-mcp.

Tag the merged revision with mcp-v followed by the package version, then dispatch the Py-Fatigue MCP workflow at that tag.

Metadata

Release files for py-fatigue-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-fatigue-mcp 0.2.0
File Size Uploaded Provenance Actions
py_fatigue_mcp-0.2.0.tar.gz 38.5 kB Without provenance Details for py_fatigue_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-fatigue-mcp 0.2.0
File Interpreter ABI Platform Actions
py_fatigue_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for py_fatigue_mcp-0.2.0-py3-none-any.whl

Total release size: 76.7 kB

Release files / py_fatigue_mcp-0.2.0.tar.gz

Download URL py_fatigue_mcp-0.2.0.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
04ef8f101702fa39844673b1b8fe48bf740c4ac60891eccd9f6e4616b8686837
BLAKE2b-256 checksum
How to use checksums
8dbf95daf7d8badc9df9818a2f20787b1a8529a584343beff9d691f65a52d736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / py_fatigue_mcp-0.2.0-py3-none-any.whl

Download URL py_fatigue_mcp-0.2.0-py3-none-any.whl
Size 38.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4da4c67203bb2bf63f3017b268a1e84887a2ab5a606ef4ca639f7af3c94f61e3
BLAKE2b-256 checksum
How to use checksums
df79f44af32ab77ed259753dcf3f7d9bc3160644f058cd64ea0e8744e5fdf4e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for py-fatigue-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page