FoodData Central
About
Access the USDA's FoodData Central database for comprehensive food and nutrient information.
Details
- Author
- felipeadachi
- Categories
- Database, Other
- Tags
- #research, #healthcare
Jump to
Setup
Install FoodData Central in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/felipeadachi/mcp-food-data-central
Follow the installation instructions in the repository README, then restart your MCP client.
This project demonstrates how to build an MCP server that enables AI agents to access the USDA FoodData Central API. It allows searching for foods, retrieving detailed nutritional information, and accessing comprehensive food data through keyword search and structured queries.
This project is based on Cole Medin's excellentMCP-Mem0 projectand jlfwong'sFood Data Central MCP Server.
The server provides three essential food data access tools:
- search_foods: Search for foods using keywords with optional filters for data type, brand, date range, etc.
- get_food_details: Get comprehensive nutritional and ingredient information for a specific food item by FDC ID
- get_multiple_foods: Retrieve detailed information for multiple foods at once (up to 20 items)
- Python 3.12+
- USDA API key (free fromFoodData Central)
- Docker if running the MCP server as a container (recommended)
git clone https://github.com/FelipeAdachi/mcp-food-data-central.git cd food-data-central-mcp
Create a.envfile based onenv.example:
Configure your environment variables in the.envfile (see Configuration section)
docker build -t food-data-central-mcp --build-arg PORT=8050 .
Create a.envfile based onenv.exampleand configure your environment variables
The following environment variables can be configured in your.envfile:
- Visit theUSDA FoodData Central API Guide
- Sign up for a free API key
- Add the key to your.envfile asUSDA_API_KEY
# Set TRANSPORT=sse in .env then: uv run src/main.py
The MCP server will essentially be run as an API endpoint that you can then connect to with config shown below.
With stdio, the MCP client itself can spin up the MCP server, so nothing to run at this point.
docker run --env-file .env -p 8050:8050 food-data-central-mcp
The MCP server will essentially be run as an API endpoint within the container that you can then connect to with config shown below.
With stdio, the MCP client itself can spin up the MCP server container, so nothing to run at this point.
Once you have the server running with SSE transport, you can connect to it using this configuration:
{ "mcpServers": { "food-data-central": { "transport": "sse", "url": "http://localhost:8050/sse" } } }
Note for Windsurf users: UseserverUrlinstead ofurlin your configuration:
{ "mcpServers": { "food-data-central": { "transport": "sse", "serverUrl": "http://localhost:8050/sse" } } }
Note for n8n users: Use host.docker.internal instead of localhost since n8n has to reach outside of its own container to the host machine:
So the full URL in the MCP node would be:http://host.docker.internal:8050/sse
Make sure to update the port if you are using a value other than the default 8050.
Add this server to your MCP configuration for Claude Desktop, Windsurf, or any other MCP client:
{ "mcpServers": { "food-data-central": { "command": "your/path/to/food-data-central-mcp/.venv/Scripts/python.exe", "args": ["your/path/to/food-data-central-mcp/src/main.py"], "env": { "TRANSPORT": "stdio", "USDA_API_KEY": "YOUR-API-KEY" } } } }
{ "mcpServers": { "food-data-central": { "command": "docker", "args": ["run", "--rm", "-i", "-e", "TRANSPORT", "-e", "USDA_API_KEY", "food-data-central-mcp"], "env": { "TRANSPORT": "stdio", "USDA_API_KEY": "YOUR-API-KEY" } } } }
# Search for cheese products search_foods(query="cheddar cheese", page_size=10) # Search for branded foods from a specific company search_foods(query="yogurt", data_type=["Branded"], brand_owner="Dannon") # Search with date filtering search_foods(query="organic apple", start_date="2023-01-01", end_date="2023-12-31")
# Get full details for a specific food item get_food_details(fdc_id=534358) # Get abridged details with specific nutrients only get_food_details(fdc_id=534358, format_type="abridged", nutrients=[203, 204, 205])
# Get details for multiple foods at once get_multiple_foods(fdc_ids=[534358, 373052, 616350])
The server provides access to the USDA FoodData Central API endpoints:
- Search Foods(/v1/foods/search)
- Food Details(/v1/food/{fdcId})
- Multiple Foods(/v1/foods)
All data returned follows the official USDA FoodData Central API schema and includes comprehensive nutritional information, ingredients, serving sizes, and more.
This project is licensed under the MIT License - see theLICENSEfile for details.
A nutrition analysis platform integrating Canada's Food Guide recipes with Health Canada's official nutrition databases.
Interact with DROMA drug-omics association analysis databases using natural language.
Enhanced Medication Information MCP Server
Provides real-time access to FDA drug data, including shortages, labeling, and recalls, via the openFDA API.
FDA-only compliance data MCP (recalls, warning letters, inspections, 483s, approvals, CFR parts).
Source-provenanced US federal healthcare provider data over MCP. Resolve any NPI or CCN across NPPES, OIG LEIE, SAM.gov, state Medicaid exclusions, CMS PECOS, Care Compare, and Open Payments — every field carries a 14-field provenance contract, and an "excluded or compromised anywhere" check runs on every lookup.
Unofficial server for accessing Open Targets platform data for gene-drug-disease associations research.
Access nutrition information for over 600,000 foods from the USDA FoodData Central database.
A search server for PubMed, the biomedical literature database, using a pure Node.js implementation.
Unified access to global medical terminologies: ICD-11, SNOMED CT, LOINC, RxNorm, MeSH. 27 tools for medical coding, terminology lookup, and crosswalk mappings.
Medical terminology intelligence for AI agents — ICD-10-CM lookup, MedDRA hierarchy and SOC mapping, RxNorm drug concepts, CTCAE v5.0 grading, and cross-terminology mapping.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





