Search foods, compare nutrients, and look up the full USDA FoodData Central database via MCP. STDIO or Streamable HTTP.
Setup
Choose your client, copy the config, then fill in any required environment variables.
Local
claude mcp add usda --env USDA_FDC_API_KEY='<USDA_FDC_API_KEY>' -- npx -y @cyanheads/usda-mcp-server~/.codex/config.toml
[mcp_servers.usda]
command = "npx"
args = ["-y", "@cyanheads/usda-mcp-server"]
env = { USDA_FDC_API_KEY = "<USDA_FDC_API_KEY>" }
# codex mcp add usda --env USDA_FDC_API_KEY='<USDA_FDC_API_KEY>' -- npx -y @cyanheads/usda-mcp-server~/.cursor/mcp.json
{
"mcpServers": {
"usda": {
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "<USDA_FDC_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"usda": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "<USDA_FDC_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"usda": {
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "<USDA_FDC_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"usda": {
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "<USDA_FDC_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"usda": {
"command": "npx",
"args": [
"-y",
"@cyanheads/usda-mcp-server"
],
"env": {
"USDA_FDC_API_KEY": "<USDA_FDC_API_KEY>"
}
}
}
}Remote
claude mcp add --transport http usda https://usda.caseyjhand.com/mcp~/.codex/config.toml
[mcp_servers.usda]
url = "https://usda.caseyjhand.com/mcp"
# codex mcp add usda --url https://usda.caseyjhand.com/mcp~/.cursor/mcp.json
{
"mcpServers": {
"usda": {
"url": "https://usda.caseyjhand.com/mcp"
}
}
}.vscode/mcp.json
{
"servers": {
"usda": {
"type": "http",
"url": "https://usda.caseyjhand.com/mcp"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"usda": {
"httpUrl": "https://usda.caseyjhand.com/mcp"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"usda": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://usda.caseyjhand.com/mcp"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"usda": {
"url": "https://usda.caseyjhand.com/mcp"
}
}
}Environment variables
USDA_FDC_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.