food-mcp-server

salindersidhu/food-mcp-server

3.2

If you are the rightful owner of food-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Food MCP Server is a FastAPI-based server that provides endpoints for meal-related data using TheMealDB API.

Food MCP Server

Contributors

Overview

A FastAPI-based MCP server that exposes endpoints for searching meals, fetching meal details, categories, regional dishes and nutritional information. It combines recipe data from TheMealDB with comprehensive nutritional information from the USDA Food Data Central database, allowing you to explore dishes while understanding their nutritional content. Built using Python and other open source technologies.

Prerequisite Software

SoftwareVersion
Git2.20.1+
Python3.11+

Getting Started

  1. Clone the repository:
git clone git@github.com:salindersidhu/food-mcp-server.git
cd food-mcp-server
  1. (Recommended) Use uv for environment and dependency management:
pip install uv  # Only needed once, if you don't have uv already
uv venv         # Creates a .venv and installs dependencies
uv pip install -e .  # Installs your package in editable mode
  1. Set up your environment variables:

    • Sign up for a free USDA Food Data Central API key at https://fdc.nal.usda.gov/api-key-signup.html
    • Copy the example environment file:
      cp .env.example .env
      
    • Edit the .env file and replace your_api_key_here with your actual USDA API key
  2. (Optional) Add to Claude Desktop as a tool:

    • Run the following command to register this server as a tool in Claude Desktop:

      uv run mcp install main.py
      

Running

To start the MCP server locally:

mcp run main.py

Production

  1. Merge your changes into the main branch.
  2. Deploy using your preferred Python hosting or container solution.

Project Structure

.
ā”œā”€ā”€ main.py              # MCP server entry point
ā”œā”€ā”€ pyproject.toml       # Project metadata and dependencies
ā”œā”€ā”€ LICENSE              # License file
ā”œā”€ā”€ README.md            # This file
└── ...

License

This project is licensed under the Apache License 2.0.