USDA MCP Server
USDA MCPサーバー
USDAのNASS QuickStatsおよびAMS Market News APIを、MCP互換のAIモデルに接続するMCPサーバーです。これにより、農家、研究者、USDA職員が米国の農業データについて平易な英語で質問し、正確でデータに基づいた回答を得ることができます。
Challenge Xハッカソン(2026年2月28日〜4月18日)向けに構築。 チーム: Root Access
このサーバーでできること
農家、研究者、USDA職員は、米国の農業データについて平易な英語で質問し、正確でデータに基づいた回答を得ることができます。APIとは何か、あるいは自分でデータを検索する方法を知る必要はありません。
過去のデータ (NASS QuickStats)
"What was the corn yield in Iowa in 2022?" (2022年のアイオワ州のトウモロコシの収穫量は?)
"How has soybean production in Illinois trended from 2018 to 2022?" (2018年から2022年までのイリノイ州の大豆生産量の推移は?)
"How many acres of wheat were planted in Kansas in 2021?" (2021年にカンザス州で小麦は何エーカー作付けされたか?)
"What price did Iowa farmers receive for corn in 2022?" (2022年にアイオワ州の農家が受け取ったトウモロコシの価格は?)
"What was national corn production in 2022?" (2022年の全米のトウモロコシ生産量は?)
現在の市場価格 (AMS Market News)
"What is the current corn price in Iowa?" (アイオワ州の現在のトウモロコシ価格は?)
"What is today's soybean price in Illinois?" (今日のイリノイ州の大豆価格は?)
"Where should I sell my soybeans — iowa, illinois, or nebraska?" (大豆はどこで売るべきか — アイオワ、イリノイ、ネブラスカ?)
"What is the current wheat price in Kansas?" (カンザス州の現在の小麦価格は?)
Related MCP server: USDA NASS MCP Server
ツール
このサーバーは4つのMCPツールを公開しています:
ツール | データソース | 機能 |
| NASS QuickStats | 任意の州と年におけるトウモロコシと大豆の収穫量、作付面積、生産量、受取価格の高速検索 |
| NASS QuickStats | 任意の作物、任意の統計、複数年の傾向、国または郡レベルのデータ |
| AMS Market News | 場所別の現在の穀物現金価格 |
| AMS Market News | 複数の州の現在の価格を比較し、最適な市場を見つける |
プロジェクト構成
usda-mcp/
├── clients/
│ ├── nass_client.py # NASS QuickStats API wrapper
│ └── ams_client.py # AMS Market News API wrapper
├── server/
│ ├── main.py # MCP server — 4 tools
│ ├── security.py # OWASP MCP Top 10 mitigations
│ └── tools/
│ └── __init__.py
├── tests/
│ └── qa_log.csv # Q&A evaluation log
├── demo/
│ └── app.py # Demo interface (planned)
├── logs/
│ └── usda_nass_server.log # Auto-generated server log
├── .env # API keys (never committed)
├── .env.example # Template for API keys
├── requirements.txt # Pinned dependencies
├── SECURITY.md # OWASP MCP Top 10 documentation
└── README.mdセットアップ
1. リポジトリのクローン
git clone https://github.com/RolakeOkans/usda-mcp.git
cd usda-mcp2. 仮想環境の作成
python -m venv .venv
source .venv/bin/activate3. 依存関係のインストール
pip install -r requirements.txt4. ルートフォルダに .env ファイルを作成
NASS_API_KEY=your_nass_key_here
AMS_API_KEY=your_ams_key_here5. APIキーの取得
NASS: https://www.nass.usda.gov/developer/index.php で登録
AMS: https://mymarketnews.ams.usda.gov で登録
どちらも無料で、数分で発行されます。
Claude Desktopへの接続
~/Library/Application Support/Claude/claude_desktop_config.json に以下を追加してください:
{
"mcpServers": {
"usda-nass": {
"command": "/path/to/your/python",
"args": ["/path/to/usda-mcp/server/main.py"],
"env": {
"NASS_API_KEY": "your_key_here",
"AMS_API_KEY": "your_key_here"
}
}
}
}パスは実際のPythonおよびプロジェクトのパスに置き換えてください。
検証済みデータ — NASS QuickStats
すべてのクエリは、2022年のアイオワ州についてテストされ、動作が確認されています。
商品 | 統計 | アイオワ州 2022年結果 |
トウモロコシ | 作付面積 | 12,900,000 エーカー |
トウモロコシ | 収穫量 | 200 BU / エーカー |
トウモロコシ | 生産量 | 2,470,000,000 BU |
トウモロコシ | 受取価格 | $6.62 / BU |
大豆 | 作付面積 | 10,100,000 エーカー |
大豆 | 収穫量 | 58.5 BU / エーカー |
大豆 | 生産量 | 586,755,000 BU |
大豆 | 受取価格 | $14.20 / BU |
検証済みデータ — AMS Market News
現在の価格は2026年4月2日時点で動作確認済みです。
商品 | 場所 | 価格 |
トウモロコシ | ミネアポリス | $4.08 / bu |
大豆 | ミネアポリス | $11.10 / bu |
トウモロコシ | アイオワ州 | $4.12 / bu |
トウモロコシ | テキサス州 | $4.90 / bu |
大豆 | イリノイ州 | $11.76 / bu |
小麦 | カンザス州 | $5.34 / bu |
データソース
ソース | カバー範囲 | ステータス |
NASS QuickStats | 作付面積、収穫量、生産量、受取価格 — 任意の作物、州、年 | 動作中 |
AMS Market News | エレベーターでの現在の穀物現金価格 — 19州 + 動的検索 | 動作中 |
AMS Socrata | 輸送コストと輸送量 | ストレッチゴール |
ERS | 予測価格 | ストレッチゴール |
仕組み
User asks a plain English question
↓
AI model reads the question and decides which tool to call
↓
MCP server validates and sanitizes the input
↓
NASS or AMS API returns the raw data
↓
Server scans response for security issues
↓
AI model interprets the data and returns a plain English answer
↓
All tool calls logged to logs/usda_nass_server.logセキュリティ
このサーバーは、OWASP MCP Top 10の全10リスクに対処しています。 詳細は SECURITY.md を参照してください。
概要:
APIキーは
.envに保存され、コミットされることはなく、すべてのログから除外されます読み取り専用サーバー — GETリクエストのみ、USDAシステムへの書き込みアクセス権なし
すべてのツール引数に対する入力サニタイズ
ツールごとに1分あたり30リクエストのレート制限
すべてのAPIレスポンスに対するプロンプトインジェクション検出
すべてのツール呼び出しの完全な監査ログ
.env ファイルは絶対にコミットしないでください。.gitignore にリストされています。
チーム — Root Access
役割 | 担当者 | 責任範囲 |
データ / API | Morolake | API調査、NASSクライアント、AMSクライアント、MCPサーバー、セキュリティ |
MCP / AIレイヤー | [Gabriela] | AIレイヤー、デモUI |
評価 / セキュリティ | [Neyssa] | Q&Aテスト、精度メトリクス |
ハッカソン
Challenge X+ USDA 期間: 2026年2月28日〜4月18日 発表: 2026年4月18日
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to analyze farm locations, retrieve soil and weather data, access commodity market prices, and chat with an agricultural advisor for farming recommendations.MIT- FlicenseNot gradedqualityDmaintenanceEnables access to USDA NASS agricultural statistics data through natural language queries, supporting full dataset retrieval, record counts, and parameter discovery.4
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to access free, open agronomic data for field briefings, spray windows, water balance, pest pressure, and more, using only public data sources without API keys.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying iCrop farm management data including farms, crops, fields, soil types, and cultivation methods through natural language.
Related MCP Connectors
NASS MCP — USDA National Agricultural Statistics Service (Quick Stats)
UN FAOSTAT global food & agriculture statistics over a local SQLite mirror, via MCP.
US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nstclore/usda-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server