ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Usda MCP Server

โดย cyanheadsรุ่น 0.2.0i★ –iบนเครื่องหรือคลาวด์
ชื่อใน registryio.github.cyanheads/usda-mcp-server

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Search foods, compare nutrients, and look up the full USDA FoodData Central database.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: บนเครื่องหรือคลาวด์
  • ช่องทาง (transport): stdio, Streamable HTTP
  • หมวด: ค้นข้อมูลและความจำของ AI
  • ต้องใส่ค่าเหล่านี้: USDA_FDC_API_KEY

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ต้องเตรียมก่อน

  • รันบนคลาวด์ไม่ต้องลงโปรแกรมเพิ่ม ต่อผ่านอินเทอร์เน็ตได้เลย
  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

ใช้ได้ทั้ง Claude บนเว็บ แอปคอมพิวเตอร์ และมือถือ:

  1. เปิด Settings → Connectors
  2. กด Add custom connector
  3. วางที่อยู่ด้านล่างแล้วกด Add
  4. ถ้าให้ล็อกอิน ให้ล็อกอินกับผู้ทำ
SettingsConnectors1+ Add2https://…3
https://usda.caseyjhand.com/mcp

หรือรันในเครื่องคุณ

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "usda": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/usda-mcp-server"
      ],
      "env": {
        "USDA_FDC_API_KEY": "ใส่ค่าของคุณ",
        "MCP_LOG_LEVEL": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add --transport http usda https://usda.caseyjhand.com/mcp

หรือรันในเครื่องคุณ

claude mcp add usda --env USDA_FDC_API_KEY='ใส่ค่าของคุณ' --env MCP_LOG_LEVEL='ใส่ค่าของคุณ' -- npx -y @cyanheads/usda-mcp-server

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "usda": {
      "url": "https://usda.caseyjhand.com/mcp"
    }
  }
}

หรือรันในเครื่องคุณ

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "usda": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/usda-mcp-server"
      ],
      "env": {
        "USDA_FDC_API_KEY": "ใส่ค่าของคุณ",
        "MCP_LOG_LEVEL": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "usda": {
      "type": "http",
      "url": "https://usda.caseyjhand.com/mcp"
    }
  }
}

หรือรันในเครื่องคุณ

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "usda": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/usda-mcp-server"
      ],
      "env": {
        "USDA_FDC_API_KEY": "ใส่ค่าของคุณ",
        "MCP_LOG_LEVEL": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ChatGPT ต่อได้เฉพาะ server ที่อยู่บนอินเทอร์เน็ต:

  1. เปิด ChatGPT บนเว็บ → Settings → Connectors (Apps)
  2. กด Create หรือ Add (บางแพ็กเกจต้องเปิด Developer mode ใน Advanced ก่อน)
  3. วางที่อยู่ด้านล่าง ตั้งชื่อ แล้วบันทึก
  4. ถ้าให้ล็อกอิน ให้ล็อกอินกับผู้ทำ
SettingsConnectors1+ Create2https://…3
https://usda.caseyjhand.com/mcp

ชื่อเมนูอาจต่างกันเล็กน้อยตามแพ็กเกจและรุ่นของแอป

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • USDA_FDC_API_KEY จำเป็น env
    USDA FoodData Central API key from data.gov. Required for all food data requests.
  • MCP_LOG_LEVEL env
    Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

ยังไม่ได้อ่านรายการเครื่องมือของตัวนี้ เราตรวจ endpoint ทีละชุดวนไป

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub cyanheads ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    endpoint ตอบ

    ยังไม่ได้ตรวจ เราตรวจ endpoint ทีละชุดวนไป

  • … ยังไม่ตรวจ

    ล็อกอินแบบ OAuth

    ยังไม่ได้ตรวจ เราตรวจ endpoint ทีละชุดวนไป

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    ยังไม่ได้ตรวจ เราอ่านรายการเครื่องมือตอนตรวจ endpoint

เทียบกับตัวอื่นในหมวด ค้นข้อมูลและความจำของ AIi

  • ดาวมากกว่า 0% ของอีก 7258 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 75% ของอีก 7258 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 7258 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Usda MCP Server ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: USDA_FDC_API_KEY

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

ได้ทั้งสองแบบ จะลงในเครื่องหรือต่อผ่านคลาวด์ก็ได้

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.2.0) เข้า registry 12 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต่อผ่าน URL จึงใช้กับโปรแกรมที่รับ remote MCP ได้ เช่น ChatGPT ที่เปิดโหมดนักพัฒนา

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Context7, Codebase Memory, Exa

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Context7

โดย upstash

ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว

บนเครื่องหรือคลาวด์★ 64,224MITอัปเดต วันนี้
ติดตั้ง

Codebase Memory

โดย DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

รันบนเครื่อง★ 48,148MITอัปเดต 20 วันที่ผ่านมา
ติดตั้ง

Exa

โดย exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

รันบนคลาวด์★ 5,213MITอัปเดต เดือนที่แล้ว
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ 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


Overview

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.

Tools
ToolDescription
usda_search_foodsSearch foods by keyword, ingredient, or UPC/GTIN across SR Legacy, Foundation, Survey (FNDDS), and Branded data sources
usda_get_foodFull nutrient profile for one food by FDC ID, with optional per-portion scaling
usda_get_foodsBatch nutrient fetch for 2–20 FDC IDs in a single request
usda_compare_foodsSide-by-side nutrient comparison for 2–5 foods, formatted as a markdown table
usda_list_nutrientsStatic FDC nutrient reference table (~150 nutrients) with IDs, names, units, and categories
Resources
ResourceDescription
usda://food/{fdcId}Full nutrient profile for a specific food by FDC ID
usda://nutrientsComplete FDC nutrient reference list
skill://usda-guide/SKILL.mdFood 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.

Capability reference

usda_search_foods tool
  • Query by keyword, ingredient name, or UPC/GTIN code; optional dataType[] 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 paginate
  • Returns FDC IDs plus available preview nutrients: protein (1003), fat (1004), carbohydrate (1005), fiber (1079), and energy (1008, 1062, 2047, 2048). Original values, units, order, and distinct energy estimates are preserved; missing entries are omitted. Use usda_get_food for other nutrients or the full profile
  • A page past totalPages returns empty foods[], the requested page, totals, and a notice with a valid pageNumber when the query has matches
  • Typed errors: query_empty (blank query), query_syntax (FDC rejected the query syntax), no_results (nothing matched in the requested data sources)

usda_get_food tool
  • Full nutrient profile for one fdcId; optional nutrients[] filter to specific IDs
  • Optional unit (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 quantity
  • servingInfo identifies the resolved portion or label serving and its gram weight; allPortions[] contains actual portion definitions only
  • Typed errors: not_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 inferred

usda_get_foods tool
  • Batch fetch for 2–20 FDC IDs in one call; values are per-100g only (no portion scaling)
  • nutrients[] filter strongly recommended — full profiles for 20 foods are large
  • Per-ID partial failure — IDs that return no data land in failed[] instead of aborting the batch

usda_compare_foods tool
  • Side-by-side comparison for 2–5 FDC IDs, pivoted one row per nutrient and one column per food
  • Defaults to 12 commonly compared nutrients (energy, protein, fat, saturated fat, carbs, fiber, total sugars, sodium, potassium, calcium, iron, vitamin C) unless nutrients[] is given
  • All values scaled to a common quantity + unit basis (default 100 g; quantity is an amount in unit, so unit: "oz" alone compares per 100 oz)
  • Proceeds with the valid foods when some IDs return no data; only throws too_few_foods when fewer than 2 resolve
  • Rows where every food is null for that nutrient are filtered out

usda_list_nutrients tool
  • Static reference table of ~150 tracked FDC nutrients — no API call
  • Optional category filter: macronutrients, vitamins, minerals, lipids, amino_acids, other
  • Returns each nutrient's ID, name, SR reference number, unit, and category — resolve a name to the ID used by nutrients[] elsewhere

usda://food/{fdcId} resource
  • Same data as usda_get_food without portion scaling — full nutrient profile per 100g as application/json
  • fdcId must be a bare positive integer (no sign, leading zero, decimal, or exponent); anything else throws invalid_id
  • not_found when the ID doesn't exist in FDC

usda://nutrients resource
  • Complete FDC nutrient reference — same content as usda_list_nutrients with no category filter
  • Served as application/json with a 1-hour public cache hint, since the table is bundled at build time and identical for every caller
skill://usda-guide/SKILL.md resource

Guidance 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.

Features

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:

  • Type-safe client for the USDA FoodData Central REST API (api.nal.usda.gov/fdc/v1)
  • Normalization layer that handles inconsistent API response shapes across search, single-food, and batch endpoints
  • Batch API endpoint (/foods) with per-food partial failure reporting
  • HTML response detection (rate-limit proxy returns 200 HTML) with service-unavailable error surfacing
  • Static nutrient reference dictionary — ~150 nutrients with FDC IDs, SR numbers, units, and categories; no API call required

Agent-friendly output:

  • Provenance preserved — FDC data source (dataType) on every food result so callers know whether they're reading curated research data or label-derived branded values
  • Partial failure reporting — batch tools (usda_get_foods, usda_compare_foods) return successes alongside structured failed[] / missingData[] entries rather than failing the whole request
  • Cross-reference hints — FDC IDs and tool names in descriptions so agents know exactly which call to make next (search → get → compare workflow)

Getting started

Connect 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.

Configuration

VariableDescriptionDefault
USDA_FDC_API_KEYRequired 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_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for HTTP server.3010
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (RFC 5424).info
LOGS_DIRDirectory for log files (Node.js only). /logs
STORAGE_PROVIDER_TYPEStorage backend.in-memory
OTEL_ENABLEDEnable OpenTelemetry instrumentation (spans, metrics, completion logs).false

See .env.example for the full list of optional overrides.

Running the server

Requires Bun v1.4.0 or higher (or Node.js v24+).

Local development
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

  • Build and run:
  # One-time build

bun run rebuild

Run the built server

bun run start:stdio

or

bun run start:http

  • Run checks and tests:
  bun run devcheck   # Lint, format, typecheck, security

bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec

Docker
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

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx