Skip to content

MCP server, qc, plot, merge --common-rows, mcp watch; version 0.10.0 - #39

Merged
YPARK merged 10 commits into
mainfrom
mcp-server
Oct 20, 2026
Merged

YPARK merged 10 commits into
mainfrom
mcp-server

Conversation

@YPARK

@YPARK YPARK commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

data-beans as a set of tools an agent can use, and a view a person can watch it from. The minor bump is for the new subcommands and flags.

data-beans mcp is a stdio MCP server on legume-mcp 0.1. Every tool runs a child data-beans, so stdout stays the protocol, a cancel kills the child, and log lines come back as progress.

  • Read tools: info, list_contents, names (regex, paged), statistics (quantiles and top entries), values (at most 100 entries).
  • Write tools:
    • qc: a dry run, then writing the kept cells.
    • plot: returned as a PNG image.
    • import (records its source), subset (names, a pattern, or index ranges), subsample, split, convert, merge (common_rows).
  • No tool replaces a file. An output that is an input, or anything else named after the output beside it, is refused. squeeze is not offered.
  • Records, after Noble (2009): every write goes into the day's replayable results/<date>/runall.sh and results/INDEX.tsv; unnamed outputs go in results/<date>/; import notes provenance in data/README.md.

data-beans mcp watch (legume-mcp's tui view) lets a person follow a live server:

  • its calls, logs, results and notebook;
  • s stops a call, n leaves the agent a note (it arrives with the next result), o opens a written backend in the statistics explorer;
  • --watch-only drops steering.

New CLI:

  • qc: senna's and pinto's cell QC, with the same --qc-* flags, as a summary or a filtered backend. The mito pattern defaults to (?i)^MT-.
  • plot qc and plot stat: figures as .png, .svg or .pdf, through legume-plot.
  • merge-backend --common-rows: keeps the rows every input has, in the first input's order.
  • subset-rows and subset-columns take index ranges (-i 0-19612,20000, cut at the matrix's end; repeats refused) and --pattern (a case-insensitive regex). Selections conflict, and are resolved before anything is copied.

Shared qc_lib (senna and pinto get these too):

  • --qc-mad-on-genes=false and --qc-mad-on-counts=false now parse; they used to be stuck on.
  • New --qc-mad-on-mito.
  • A band with no spread (MAD 0) no longer drops every cell that differs from the median.
  • A test fails on any CLI flag that defaults to on but can't be turned off; --allow-prefix was one, and is fixed.

Tested in Rust (cargo test):

  • the MCP tools end to end over stdio, including a sweep of every tool's refusals;
  • cancellation;
  • the records;
  • following a live server through the watch pane and leaving a note.

Also tried for real with Claude Code as the agent on the scVelo pancreas data (3,696 cells × 39,226 rows), through every tool. A replay of its runall.sh in a fresh copy of the project reproduced all 15 backends and 3 figures exactly.

cargo fmt and cargo clippy --all-targets are clean. The branch went through /simplify and /code-review at each step.

@YPARK
YPARK merged commit e15098c into main Oct 20, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant