MCP Food Data Central MCP Server

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for accessing the USDA's FoodData Central database. This server provides AI

Local serverstdioPython

What is the MCP Food Data Central MCP server?

MCP Food Data Central MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. A Model Context Protocol (MCP) server for accessing the USDA's FoodData Central database. This server provides AI agents with the ability to search for foods, get detailed nutritional information, and.

What you get

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.

Configuration and credentials

You will need 2 environment variables: TRANSPORT, USDA_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.12+ - USDA API key (free from FoodData Central) - Docker if running the MCP server as a container (recommended)

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Choosing this one

Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. It is maintained by FelipeAdachi; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp food data central mcp server does with a few real requests.

How to install the MCP Food Data Central MCP server

### Docker with Stdio Configuration

```json
{
  "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"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.12+ - USDA API key (free from FoodData Central) - Docker if running the MCP server as a container (recommended)
VariableDescriptionRequired
TRANSPORTConfiguration value read at startup.Optional
USDA_API_KEYCredential the server authenticates with.Yes

Frequently asked questions

It connects MCP Food Data Central to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with MCP Food Data Central directly.