This release is a pre-release and may not be stable for production use.
simtest-funnel-mcp
A local MCP server that lets AI agents (Claude Code, Claude Desktop, any MCP client) compare signals stored in local CSV files with the funnel (tolerance-tube) algorithm of simtest-funnel, a port of LBNL Funnel.
The server reads the files itself, so raw samples never enter the model's context. It is read-only and stateless: every call names the files it reads; nothing is written and no network connection is opened. Transport: stdio.
Platform note:
simtest-funnelis currently published to PyPI only as a Linux x86-64 / CPython 3.12 wheel, souvx simtest-funnel-mcpworks only there until cross-platform wheels are published. From a checkout of this repository it works wherever the Rust extension builds.
Tools
describe_signals(path)
Time column (and how it was chosen), row count, time start/end/span, sampling (uniform or not; min/median/max step), per-column min/max/range and data problems (non-numeric or empty cells, time not non-decreasing). Use it to choose columns and tolerances.
compare_signals(reference_path, test_path, ...)
| Argument | Default | Meaning |
|---|---|---|
columns |
all common columns | Signal columns to compare |
tolerances |
one set, library default | List of sets: optional unique label plus any of the six coefficients |
column_tolerances |
none | {column: coefficients} overrides, applied per axis |
x_range |
unbounded | {"lo": .., "hi": ..} time window |
max_intervals |
5 | Violation intervals listed per failing row (largest deviation first) |
max_rows |
100 | Rows returned (errors, then failures, then passes); totals always cover all rows |
include_snippet |
false | Add a pytest file reproducing the comparison (for CI) |
The result has one row per (column, tolerance set) with verdict
(pass / fail / error), the library status code, points outside the
tube, fractions of points and span outside, the worst deviation and, for
failures only, the violation intervals. Missing columns, bad data and
other per-column problems are reported in their rows instead of failing
the call. Both structured content and a short text rendering are returned.
CSV dialect
Comma-separated, one header row, lines starting with # ignored. The time
column is the first column named time (case-insensitive), otherwise the
first column; the choice is echoed back.
Tolerances
Six coefficients, x = time axis, y = signal value. At each reference sample the tube half-widths are
half_x = max(atolx, rtolx * time_span_ref, ltolx * |t|)
half_y = max(atoly, rtoly * value_range_ref, ltoly * |y_ref|)
atol*: absolute (time units / signal units)rtol*: fraction of the reference time span / value rangeltol*: fraction of the local|t|/|y_ref|
Omitted coefficients are resolved by the library, per axis: an axis with no
coefficient given gets rtol = 0.002; an axis with any coefficient given
uses 0 for its others; an explicit 0 counts as given. The six resolved
values are always echoed back.
Tolerance in x widens the tube along time, so a test signal shifted or
delayed by up to half_x still passes; steep edges and small timing
offsets then do not cause false failures.
"1 % in y, 0.5 s in x" is {"rtoly": 0.01, "atolx": 0.5} (or ltoly for
1 % of the local value).
Registering the server
Claude Code
Once published to PyPI:
claude mcp add simtest-funnel -- uvx simtest-funnel-mcp
From a checkout of this repository (use --scope user to make it available
in every project):
claude mcp add simtest-funnel -- uv run --directory /path/to/simtest-funnel --quiet simtest-funnel-mcp
Inside this repository nothing needs to be registered: the checked-in
.mcp.json starts the server with uv run from the
workspace (Claude Code asks for approval the first time).
Claude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"simtest-funnel": {
"command": "uvx",
"args": ["simtest-funnel-mcp"]
}
}
}
or, from a checkout:
{
"mcpServers": {
"simtest-funnel": {
"command": "uv",
"args": ["run", "--directory", "/path/to/simtest-funnel", "--quiet", "simtest-funnel-mcp"]
}
}
}
Use absolute paths in tool calls. When the client declares workspace roots, the server refuses paths outside them and resolves relative paths against the first root.
Development
make build # builds the native simtest-funnel module
make test-python # includes python/simtest-funnel-mcp/tests (incl. stdio end-to-end)
make lint-python # mypy --strict
uv run simtest-funnel-mcp # start the server on stdio
Metadata
Release files for simtest-funnel-mcp 1.0.0b12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simtest_funnel_mcp-1.0.0b12.tar.gz | 24.2 kB | Without provenance | Details for simtest_funnel_mcp-1.0.0b12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simtest_funnel_mcp-1.0.0b12-py3-none-any.whl | Python 3 | none | any | Details for simtest_funnel_mcp-1.0.0b12-py3-none-any.whl |
Total release size: 45.7 kB
Release files / simtest_funnel_mcp-1.0.0b12.tar.gz
| Download URL | simtest_funnel_mcp-1.0.0b12.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc1e1517d9dc181823fba833e2a2d28330a49472b3a24144b4fd3682388e58a5
|
|
BLAKE2b-256 checksum How to use checksums |
5696be34814da1401c1f4e97c00e0bd9b9812f0fc2be7669590d088ab48b022d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / simtest_funnel_mcp-1.0.0b12-py3-none-any.whl
| Download URL | simtest_funnel_mcp-1.0.0b12-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9a7e54bb40181859c7460d67c6c038f08322a27e61dad1e740dbbfe765963b8
|
|
BLAKE2b-256 checksum How to use checksums |
ce94231912e00bf1521b166065d7414f0dd2db0e160827ce9c2271ace7300b39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for simtest-funnel-mcp 1.0.0b12
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.