Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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. Simulate load-history crack growth with Paris, Walker, piecewise Paris, or NASGRO curves.
  • 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 --with py-fatigue==3.1.0rc2 py-fatigue-mcp==0.3.0rc1
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.

Publish Py-Fatigue 3.1.0rc2 first so the MCP release can install and test its dependency from PyPI. 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.3.0rc1

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.3.0rc1
File Size Uploaded Provenance Actions
py_fatigue_mcp-0.3.0rc1.tar.gz 39.3 kB Without provenance Details for py_fatigue_mcp-0.3.0rc1.tar.gz

Built distribution (wheel)

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

Total release size: 78.2 kB

Release files / py_fatigue_mcp-0.3.0rc1.tar.gz

Download URL py_fatigue_mcp-0.3.0rc1.tar.gz
Size 39.3 kB
Tags Source
SHA-256 checksum
How to use checksums
555f1b6e824d5f14513ab62358df0c5e45ab5002b9a42868e320bd4587251193
BLAKE2b-256 checksum
How to use checksums
fbe6f947bf18c165430d6e37dacac1bc752c83cc8c2d16523e2b3da3ad6a6b12
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.3.0rc1-py3-none-any.whl

Download URL py_fatigue_mcp-0.3.0rc1-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab1e7bed712ee01f23c3d8b218f1a983120f89c4a013ab1f5d51ddc728064c03
BLAKE2b-256 checksum
How to use checksums
69fd2f0055d338e2e02bd58b5a03bd9917760e634b8b0f41624b192b7879ec76
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.3.0rc1

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