bestpred-mcp
USDA's best prediction of dairy lactation yields (bestpred, the Python port of BESTPRED 2.0rc7) as tools any AI agent can call. An agent can't work out a lactation record in its head; with this it runs the method USDA uses for official records, and reports the numbers it gets back.
It is an MCP server. MCP is the open standard agents use for tools, so the same server works in Claude, ChatGPT and Codex, Cursor, VS Code and Gemini CLI.
Use it
Nothing to install: in Claude, open claude.ai/directory/bestpred and click
Connect. In any other MCP app, add https://bestpred.dairydatascience.com/mcp.
Claude Code or Cowork, with the skill: install the BESTPRED plugin from Claude's plugin directory, or
claude plugin marketplace add padge01/bestpred-python then claude plugin install bestpred@bestpred.
On your own computer, so your files never leave it: you need uv (it runs the server; nothing else to install).
uvx bestpred-mcp
-
Claude Code:
claude mcp add bestpred -- uvx bestpred-mcp -
Claude Desktop, Cursor, Gemini CLI: add to the app's MCP settings file:
{ "mcpServers": { "bestpred": { "command": "uvx", "args": ["bestpred-mcp"] } } }
-
VS Code (
.vscode/mcp.json):{ "servers": { "bestpred": { "command": "uvx", "args": ["bestpred-mcp"] } } } -
Codex plugin (with the skill):
codex plugin marketplace add padge01/bestpred-python, then install BESTPRED from the Plugins tab. -
Codex, the server alone (
~/.codex/config.toml):[mcp_servers.bestpred] command = "uvx" args = ["bestpred-mcp"]
Then ask your agent, for example: "Work out 305-day milk for every cow in tests.csv".
The tools
| Tool | What it does |
|---|---|
herd_lactations |
A herd's test-day export (CSV, one row per cow per test) to a record for every lactation: a summary by parity, the least persistent cows, and the full table written to a new file beside the input. Columns are matched loosely: ID, LACT, FDAT, DIM (or TDAT), MILK, PCTF, PCTP, SCS; AGE in months adds mature equivalent. |
lactation |
One cow's test days to 305-day and 365-day milk, fat and protein, mature equivalent (with her age), reliability, persistency and data collection rating. |
expected_curve |
A cow's expected daily milk to day 305 from her test days, to compare with what she is giving. |
mature_equivalent_factors |
USDA's age factors for a breed, age at calving, calving month, parity, state and previous days open. |
Pounds by default; pass units: "kg" for kilograms. With no herd average given, the breed average is used. There is
no limit on test days, so daily milk weights all count (to day 365); match_usda: true keeps only a lactation's
first 50, as USDA's own program does. Send one test day per day, with milkings weighed separately added together: a
second test on the same day is not used, and results say how many were left out (tests_same_day_or_past_365).
What stays on your computer
Run this way, the server runs on your computer: your files are read there and the table is written there. What your agent shows the AI model (the summary it reads back) goes to that model's company, as everything in a chat does.
Hosted, nothing to install: https://bestpred.dairydatascience.com/mcp (add it as a custom connector in Claude,
or any MCP client). bestpred-mcp --http serves the same tools over HTTP for hosting your own. Hosted, it reads no files, keeps nothing, and takes
at most 5,000 lactations a call.
Licence
Apache-2.0. BESTPRED is USDA-ARS public-domain work (VanRaden; Cole and VanRaden); this is not affiliated with or endorsed by USDA. See the main repository's NOTICE.
Metadata
Release files for bestpred-mcp 0.3.0
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 |
|---|---|---|---|---|
| bestpred_mcp-0.3.0.tar.gz | 15.8 kB | With provenance | Details for bestpred_mcp-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bestpred_mcp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for bestpred_mcp-0.3.0-py3-none-any.whl |
Total release size: 31.3 kB
Release files / bestpred_mcp-0.3.0.tar.gz
| Download URL | bestpred_mcp-0.3.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3b3dd8ca3b09789a483e4d958920eb5ee8977e270f269aef569facaed440404
|
|
BLAKE2b-256 checksum How to use checksums |
5c7e72e3704ef75cc595c9adc3c5114f954799a899fad7bd7dccee1300d8b8fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logRelease files / bestpred_mcp-0.3.0-py3-none-any.whl
| Download URL | bestpred_mcp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d510c9d056cc0f66fda64d9ca2a2610bec70658b545ef0ec2f3b5c1d129df13
|
|
BLAKE2b-256 checksum How to use checksums |
08b3a32976fea672213fc35fe606aa92c5046af1e7a75542a54ceef83f4c3d51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logSecurity for bestpred-mcp 0.3.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bestpred_mcp-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logA 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.