Magpie — USDA Agricultural Data for AI Agents for LangChain
link.morningbrief/magpie
USDA farm data for AI agents: prices, WASDE, crop conditions, trade. 26 tools, free, no key.
client:LangChain
transport:streamable-http
tools:26
Install Magpie — USDA Agricultural Data for AI Agents in LangChain
pip install langchain-mcp-adapters
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"magpie": {
"transport": "streamable_http",
"url": "https://ag.morningbrief.link/mcp",
}
})
tools = await client.get_tools()
get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs
What LangChain can do once it is connected
- get_fertilizer_price
- get_fertilizer_history
- list_fertilizer_products
- get_grain_price
- get_grain_history
- list_grain_products
- get_livestock_price
- get_livestock_history
- list_livestock_products
- get_dairy_price
- list_dairy_products
- get_crop_stats
- get_crop_condition
- get_crop_progress
- get_weather
- get_forecast
- get_spreads
- get_wasde_projection
- get_wasde_history
- list_wasde_commodities
- get_export_sales
- get_export_sales_history
- list_esr_commodities
- get_trade_flows