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.
Install
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.
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.
bestpred-mcp --http serves the same tools over HTTP for hosting. 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.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bestpred_mcp-0.2.1.tar.gz | 13.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bestpred_mcp-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.9 kB
Release files / bestpred_mcp-0.2.1.tar.gz
| Download URL | bestpred_mcp-0.2.1.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3480d05b547484003203c9b48f91b53ea2d4b93bb7e096186d32fddbfabc1493
|
|
BLAKE2b-256 checksum How to use checksums |
014ba9203f60dd1cb65b564f7abb5a518a8f3ace9d06d686a618746a889821c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / bestpred_mcp-0.2.1-py3-none-any.whl
| Download URL | bestpred_mcp-0.2.1-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b06ba48c27c4e32d456d1a7b4145b089161af46d3a4bd05cbd11e7771ad3925c
|
|
BLAKE2b-256 checksum How to use checksums |
948c23d5be40496f8c373b81481a2e89d0753463b963e75b3ba503520650ab76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency log