Add fatigue analysis to your AI assistant.
This is a one-time setup of about five minutes. When you finish, you can ask your assistant to analyze fatigue data in plain language, any time you open it. No coding, and nothing to run yourself.
An AI assistant on your computer that supports the Model Context Protocol, for example Claude Desktop, Cursor, VS Code with Copilot agent mode, or Google Antigravity. That is it. The steps below install everything else.
Install uv
uv is a small, free tool that fetches and runs the toolkit for you, so you never have to set up Python yourself. Install it once. Choose your system:
Open PowerShell from the Start menu, paste this line, and press Enter:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Prefer the Microsoft Store style? You can instead run winget install --id=astral-sh.uv -e.
Open the Terminal app, paste this line, and press Return:
curl -LsSf https://astral.sh/uv/install.sh | shThe command finishes and prints a line about uv being installed. You can close the window. If it says uv was added to your PATH, that is exactly right.
Add the toolkit to your assistant
Your assistant keeps a small settings file that lists the tools it can use. You add one entry to it. This is the same entry for every assistant, it just lives in a different place depending on which one you use.
The entry to add:
{
"mcpServers": {
"lcf": {
"command": "uvx",
"args": ["--from", "lcf-strain-life[mcp]", "lcf-mcp"]
}
}
}Where to put it:
Open Claude Desktop. Go to Settings → Developer → Edit Config. That opens the settings file in your text editor. If the file is empty, paste the whole block above. If it already has an mcpServers section, add just the "lcf" entry inside it. Save the file.
Any assistant that supports the Model Context Protocol can use this, including editor-based assistants. The command and args stay the same, only the menu and the file differ.
- Cursor: add it in Settings under MCP, using the block above. See the Cursor MCP docs.
- VS Code in Copilot agent mode: run
MCP: Add Serverfrom the command palette, or edit.vscode/mcp.json. VS Code names the top-level keyserversinstead ofmcpServers, and the innercommandandargsare identical. See the VS Code MCP docs. - Google Antigravity: add a local MCP server in its MCP settings with the same
commandandargs. See the Antigravity MCP docs.
This file is JSON. Every entry except the last needs a comma after it, and quotes must be straight quotes. A missing comma is the most common reason setup fails.
Restart the assistant
Fully quit the assistant and open it again. On Windows, closing the window is not enough, quit it from the system tray. On macOS, quit it with Command-Q. This is what makes it pick up the new tool.
Your assistant now shows a set of lcf tools, often behind a tools or hammer icon near the message box. The first time it runs, it quietly downloads the toolkit, so the very first analysis can take a minute. After that it is fast.
Run your first analysis
Ask in plain language. To try it without your own data yet, paste this:
Using the lcf tools, fit the strain-life constants for this data and
tell me the transition life.
total strain amplitude: 0.009, 0.007, 0.005, 0.003, 0.002, 0.00175
stress amplitude (MPa): 553, 522, 464, 405, 350, 319
reversals to failure: 4234, 7398, 14768, 77104, 437498, 3327958
elastic modulus E: 208000 MPaThe assistant will call the fit and report the Coffin-Manson and Basquin constants, the transition life, and offer a plot. From there you can ask follow-ups in plain language, for example "predict life at 0.4% strain amplitude" or "add a Morrow mean-stress correction".
Bring your own data
Point the assistant at your own lab export and ask it to analyze the test. The reader handles the delimited exports labs produce, including MTS TestSuite and Instron style files, and it detects the columns and units for you. Ask it to preview a file first if you want to see how it will be read before committing.
Delimited text exports work well. Proprietary binary formats from a specific machine are not read directly, export them to a delimited file first. If a strain column has no unit label and its values look like percent, the tool will ask you to confirm rather than guess.
Troubleshooting
The assistant does not show the lcf tools
Make sure you fully quit and reopened it, not just closed the window. Then check the settings file again for a missing comma or a missing closing brace. Most failures are a small typo in that file.
It says uv or uvx was not found
Desktop apps do not always see tools installed for the terminal. On Windows, find the full path by running where uvx in PowerShell, then use that full path, for example C:\Users\you\.local\bin\uvx.exe, in place of "uvx" in the settings file. On macOS, use ~/.local/bin/uvx. Restarting your computer once after installing uv also resolves this.
The first analysis is slow or seems to hang
The first run downloads the toolkit and its scientific libraries. This can take a minute on a normal connection. It only happens once. Later runs start quickly.
I get a JSON or config error
The settings file must be valid JSON. Every entry except the last needs a comma, braces must be balanced, and quotes must be straight quotes, not curly ones. Pasting the whole block from Step 2 into an empty file avoids most of these.
Where is the settings file?
In Claude Desktop, the reliable way to open it is Settings → Developer → Edit Config, which opens the exact file for your system so you never have to hunt for the path.
More fixes are on the wiki troubleshooting page.
Use it as a Python library
If you write Python, you can skip the assistant and call the library directly.
pip install "lcf-strain-life[mcp]"import lcf
fit = lcf.fit_strain_life(
total_strain_amp=[0.009, 0.007, 0.005, 0.003, 0.002, 0.00175],
stress_amp=[553, 522, 464, 405, 350, 319], # MPa, half-life
reversals=[4234, 7398, 14768, 77104, 437498, 3327958],
E=208000, # MPa
min_plastic_strain=5e-4,
)
print(fit.coffin_manson.eps_f, fit.coffin_manson.c)
print(fit.transition_reversals)The examples folder has runnable scripts, and the agent usage guide lists every tool.
The same analysis also ships as a local no-code app: upload test files, fit the constants, predict life, export a report. Each release carries a standalone Windows app, currently unsigned, so SmartScreen warns on first run. With Python installed, pip install "lcf-strain-life[gui]" then lcf-gui starts it faster.
That is the whole setup.
Ask your assistant anything about your fatigue data, in plain language.