- Home
- MCP servers
- NutriAI
NutriAI
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
NutriAI exposes a dedicated MCP server that lets ChatGPT call a nutrition analysis tool by describing foods in natural language. It orchestrates a description->OpenAI query->nutritional estimates flow, so you can get calories, macros, and simple insights directly from chat.
How to use
You connect NutriAI as an MCP server in the ChatGPT environment, then ask it to analyze foods described in text. Use simple prompts like those shown in the integration notes, for example: “Analise uma banana prata de 86g”, “Quantas calorias tem uma tapioca com queijo?”, or “Me dê informações nutricionais de um pão francês com manteiga”.
How to install
Prerequisites: you need Node.js for the frontend and Python for the MCP server.
# 1) Clone the project
git clone https://github.com/frotoadriano/NutriAI.git
cd NutriAI
# 2) Backend (MCP Server in Python)
cd mcp-server
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Create a .env with: OPENAI_API_KEY=seu_token_aqui
uvicorn main:app --reload
# 3) Frontend (React App)
cd app-ui
npm install
npm run dev
Security and deployment
Protections and monitoring are in place to keep usage steady and safe. The server uses rate limiting, restricted CORS, optional API keys, and cost monitoring. A health check endpoint is available at /health, and you can configure environment variables on your hosting platform to manage keys and origins.
# Example environment variables for Render (modify with your keys)
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
API_KEYS=KEY1,KEY2 # optional but recommended
ALLOWED_ORIGINS=https://chat.openai.com,https://chatgpt.com
Notes on running and testing
The MCP server is designed to process a food description, forward it to the OpenAI API, and return a nutritional estimate with simple insights. The frontend presents results in a clean format suitable for ChatGPT Apps SDK users.
Health checks are available and the system tracks per-request cost to help you monitor usage.
Available tools
analyze_food
Exposes the MCP tool analyze_food that processes a food description and returns a nutritional estimate with calories, macros, and simple insights.