FatSecret MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
FatSecret MCP Server
Model Context Protocol (MCP) server for the FatSecret Platform API. Search foods, read and manage your personal nutrition diary, saved meals, exercise, weight, favorites, recipes, and monthly summaries — all from any MCP-compatible client (ChatGPT Web, Claude Desktop, custom agents).
Features
Category | Tools |
Food search |
|
Diary (read) |
|
Diary (write) |
|
Diary (bulk) |
|
Saved meals |
|
Frequent/Recent foods |
|
Favorites |
|
Recipes |
|
Exercise |
|
Weight |
|
Monthly summaries |
|
Account |
|
Auth/Health |
|
39 tools total. Every mutating tool requires explicit user confirmation. Read-only tools work immediately.
Related MCP server: mcp-server-fatsecret
Quick Start
Prerequisites
FatSecret Platform account with Consumer Key and Consumer Secret from FatSecret Platform
Docker (recommended) or Python 3.11+
1. Configure credentials
cp .env.example .env
# Edit .env with your keysRequired variables:
FATSECRET_CONSUMER_KEY=your_consumer_key
FATSECRET_CONSUMER_SECRET=your_consumer_secret
MCP_AUTH_PASSWORD=your_strong_connection_password # protects OAuth reconnect endpointOptional:
MCP_PUBLIC_URL=https://your-domain.com # for OAuth callbacks
FATSECRET_REGION=ES
FATSECRET_LANGUAGE=es2. Run with Docker (recommended)
docker compose up -d --buildServer listens on http://0.0.0.0:8000 with MCP endpoint at /mcp.
3. Authorize your personal FatSecret account
Open in browser:
https://your-domain.com/fatsecret/reconnectEnter MCP_AUTH_PASSWORD, click Continue to FatSecret, log in and click Authorize. Done — your personal diary is now linked.
4. Connect from ChatGPT Web
Settings → Connectors → Add connector
Name:
FatSecretDescription:
Search foods and manage my personal FatSecret nutrition diaryServer URL:
https://your-domain.com/mcpAuthentication:
OAuth→ check "I understand and want to continue"Save
When prompted for the connection password, enter your MCP_AUTH_PASSWORD.
5. Connect from Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"fatsecret": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_AUTH_PASSWORD", "ghcr.io/yourname/fatsecret-mcp:latest"],
"env": {
"MCP_AUTH_PASSWORD": "your_password"
}
}
}
}Restart Claude Desktop.
Tool Examples
# Search foods (ES/es catalog by default)
await search_foods("pollo a la plancha", max_results=5)
# Get servings for a food_id
await get_food_servings("123456")
# List last 3 months of diary entries (default range)
await diary_entries_list()
# Custom date range
await diary_entries_list("2024-07-01", "2024-09-30")
# Add entry (after user confirms food, serving, quantity, meal, date)
await add_food_entry("123456", "Pollo a la plancha", "789", 1.5, "dinner", "2024-10-05")
# Copy today's lunch to tomorrow
await copy_food_diary("2024-10-05", "2024-10-06", "lunch")
# Get most-eaten foods at breakfast
await get_most_eaten("breakfast")
# Create a saved meal
await create_saved_meal_tool("Mi desayuno habitual", "breakfast,lunch", "Tostada + café + fruta")
# Add weight entry
await update_weight_entry(72.5, "2024-10-05", goal_weight_kg=70, current_height_cm=175)
# List exercise catalog
await list_exercises()Architecture
Transport: MCP Streamable HTTP (
/mcp), stateless, JSON responsesAuth: OAuth 2.1 server-side (protects MCP endpoints) + OAuth 1.0 3-legged to FatSecret Platform
OAuth flow: HTTPS
/fatsecret/reconnect→ FatSecret authorization →/fatsecret/callbackstores access token in Docker volumeData: no persistent storage except OAuth tokens; all calls hit FatSecret API live
Rate limits: respects FatSecret limits with exponential backoff +
Retry-AfterRegion/Language: configurable via
FATSECRET_REGION,FATSECRET_LANGUAGE(default ES/es)
Deployment
Generic Docker Compose (no hardcoded domains)
# docker-compose.yml
services:
fatsecret-mcp:
build: .
container_name: fatsecret-mcp
restart: unless-stopped
env_file:
- .env
environment:
MCP_HOST: 0.0.0.0
MCP_PORT: "8000"
ports:
- "8000:8000"
volumes:
- fatsecret-data:/app/data
volumes:
fatsecret-data:Put behind any reverse proxy (Traefik, Nginx, Caddy) for HTTPS. Set MCP_PUBLIC_URL to your public URL for OAuth callbacks.
Environment Variables
Variable | Required | Default | Description |
| ✅ | — | FatSecret Platform consumer key |
| ✅ | — | FatSecret Platform consumer secret |
| ✅ | — | Protects |
| For OAuth |
| Public HTTPS URL for callbacks |
| No |
| Bind address |
| No |
| Port |
| No |
| Catalog region |
| No |
| Catalog language |
Development
# Install with dev dependencies
pip install -e .[dev]
# Run tests
pytest -v
# Lint
ruff check src tests
# Type check
mypy src
# Run server locally
python -m fatsecret_mcp.serverData Handling & FatSecret Terms
No local caching of food/diary data beyond request lifetime
OAuth tokens stored in Docker volume (
fatsecret-data) for session persistenceUser data never leaves your infrastructure except to FatSecret API
Respects FatSecret Platform Terms: no bulk export, no redistribution, no medical advice
Delete tokens:
docker volume rm fatsecret-dataor use/fatsecret/reconnectto refresh
Contributing
See CONTRIBUTING.md.
Changelog
See CHANGELOG.md.
License
MIT — see LICENSE.
Disclaimer
This is an independent integration. Not affiliated with FatSecret. API-created entries are verified only in FatSecret Platform API; consumer web/mobile app visibility depends on FatSecret's synchronization (not guaranteed).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Discover, plan and run tools across your connected business systems through one OAuth MCP endpoint
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
Unofficial Edamam MCP — wraps three Edamam APIs in one pack: - Nutrition Analysis API…
MCP server exposing supplements database used by iNutriPlan.com
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for managing food diary, nutrition tracking, meal planning, and weight logging via the FatSecret Platform API.15MIT
- AlicenseBqualityCmaintenanceEnables searching FatSecret's food and recipe database, and managing personal food diary, weight, exercise, saved meals, and favorites, with multi-user support and secure OAuth authentication.28Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server for FatSecret that enables searching foods/recipes and managing personal food diary, weight, and exercise logs via natural language.113 npmMIT
- AlicenseAqualityBmaintenanceEnables interaction with the FatSecret Platform API and member recipe/RDI workflows, including food data, diaries, and recipe operations through profile-based tool exposure.10MIT