Context7
Up-to-date docs for AI agents
作者による説明(英語の原文)
Search foods, compare nutrients, and look up the full USDA FoodData Central database.
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
USDA_FDC_API_KEY, MCP_LOG_LEVEL必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
ウェブ、デスクトップ、モバイルのClaudeで使えます:
https://usda.caseyjhand.com/mcpClaude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"usda": {
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}ターミナルでこれを実行します
claude mcp add --transport http usda https://usda.caseyjhand.com/mcpclaude mcp add usda --env USDA_FDC_API_KEY=your-value --env MCP_LOG_LEVEL=your-value -- npx -y @cyanheads/usda-mcp-server動かす前に、空欄の値を入力してください。
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"usda": {
"url": "https://usda.caseyjhand.com/mcp"
}
}
}プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"usda": {
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"usda": {
"type": "http",
"url": "https://usda.caseyjhand.com/mcp"
}
}
}プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"usda": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
ChatGPTがつなげるのは、インターネット上のサーバーだけです:
https://usda.caseyjhand.com/mcpメニューの名前は、プランや時期によって少し違うことがあります。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
MCP_LOG_LEVEL envこの設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ツールの名前と説明は、サーバーが2026年11月7日に返したそのままの内容です。書いたのは作者で、私たちではありません。プレーンテキストとして表示しています。
usda_list_nutrientsLook up the FDC nutrient reference table — all tracked nutrients with their numeric IDs, names, SR reference numbers, units, and categories. Use to resolve a nutrient name (e.g. "vitamin C") to its FDC ID (1162) before passing it to the nutrients[] filter on other tools. Filter b
usda_search_foodsSearch USDA FoodData Central foods by keyword. Returns matching foods with FDC IDs and available preview nutrients: protein (1003), fat (1004), carbohydrate (1005), fiber (1079), and energy (1008, 1062, 2047, 2048), preserving distinct energy estimates. Missing nutrients are omit
usda_get_foodGet the full nutrient profile for one food by FDC ID. Returns all available nutrients (or a filtered subset via the nutrients[] param) with optional per-portion scaling. Use usda_search_foods to discover FDC IDs. Provide unit, optionally with quantity, to scale all nutrient value
usda_get_foodsFetch nutrient profiles for 2–20 foods in a single API call. More efficient than calling usda_get_food N times when you already have multiple FDC IDs. All values are per 100g (no portion scaling). Use the nutrients[] filter to limit response size — strongly recommended for batch
usda_compare_foodsCompare nutrients side-by-side for 2–5 foods. Returns a structured table — one row per nutrient, one column per food — formatted as markdown. Best for "spinach vs kale iron" or "which has more protein?" questions. Omit nutrients[] to use the 12 most common defaults (energy, prote
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月7日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント cyanheads で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
208ミリ秒で応答(HTTP 200)
サインイン不要
5件のツールの説明を読み、AIへの隠れた指示は見つかりませんでした
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
入力が必要なもの:USDA_FDC_API_KEY
どちらでも使えます。パソコンにインストールしても、クラウド版につないでもかまいません。
GitHubリポジトリの最終更新は–、最新バージョン(0.2.0)がレジストリに届いたのは12 日前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。URLでつながるので、リモートMCPサーバーに対応したアプリ(開発者モードのChatGPTなど)でも使えます。
同じカテゴリには:Context7, Codebase Memory, Exa
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
@cyanheads/usda-mcp-server Search foods, compare nutrients, and look up the full USDA FoodData Central database via MCP. STDIO or Streamable HTTP. 5 Tools • 3 Resources
Public Hosted Server: https://usda.caseyjhand.com/mcp
Nutrition data for roughly 400,000 foods from USDA FoodData Central, the US government's authoritative food composition database. Search by keyword or UPC, pull full nutrient profiles scaled to any portion, and compare foods side by side.
| Tool | Description |
|---|---|
usda_search_foods | Search foods by keyword, ingredient, or UPC/GTIN across SR Legacy, Foundation, Survey (FNDDS), and Branded data sources |
usda_get_food | Full nutrient profile for one food by FDC ID, with optional per-portion scaling |
usda_get_foods | Batch nutrient fetch for 2–20 FDC IDs in a single request |
usda_compare_foods | Side-by-side nutrient comparison for 2–5 foods, formatted as a markdown table |
usda_list_nutrients | Static FDC nutrient reference table (~150 nutrients) with IDs, names, units, and categories |
| Resource | Description |
|---|---|
usda://food/{fdcId} | Full nutrient profile for a specific food by FDC ID |
usda://nutrients | Complete FDC nutrient reference list |
skill://usda-guide/SKILL.md | Food selection, serving-weight, and missing-nutrient guidance for agents |
Food profiles and the nutrient reference are also reachable via tools. Use usda_search_foods to discover FDC IDs before reading food resources.
usda_search_foods tooldataType[] filter across SR Legacy, Foundation, Survey (FNDDS), and Branded, defaulting to ["SR Legacy"] (or ["Branded"] once brandOwner is set)brandOwner and foodCategory filters narrow results; pageSize (max 50, default 10) and pageNumber paginateusda_get_food for other nutrients or the full profiletotalPages returns empty foods[], the requested page, totals, and a notice with a valid pageNumber when the query has matchesquery_empty (blank query), query_syntax (FDC rejected the query syntax), no_results (nothing matched in the requested data sources)usda_get_food toolfdcId; optional nutrients[] filter to specific IDsunit (g / oz / lb / kg / serving) with an optional quantity scales every value from the FDC per-100g basis; quantity defaults to 100 for mass units and 1 for serving. Serving uses the first valid portion, or a positive finite Branded label size in g / GRM / GM (case-insensitive) when no portion exists, multiplied by quantityservingInfo identifies the resolved portion or label serving and its gram weight; allPortions[] contains actual portion definitions onlynot_found (bad FDC ID), quantity_without_unit, no_portion_data (no valid portion or supported Branded gram label). Volume, IU, milligram labels, missing units, and invalid sizes require an explicit mass-unit request; no density is inferredusda_get_foods toolnutrients[] filter strongly recommended — full profiles for 20 foods are largefailed[] instead of aborting the batchusda_compare_foods toolnutrients[] is givenquantity + unit basis (default 100 g; quantity is an amount in unit, so unit: "oz" alone compares per 100 oz)too_few_foods when fewer than 2 resolveusda_list_nutrients toolcategory filter: macronutrients, vitamins, minerals, lipids, amino_acids, othernutrients[] elsewhereusda://food/{fdcId} resourceusda_get_food without portion scaling — full nutrient profile per 100g as application/jsonfdcId must be a bare positive integer (no sign, leading zero, decimal, or exponent); anything else throws invalid_idnot_found when the ID doesn't exist in FDCusda://nutrients resourceusda_list_nutrients with no category filterapplication/json with a 1-hour public cache hint, since the table is bundled at build time and identical for every callerskill://usda-guide/SKILL.md resourceGuidance for matching food records, choosing a serving weight, and reporting incomplete nutrient coverage. The same usda-guide ships with plugin installs, npm, Docker, and the desktop bundle.
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
FoodData Central-specific:
api.nal.usda.gov/fdc/v1)/foods) with per-food partial failure reportingAgent-friendly output:
dataType) on every food result so callers know whether they're reading curated research data or label-derived branded valuesusda_get_foods, usda_compare_foods) return successes alongside structured failed[] / missingData[] entries rather than failing the whole requestConnect to the hosted instance, no install:
claude mcp add --transport http usda-mcp-server https://usda.caseyjhand.com/mcp
Or run it locally:
claude mcp add usda-mcp-server -e USDA_FDC_API_KEY=your-key -- npx -y @cyanheads/usda-mcp-server
For other clients, add this to the MCP config file:
{
"mcpServers": { "usda-mcp-server": { "command": "npx", "args": ["-y", "@cyanheads/usda-mcp-server"], "env": { "USDA_FDC_API_KEY": "your-api-key" } } } }
Get a free key at api.data.gov/signup. Food search, lookup, and comparison require it; the static nutrient reference works without it. For Docker or a source build, see Running the server.
| Variable | Description | Default |
|---|---|---|
USDA_FDC_API_KEY | Required for FoodData Central-backed tools (search, get, batch, compare) — not for startup or usda_list_nutrients. Get a free key at api.data.gov. | — |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | /logs |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
See .env.example for the full list of optional overrides.
Requires Bun v1.4.0 or higher (or Node.js v24+).
git clone https://github.com/cyanheads/usda-mcp-server.git
cd usda-mcp-server && bun install cp .env.example .env # set USDA_FDC_API_KEY
# One-time build
bun run rebuild
bun run start:stdio
bun run start:http
bun run devcheck # Lint, format, typecheck, security
bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
docker run --rm -e USDA_FDC_API_KEY=your-key -p 3010:3010 ghcr.io/cyanheads/usda-mcp-server:latest
The image defaults to HTTP transport, stateless session mode, and logs to /var/log/usda-mcp-server. For stdio, use docker run -i --rm -e MCP_TRANSPORT_TYPE=stdio -e USDA_FDC_API_KEY=your-key ghcr.io/cyanheads/usda-mcp-server:latest. To build locally, run `docker build -t usda-mcp-server
冒頭だけを表示しています。続きはリポジトリで読めます