USDA api
This server allow you to ask questions with way more accurate nutrition facts.
š USDA Food Tools for Claude
Add powerful food and nutrition data to Claude for Desktop using the USDA's comprehensive food database.
š For Users - Quick Install
Option 1: GUI Installer (Recommended)
- Download:
USDA Food Tools Installer.zip(11KB) - Extract and double-click the app
- Get API Key: Free at api.nal.usda.gov
- Follow the installer - opens in your browser
- Restart Claude - tools appear automatically!
Option 2: Command Line
curl -sSL https://raw.githubusercontent.com/yourusername/usda-api-mcp/main/install.sh | bash
š What You Get
- Search Foods - Find any food with detailed nutrition facts
- Nutrition Analysis - Complete nutrient breakdowns
- Brand Information - Ingredients, categories, manufacturers
- Bulk Lookups - Multiple foods at once
- Research Data - USDA's gold-standard food database
š Requirements
- Claude for Desktop (latest version)
- Free USDA API key from api.nal.usda.gov
- macOS 10.15+ (GUI installer) or Python 3.11+ (command line)
š¬ Example Usage
Once installed, ask Claude:
- "What's the nutrition info for salmon?"
- "Compare chicken breast vs tofu protein"
- "Find high-fiber breakfast foods"
- "Show vitamin content of spinach"
š ļø For Developers
Development Setup
# Clone the repository
git clone https://github.com/yourusername/usda-api-mcp.git
cd usda-api-mcp
# Install dependencies
uv sync
# Set up environment
echo "USDA_API_KEY=your_key_here" > .env
# Run the MCP server
uv run main.py
Project Structure
usda-api-mcp/
āāā main.py # MCP server implementation
āāā gui_installer.py # Web-based GUI installer
āāā install.sh # Command-line installer
āāā pyproject.toml # Dependencies
āāā create_app.sh # Build Mac app bundle
āāā dist/ # Distribution files
Available MCP Tools
search_foods(query, page_size, page_number)- Search food databaseget_food_details(fdc_id, nutrients)- Get detailed food informationget_multiple_foods(fdc_ids, nutrients)- Bulk food lookuplist_foods(data_type, page_size, page_number)- Browse foodsget_food_nutrients(fdc_ids, nutrients)- Get specific nutrients
Building Releases
# Build Mac app bundle
./create_app.sh
# Create distribution zip
cd dist && zip -r "USDA-Food-Tools-Installer.zip" "USDA Food Tools Installer.app"
# Test the app
open "USDA Food Tools Installer.app"
API Integration
The server integrates with USDA FoodData Central API v2:
- Base URL:
https://api.nal.usda.gov/fdc/v2/ - Authentication: API key in query parameters
- Rate Limits: 3600 requests/hour (free tier)
- Data Types: Foundation, SR Legacy, Survey, Branded foods
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Submit a pull request
Testing
# Test MCP server directly
uv run main.py
# Test GUI installer
python3 gui_installer.py
# Test command-line installer
./install.sh
Deployment
The project uses a simple Mac app bundle approach:
- No complex packaging (py2app issues resolved)
- Shell script launcher with embedded Python
- Self-contained with port conflict resolution
- Automatic cleanup of existing processes
Related Servers
Manticore Search
Provides access to Manticore Search, an open-source database for real-time, full-text search.
NCBI Literature Search
Search NCBI databases, including PubMed, for scientific literature. Tailored for researchers in life sciences, evolutionary biology, and computational biology.
Mevzuat MCP
Programmatic access to the Turkish Ministry of Justice Legislation Information System (mevzuat.gov.tr) for searching legislation and retrieving article content.
LLM Jukebox
Search, download, and extract information from YouTube music videos.
ExploitDB MCP Server
Query security exploits and vulnerabilities from the ExploitDB database.
Naver Map Direction MCP
Provides geographical and directional data from the Naver Map API.
MCP NIF.PT
Query and analyze Portuguese companies using the NIF.PT public API. Supports search by NIF, company name, and city.
G-Search MCP
A Google search server using Playwright for parallel keyword searches.
News Fact-Checker
Automated fact-checking of news headlines using web search and Google Gemini AI.
BibTeX MCP Server
Search academic references from arXiv, DBLP, Semantic Scholar, and OpenAlex, and generate BibTeX entries.