About mpr-cli
mpr-cli is a command-line tool for querying USDA MyMarketNews commodity data. It supports market reports, prices, market listings, and historical trends for users analyzing agricultural markets.
Key features
- 01List and search commodity reports
- 02Retrieve report details in JSON or CSV
- 03Query prices by commodity and market
- 04Browse markets and commodities
- 05Analyze historical data and trends
Use cases
- 01Check regional commodity prices
- 02Export report details for analysis
- 03Review historical market trends
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dl-alexandre/ skills --skill mpr-cliAfter installing, type/mpr-cliin Claude Code to confirm it loaded.
Details
From the project READMEMyMarketNews CLI
Query USDA MyMarketNews commodity data using the mpr command-line tool.
Prerequisites
mpr --version
mpr auth status
Authentication
- API key from USDA MyMarketNews
- Environment variable:
MPR_API_KEY - Config file:
~/.mpr/config.json
Commodity Reports
List Reports
mpr reports list --commodity cattle --limit 50
mpr reports list --location "Nebraska" --days 7
mpr reports search --query "fed steer"
Get Report Details
mpr reports get REPORT_ID --pretty
mpr reports get REPORT_ID --format csv --output report.csv
Price Queries
mpr prices --commodity cattle --market "Omaha"
mpr prices --commodity corn --date 2024-01-15
mpr prices --commodity wheat --location "Kansas City" --range 30days
Market Data
mpr markets list --state Nebraska
mpr markets get MARKET_ID --commodities cattle,hogs
mpr commodities list --category livestock
Historical Data
mpr history --commodity cattle --market MARKET_ID --start 2024-01-01 --end 2024-03-01
mpr trends --commodity corn --days 90 --output trends.json
Agent Best Practices
- Date ranges for historical analysis
- Location filters for regional pricing
- Output formats: JSON (default), CSV, or table
- Rate limits: Respect USDA API limits (check
--helpfor details)
Comments
Markdown supported