Breeding-scheme simulation via AlphaSimR β returns distributions, never a single run
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Breeding-scheme simulation over MCP β returns distributions, never a single stochastic run.
Drives AlphaSimR so an agent can ask what a selection programme would actually gain, with one structural rule: a single simulation run is not a result, and this API will not return one.
Measured on AlphaSimR 2.1.0 β five seeds of an identical three-cycle programme gave mean
genetic gain [1.151, 1.841, 1.424, 1.429, 1.473]: sd 0.247 on the very number being
reported. Quoting one run to three decimals reports noise with the authority of a measurement.
So run_program enforces a replicate floor and returns per-cycle mean, sd and confidence
interval. There is no flag that collapses it to a point estimate.
Unofficial. Not affiliated with, endorsed by, or sponsored by the AlphaSimR authors, the University of Edinburgh, or the R Foundation. See NOTICE.
On PyPI β the badge above is the released version, so it cannot go stale the way
a number typed here would. Genomic selection included. 5 tools, 57 tests against
real AlphaSimR, and 20 mutation checks all confirmed red
(docs/MUTATION-CHECKS.md). The simulation is also checked against the
breeder's equation R = hΒ²S rather than only against itself
(docs/EVAL.md). CI installs R and compiles
AlphaSimR, so the suite runs against the real engine on Python 3.11, 3.12 and 3.13 β
not against a mock.
Requires mcp 2.x.
Heavier than uv pip install, and the reasons are not negotiable:
libR.so)libtirpc-dev β rpy2 fails to link without it (cannot find -ltirpc)<3.6 β 3.6 binds R_getVar, which needs R β₯ 4.4If you build against a conda Python, rpy2 will fail to load libR.so with
GLIBCXX_3.4.30 not found β conda ships an older libstdc++ than system libicuuc
requires. Use a system or uv-managed interpreter.
The server speaks stdio; the installed console script is breedsim-mcp.
Claude Code
Claude Desktop β add to claude_desktop_config.json:
If the executable is not on your PATH, or AlphaSimR lives in a user library, invoke it
through uv and pass the library path:
Verify with list_methods(), which reports the engine versions and whether this process
can currently produce reproducible results.
| tool | returns |
|---|---|
list_methods() | engine versions, generators, selection methods, replicate floor |
found_population(generator, seed, n_ind, n_snp_per_chr, ...) | session_id, founder provenance, reproducible, measured LD |
run_program(session_id, cycles, replicates, ...) | per-cycle distributions β mean, sd, 95% CI |
compare_programs(session_id, a_n_select, b_n_select, ...) | the paired difference between two programmes, with a CI |
describe_session(session_id) | provenance, trait architecture, cycles run |
Typical loop: found_population β run_program β read the CI and the warnings.
Comparing two schemes: found_population β compare_programs β read difference.
Both run tools take selection_method="phenotypic" or "genomic".
species applies only to runMacs, which carries demographic histories for exactly
four: GENERIC, CATTLE, WHEAT, MAIZE (read out of body(runMacs), not the
docs). Anything else is refused here rather than failing inside R. Casing does not
matter β AlphaSimR upper-cases it, so this does too.
Note the scope that implies: two plants and an animal. Despite the default of
MAIZE, this is not a plant-only simulator.
Every size parameter has a ceiling, reported by list_methods() under limits so a
caller can size a request rather than discover the bound by being refused. R runs as a
single interpreter here and tool calls are serialised, so one oversized call blocks every
other call until it finishes β there is no second worker. The caps are set where a call
stops being slow and starts being an outage. For genuinely large jobs, drive AlphaSimR
directly rather than through this server.
run_program returnsVerbatim, for cycles=2, replicates=10, abridged to one cycle:
There is no value field anywhere. Intervals use t critical values rather than a normal
1.96, because at n = 5β10 the normal understates the interval β the wrong direction to be
wrong in when the interval exists to be honest.
Do not call run_program twice and compare the means. Use compare_programs, which
pairs the two arms on the same seeds β replicate i of A and replicate i of B start from
identical founders under an identical seed β and differences them within each pair, so
the shared luck of that seed cancels instead of being counted twice.
Read difference and favours. favours is null when the interval contains zero, which
means the two programmes are not distinguishable at that replicate count; the larger mean is
then not the better programme.
Here is why the pairing earns its keep. Verbatim, selecting 12 of 100 against 18 of 100, final cycle of two, ten replicates:
The two per-programme intervals overlap β A spans 1.900β2.192, B spans 1.552β1.909 β so
reading them side by side says "no difference". The paired difference says otherwise:
[+0.100, +0.531], entirely above zero. Pairing cancels the seed-to-seed variation that
made both individual intervals wide, so it resolves a contrast that eyeballing the overlap
cannot. That is what overlap_but_different is for.
Two overlapping confidence intervals do not imply no difference. This is the single easiest way to get a breeding comparison wrong, and it is why the tool reports a difference rather than two numbers.
selection_method="genomic" fits RRBLUP to the marker genotypes each cycle and
selects on the estimated breeding value instead of the phenotype. It needs a SNP
chip, which is a founding decision:
Note the generator, because this is where genomic selection goes quietly wrong.
Markers predict a trait only through linkage disequilibrium with the causal
loci β that is the whole mechanism. And quickHaplo, the default generator and
the only reproducible one, has none:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/breedsim-mcp)<a href="https://allmcps.com/mcp/breedsim-mcp"><img src="https://allmcps.com/api/badge/breedsim-mcp?style=directory" alt="Breedsim MCP on AllMCPs" /></a>