Skip to main content
Glama
crop-prices

crop-prices

by RootedInData

crop-prices

A Claude Code plugin for US commodity crop prices. It bundles an MCP server that fetches prices for 37 crops from three free sources, and a skill that turns them into a one-screen market brief.

Source

What it is

Freshness

Yahoo Finance

Front-month futures (CBOT, ICE)

Daily

USDA NASS

Average price received by US farmers

Monthly (yearly for nuts, tobacco, sugarbeets)

FRED (IMF)

Global benchmark prices

Monthly

What you get

MCP tools

  • list_commodities: crops and groups the server knows about.

  • get_current_price: latest price for one crop (futures first, then farm, then global).

  • get_price_history: a price series with start, end, low, high, and % change. Supports state-level farm prices (e.g. Iowa soybeans).

  • compare_commodities: rank up to 12 crops by % change over the same period.

  • get_group_snapshot: current prices for a whole group (grains, oilseeds, fiber, softs, specialty, forage, other).

Skill: crop-market-brief

Ask "give me a crop market brief" and Claude writes a short report: a headline, futures price tables by group, a 12-month trend table, and notes on units and how fresh each price is.

Related MCP server: USDA MCP Server

Install

Requirements: uv (the server runs with uv run).

/plugin marketplace add RootedInData/crop-prices
/plugin install crop-prices@crop-prices

USDA NASS API key (optional)

Futures and global prices work without a key. For USDA farm prices, get a free key at https://quickstats.nass.usda.gov/api and set it:

claude plugin configure crop-prices

The key is stored as a sensitive plugin option. For local development you can put it in .env instead (see .env.example).

Notes on the data

  • Every price comes with its unit and source. Units differ across sources, even for the same crop (soybeans: cents/bushel futures, $/bushel farm price, $/metric ton global).

  • Futures and farm prices measure different things; the skill never computes a % change between them.

  • Prices are nominal (not adjusted for inflation).

  • Not investment advice.

Development

uv sync
uv run pytest
uv run python -m server.crop_prices_server     # run the server over stdio
claude --plugin-dir .                          # load the plugin for one session

Self-hosting over HTTP (optional)

The plugin runs the server on your machine over stdio. server/http_app.py serves the same tools over Streamable HTTP, protected by a bearer token, for hosting.

Run locally

export MCP_AUTH_TOKEN=$(python3 -c "import secrets; print(secrets.token_urlsafe(32))")
uv run uvicorn server.http_app:app --port 8080
claude mcp add --transport http crop-prices-http http://localhost:8080/mcp \
  --header "Authorization: Bearer $MCP_AUTH_TOKEN"

Requests without the token get 401. If MCP_AUTH_TOKEN is unset, every request is refused.

Deploy to Google Cloud Run (needs a project with billing enabled; small personal use normally stays in the free tier, but Google Cloud has no hard spending cap)

PROJECT=your-project-id REGION=us-central1
gcloud services enable run.googleapis.com cloudbuild.googleapis.com \
  artifactregistry.googleapis.com secretmanager.googleapis.com --project $PROJECT
printf %s "$MCP_AUTH_TOKEN" | gcloud secrets create mcp-auth-token --data-file=- --project $PROJECT
printf %s "$NASS_API_KEY"   | gcloud secrets create nass-api-key   --data-file=- --project $PROJECT
# Let Cloud Run's default service account read the secrets
SA=$(gcloud projects describe $PROJECT --format="value(projectNumber)")-compute@developer.gserviceaccount.com
for s in mcp-auth-token nass-api-key; do
  gcloud secrets add-iam-policy-binding $s --member=serviceAccount:$SA \
    --role=roles/secretmanager.secretAccessor --project $PROJECT
done
gcloud run deploy crop-prices --source . --region $REGION --project $PROJECT \
  --max-instances 1 --memory 512Mi --allow-unauthenticated \
  --set-secrets MCP_AUTH_TOKEN=mcp-auth-token:latest,NASS_API_KEY=nass-api-key:latest

--allow-unauthenticated lets requests reach the app; the app itself checks the token. Then connect with claude mcp add --transport http crop-prices-cloud <service-url>/mcp --header "Authorization: Bearer $MCP_AUTH_TOKEN". Set a budget alert in the Billing console.

License

MIT

Available Tools

5 tools
compare_commoditiesA

Compare crops by % price change over the same period. Units differ, so raw prices are not comparable, but % change is. Uses each crop's futures history when available, otherwise its monthly farm or global price.

Inputs: commodities (required), months.

get_current_priceA

Get the most recent price for one US crop. Use for "what is X selling for now?"

Tries live futures first, then USDA farm prices, then the global monthly price. Check fallback_used and age_days: farm and global prices can be 1-2 months old, and nuts/tobacco/sugarbeets only have annual prices.

Inputs: commodity (required).

get_group_snapshotA

Current price for every crop in a group in one call. Use for overviews like "how are grains doing?" or as the data for a market brief section.

Inputs: group (required).

get_price_historyA

Get a price time series for one crop, plus a summary (start, end, low, high, % change).

Use for trends ("how have corn prices changed since 2022?") and for state-level farm prices ("what are Iowa farmers getting for soybeans?").

Inputs: commodity (required), state, years, source.

list_commoditiesB

List the crops this server has prices for, with their available sources.

Inputs: group. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation4/5

    The tools mostly target distinct query shapes: listing available crops, single-crop current price, single-crop history, multi-crop comparison, and group snapshots. There is some overlap because get_group_snapshot is essentially a batch version of get_current_price, and compare_commodities relies on the same history data as get_price_history, but the descriptions make the intended use cases clear.

    Naming Consistency5/5

    All tool names use consistent snake_case and follow a predictable verb_noun pattern: list_commodities, get_current_price, get_price_history, compare_commodities, get_group_snapshot. The verbs are clear and consistently applied.

    Tool Count5/5

    Five tools is well-scoped for a crop-price server, covering discovery, current pricing, historical trends, comparison, and group overviews without excessive surface area. Each tool has a clear role and earns its place.

    Completeness4/5

    The surface covers the core lifecycle of price queries: available commodities, current prices, history, comparisons, and group snapshots. Minor gaps exist, such as no direct tool for current prices of an arbitrary custom set of crops or explicit date/source filtering, but agents can work around these with existing tools.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Real-time and historical oil, gas, and commodity prices. 40+ energy commodities including Brent Crude, WTI, Natural Gas, LBMA Gold/Silver, EU Carbon, and refined products. Get current prices, compare commodities, view market overviews, and access historical data — all through natural language. Used by energy traders, fintech companies, and researchers worldwide.
      32
      393 npm
      4
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables plain English queries about US agricultural data, including historical crop statistics from NASS QuickStats and current cash grain prices from AMS Market News.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server providing global soft-commodity data (cocoa, coffee, sugar, cotton, cashew) with per-call billing in USDC, offering tools for farmgate prices, ICE futures, CFTC COT positioning, and historical series.
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Provides agricultural product price monitoring, price index tracking, and daily/weekly/monthly market report queries to support price fluctuation identification and market trend analysis.
      1
      -