Skip to content

Getting Started

David Fieser edited this page Aug 23, 2026 · 1 revision

Getting started

Four ways in, from most to least common. Python 3.11 or newer for everything except the standalone Windows app, which needs nothing.

1. Library plus MCP server

pip install "lcf-strain-life[mcp]"

The base package is the library alone. The mcp extra adds the MCP server. Start the server with lcf-mcp, then register it with your client, see MCP Client Setup.

2. No install, through uv

Any MCP client can launch the server without a prior install:

uvx --from "lcf-strain-life[mcp]" lcf-mcp

uv resolves and caches the package on first run. Install uv itself from docs.astral.sh/uv.

3. No-code graphical interface

pip install "lcf-strain-life[gui]"
lcf-gui

A guided local app in the browser: upload test files or type in reduced data, fit the constants, predict life, export plots and a report. A bundled published example dataset, SAE 1137, lets you try the whole flow without any files. Everything runs on your machine and no data leaves it.

4. Standalone Windows app

A standalone exe, no Python needed, is attached to GitHub releases starting with v0.2.0. Download, double-click, and the app opens in the browser. It unpacks itself on every launch, so starting takes a while. It is currently unsigned, so Windows SmartScreen warns on first run. Choose "More info", then "Run anyway".

A first analysis, library

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)   # about 1.11, -0.62
print(fit.basquin.sigma_f, fit.basquin.b)             # about 1073 MPa, -0.084
print(fit.transition_reversals)                        # about 22,000 reversals

A first analysis, agent

With the server registered, ask your assistant in plain language:

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 MPa

The agent calls fit_strain_life and reads the result back. Every tool and its units are documented in Agent Usage.

Where results go

Computed results are saved to a local store directory for recall without recomputation. The location comes from the LCF_STORE_DIR environment variable and defaults to .lcfstore in the working directory.

Clone this wiki locally