MB

musharna/breedsim-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars 0 forks Качество 79 Тренд 20GPL-3.0

MCP server for breeding-scheme simulation (AlphaSimR) — 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: Measured once, on AlphaSimR 2.1.0 while building v0.1.0 (2026-07-29), and not re-run since — five seeds of an identical three-cycle programme gave mean genetic gain [1.151, 1.841, 1.424, 1.429, 1.473]: on the very number being reported. The run_program example below, which a script regenerates, shows spread of the same order (sd 0.386 at cycle 2). 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. Five tools.

README

Показан фрагмент оригинального README. Открыть оригинал.

breedsim-mcp

breedsim-mcp is an MCP server that lets AI agents run AlphaSimR breeding-program simulations. It returns the spread over replicates, never a single stochastic run, so an agent can say what a selection scheme would gain and how sure that is.

Why replicates

A single simulation run is not a result, and this API will not return one. Five seeds of an identical three-cycle program gave mean genetic gain [1.151, 1.841, 1.424, 1.429, 1.473], sd 0.247, on the very number being reported (measured once on AlphaSimR 2.1.0 while building v0.1.0, 2026-07-29). So run_program enforces a replicate floor and returns a per-cycle mean, sd and confidence interval. No flag collapses it to a point estimate.

Install

This needs more than uv pip install:

  • R ≥ 4.3 with a shared library (libR.so)
  • AlphaSimR, an Rcpp/RcppArmadillo compile that takes minutes
  • libtirpc-dev, or rpy2 fails to link (cannot find -ltirpc)
  • rpy2 <3.6, because 3.6 binds R_getVar, which needs R ≥ 4.4
sudo apt-get install -y r-base r-base-dev libtirpc-dev
R -e 'install.packages("AlphaSimR", repos="https://cloud.r-project.org")'
uv add breedsim-mcp

Do not use a conda Python: rpy2 then fails to load libR.so with GLIBCXX_3.4.30 not found, because conda ships an older libstdc++ than the system libicuuc requires. Use a system or uv-managed interpreter. Requires mcp 2.x.

Configure your MCP client

The server speaks stdio through the breedsim-mcp console script.

Claude Code

claude mcp add breedsim -- breedsim-mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "breedsim": {
      "command": "breedsim-mcp"
    }
  }
}

If the executable is not on your PATH, or AlphaSimR lives in a user library, run it through uv and pass the library path:

{
  "mcpServers": {
    "breedsim": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/breedsim-mcp", "breedsim-mcp"],
      "env": { "R_LIBS_USER": "/home/you/R/library" }
    }
  }
}
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "breedsim": { "command": "breedsim-mcp" } } }