cellpy-mcp

v0.2.0
cellpy-mcp Checked 2 hours ago Published 2 months ago

MCP server for cellpy — battery cell data, plots and the cellpy API, for agents and chat clients.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_instruments

Which cellpy loaders exist, and which can actually run on this machine.

load_cell

Load one cell file and return a handle plus what the data can support. `mass_mg` is the active-material mass. Without it every `*_gravimetric` column is computed against a default of 1.0 mg — the numbers still appear, they are simply wrong, so supply it when you know it.

ParameterTypeDescription
path *string
instrument
mass_mg

list_cells

The cells loaded in this session.

describe_plot_families

Summary plot families cellpy offers, and whether the loaded cells support them. Availability is judged on what a family *asks the summary for* (`summary_options().columns`), not on the columns it draws — the drawn list includes columns the collector manufactures, and checking those reports "missing columns" for families that work perfectly well.

collect

Build a collection. `kind` is one of: summary, cycles, ica, dva. Returns a handle and the frame's shape — never the frame. Use preview_collection for rows, export_collection for the numbers. For `summary`, give either `columns` or `family` (a name from describe_plot_families; the family supplies its own collect options). For `cycles` / `ica` / `dva`, give `cycles`.

ParameterTypeDescription
kind *string
cells
columns
cycles
family
group_itboolean
max_cycle

preview_collection

A few rows, capped. This is the only tool that returns data, on purpose.

ParameterTypeDescription
handle *string
rowsinteger

render

Draw a collection and write the figure to `path` (.json or .html). `kind="film"` gives a 2-D density rendering. Note it is a **kind**, not a layout: on cellpy 2.1.2 `layout="film"` silently drew lines instead (fixed in 2.1.3). The returned `trace_types` is how you check what you actually got.

ParameterTypeDescription
handle *string
path *string
direction
kind
layoutstring
spreadboolean

export_collection

Write the collected frame to `path` (.csv, .parquet or .json).

ParameterTypeDescription
handle *string
path *string

search_api

Find cellpy calls by name, or by what their first docstring line says. Use this when you know the task but not the call — "average cycles", "loading", "mass". `describe_api` then gives the arguments.

ParameterTypeDescription
query *string
limitinteger

describe_api

What a cellpy call takes and what it does, from the installed package. `name` is a dotted path (`cellpy.get`, `cellpy.collect.collect_summary`) or a bare name (`get_cap`) looked up in the index. Read `undocumented_parameters` before answering a question about one of them. cellpy documents roughly half its arguments, so an argument missing from `doc` means the package never said what it does — not that it does not matter. Ask again with `include_source=True` rather than guessing. When `delegates_to` is set, the docstring pointed at another call with a Sphinx reference and `delegate_doc` is…

ParameterTypeDescription
name *string
include_sourceboolean

list_templates

Batch templates available for `new_project`, registered and local. `cellpy new --list` prints this and returns nothing, so this reads the registry directly (jepegit/cellpy#991 asks for a library form).

new_project

Create a batch project from a template — the `cellpy new` workflow. `project` is the folder, `experiment` the lookup value; the template dates the experiment folder itself, so `experiment="exp001"` becomes something like `2026_09_05_exp001`. Writes inside the data directories only. Downloads the cookiecutter from GitHub on first use.

ParameterTypeDescription
experiment *string
project *string
directory
template