sidpy.proc.mcp_server_bepsΒΆ

MCP server utilities for BEPS loop and SHO fitting.

This module wraps the existing SidpyFitterRefactor workflows in MCP-friendly tools so an LLM client can fit nested-array BEPS loop data and SHO response data without re-implementing the fitting logic.

The MCP runtime is optional. Importing this module does not require mcp, but running the server does.

Functions

SHO_fit_flattened

Flattened complex SHO response used by the SHO fitter tests.

calculate_loop_centroid

Calculate the polygon centroid for one unfolded loop.

create_mcp_server

Create an MCP server exposing the BEPS loop and SHO fitting tools.

fit_beps_loops

Fit BEPS loop data where the last axis contains the loop trace.

fit_sho_response

Fit SHO response data where the last axis contains the frequency sweep.

generate_guess

Generate the initial BEPS loop parameter guess.

loop_fit_function

Nine-parameter loop model used by the BEPS fitter tests.

main

Run the MCP server over the default transport.

sho_guess_fn

Initial guess heuristic for SHO fitting.