home / mcp / opennutrition mcp server

OpenNutrition MCP Server

MCP server providing access to the comprehensive OpenNutrition food database with 300,000+ food items, nutritional data, and barcode lookups

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "deadletterq-mcp-opennutrition": {
      "command": "node",
      "args": [
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-opennutrition/build/index.js"
      ]
    }
  }
}

You run a local MCP server that exposes a large OpenNutrition food database, giving you fast, private access to 300,000+ food items, nutrition data, and barcode lookups. You can search by name, browse foods, get detailed nutrition by ID, and perform barcode lookups, all without external API calls. This makes it ideal for privacy-conscious apps and research workflows.

How to use

You connect to the OpenNutrition MCP server using your MCP client. Start the local server, then use the client to issue queries like searching for foods by name, listing available foods, retrieving detailed nutrition data by food ID, or looking up items by barcode. All processing happens on your machine, so responses are fast and data stays private. Typical usage patterns include: searching for a specific food item and inspecting its full nutrition profile, paging through the catalog to discover items, and resolving barcodes to match products to nutritional data.

How to install

Prerequisites you need on your machine: Node.js installed (the same version used to build the project). Ensure you have npm available to install dependencies.

1. Install dependencies

npm install

2. Build the project

npm run build

3. Configure the MCP server to run locally

"mcp-opennutrition": {
  "command": "/Users/YOUR.USERNAME/.nvm/versions/node/v20.19.0/bin/node",
  "args": [
    "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-opennutrition/build/index.js"
  ]
}

Additional notes and configuration

The server uses the OpenNutrition dataset, providing comprehensive nutritional profiles including macronutrients, vitamins, and minerals.

Start the server locally with the command and arguments shown above. No external API calls are made once the server is running, which preserves privacy and improves response times.

Available tools

Search by Name

Find foods by name, brand, or partial matches to quickly locate items in the OpenNutrition catalog.

Browse Foods

Retrieve paginated lists of all available foods to explore the database contents.

Get by ID

Fetch detailed nutritional information for a specific food item using its unique ID.

Barcode Lookup

Resolve EAN-13 barcodes to corresponding foods in the dataset for quick barcode-based searches.

OpenNutrition MCP Server - deadletterq/mcp-opennutrition