CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
cyanheads avatar

Usda Mcp Server

cyanheads/usda-mcp-server
1authSTDIO, HTTPregistry active
Summary

Wraps the USDA FoodData Central API with five tools for searching foods, fetching full nutrient profiles, batch lookups, side-by-side comparisons, and a static nutrient reference table. Search spans SR Legacy whole foods and branded products, including UPC lookup. The get_food tool returns full profiles with optional portion scaling in grams, ounces, pounds, or servings. Batch operations report partial failures instead of aborting when some IDs are missing. Compare_foods returns a markdown pivot table with values scaled to a common basis. Built on the author's mcp-ts-core framework with unified error handling and both stdio and streamable HTTP transports. Requires a free FoodData Central API key.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →

@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 • 2 Resources

Version License Docker MCP SDK npm TypeScript Bun

Install in Claude Desktop Install in Cursor Install in VS Code

Framework

Public Hosted Server: https://usda.caseyjhand.com/mcp


Overview

USDA FoodData Central — the US government's authoritative food composition database, spanning roughly 400,000 foods across SR Legacy, Foundation, Survey (FNDDS), and Branded sources. Search foods by keyword or UPC, pull full nutrient profiles with portion scaling, and compare foods side by side from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.

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

All resource data is 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 a preview of key nutrients (energy, protein, fat, carbs) — not a complete profile
  • Typed errors: query_empty (blank query), 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 quantity + unit (g / oz / lb / kg / serving) scales every value from the FDC per-100g basis; unit="serving" uses the food's first defined portion weight
  • Returns allPortions[] alongside the scaled result
  • Typed errors: not_found (bad FDC ID), quantity_without_unit, no_portion_data (serving requested but the food has no portion data)

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 100g)
  • 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

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

Public Hosted Instance

A public instance is available at https://usda.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

{
  "mcpServers": {
    "usda-mcp-server": {
      "type": "streamable-http",
      "url": "https://usda.caseyjhand.com/mcp"
    }
  }
}

Self-Hosted / Local

Add the following to your MCP client configuration file. See data.gov API key signup to generate a free API key.

{
  "mcpServers": {
    "usda-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/usda-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info",
        "USDA_FDC_API_KEY": "your-api-key"
      }
    }
  }
}

Or with npx (no Bun required):

{
  "mcpServers": {
    "usda-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/usda-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info",
        "USDA_FDC_API_KEY": "your-api-key"
      }
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "usda-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "MCP_TRANSPORT_TYPE=stdio",
        "-e", "USDA_FDC_API_KEY=your-api-key",
        "ghcr.io/cyanheads/usda-mcp-server:latest"
      ]
    }
  }
}

For Streamable HTTP, set the transport and start the server:

MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 USDA_FDC_API_KEY=your-api-key bun run start:http
# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.4.0 or higher (or Node.js v24+).
  • A free USDA FDC API key — register at api.data.gov/signup. Required for food search, lookup, and comparison calls; usda_list_nutrients and the static nutrient reference work without it.

Installation

  1. Clone the repository:
git clone https://github.com/cyanheads/usda-mcp-server.git
  1. Navigate into the directory:
cd usda-mcp-server
  1. Install dependencies:
bun install
  1. Configure environment:
cp .env.example .env
# edit .env and set USDA_FDC_API_KEY

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).<project-root>/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

Local development

  • 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 build -t usda-mcp-server .
docker run --rm -e USDA_FDC_API_KEY=your-key -p 3010:3010 usda-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/usda-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers tools, resources, and inits FdcService.
src/configServer-specific environment variable parsing and validation with Zod (USDA_FDC_API_KEY).
src/mcp-server/toolsTool definitions (*.tool.ts) — search, get, batch, compare, list-nutrients.
src/mcp-server/resourcesResource definitions (*.resource.ts) — food profile and nutrient reference.
src/services/fdcFdcService — USDA FDC API client, normalization, and static nutrient reference data.
tests/Unit tests mirroring src/ — 50 tests across all tools and resources.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools and resources via the barrels in src/mcp-server/*/definitions/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues are welcome. Run checks and tests before submitting:

bun run devcheck
bun run test

License

Apache-2.0 — see LICENSE for details.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Lid closed, agents working
Lid closed, agents working
Keeps your Mac awake while Claude Code, Codex or Cursor works. Lets it sleep when they are done.
Try free for 7 days →
Block distraction from your iPhone for freeBlock distraction from your iPhone for free
Block distraction from your iPhone for free
Block distracting apps from your iPhone permanently without a 3rd party app. Free and open source.
Block now (100% free) →
Granola, the best AI meeting recorder
Granola, the best AI meeting recorder
Notes, actions and memory. Without a meeting bot. First month 100% off.
Download for free →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
Open Steps
Open Steps
Free an open-source skills that make AI coding agents easier to understand, verify, and control.
Download for free →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →

Configuration

USDA_FDC_API_KEY*

USDA FoodData Central API key from data.gov. Required for all food data requests.

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Categories
DatabasesSearch & Web Crawling
Registryactive
Package@cyanheads/usda-mcp-server
TransportSTDIO, HTTP
AuthRequired
UpdatedMay 25, 2026
View on GitHub

More from cyanheads

  • Wikipedia Mcp Server1
  • Protein Mcp Server4
  • Census Mcp Server1
  • Internet Archive Mcp Server
  • Sports Mcp Server
  • Whois Mcp Server
  • Survey Mcp Server4
  • Anime Mcp Server
  • Oecd Mcp Server
  • Uspto Mcp Server
  • Mcp Ts Template145
  • nist-nvd-mcp-server
  • open-meteo-mcp-server
  • openfda-mcp-server
  • wikipedia-mcp-server
  • census-mcp-server
  • crossref-mcp-server
  • eur-lex-mcp-server
  • faostat-mcp-server
  • faostat-mcp-server
  • federal-regulations-mcp-server
  • fema-mcp-server
  • libofcongress-mcp-server
  • openfoodfacts-mcp-server

Related Databases MCP Servers

View all →
gluip avatar
Chart Canvas

gluip/chart-canvas

Create interactive visualizations and query data sources (SQLite, CSV, Parquet, JSON)
1
heshamfs avatar
Mcp Tool Factory

io.github.heshamfs/mcp-tool-factory

Generate MCP servers from natural language, OpenAPI specs, or database schemas.
1
lintbase avatar
Lintbase Mcp

io.github.madia333/lintbase-mcp

Real-time Firestore schema context for AI coding agents. Stop hallucinating field names.
1
muhdur avatar
PL/SQL Intelligence

io.github.muhdur/plsql-mcp

PL/SQL Intelligence MCP server — live Oracle DB tools + offline analyze/lineage/SAST (unofficial).
1
pipeworx-io avatar
Gdelt

io.github.pipeworx-io/gdelt

GDELT MCP — Global Database of Events, Language, and Tone (free, no auth)
1
servosity avatar
Atera MCP

io.github.servosity/atera-mcp

Every Atera RMM + PSA endpoint, plus a local SQLite mirror that answers fleet-health, SLA, and
1