fatsecret-mcp-server
This server integrates with the FatSecret Platform API to enable comprehensive nutrition tracking, food diary management, meal planning, and weight logging.
Food Search & Nutrition Lookup: Search the FatSecret food database by name and retrieve detailed nutrition info (macros, micronutrients, serving sizes) for any food item.
Food Diary Management: Log, edit, and delete food entries for a specific date and meal type (breakfast, lunch, dinner, other). View all entries for a date with full nutrition breakdown, or get a monthly summary of daily calorie/macro totals.
Saved Meal Templates: Create reusable meal templates, add foods to them, list all templates, and copy a saved meal directly into your diary for a specific date and meal slot.
Weight Tracking: Log weight measurements (with optional notes) for specific dates and view monthly weight history to track trends.
Convenience Tools: View recently eaten foods for quick re-logging, and copy all food entries from one date to another to easily repeat a day's meals.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fatsecret-mcp-serverlog 200g chicken breast for lunch"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FatSecret MCP Server
MCP server for managing your food diary, nutrition tracking, meal planning, and weight logging via the FatSecret Platform API.
Tools Available
Tool | Description |
| Search food database by name |
| Get full nutrition details for a food |
| Log food to diary |
| Edit existing diary entry |
| Delete diary entry |
| Get all entries for a date |
| Monthly diary summary |
| Create reusable meal template |
| Add food to a saved meal |
| List saved meal templates |
| Paste saved meal into diary |
| Log weight for a date |
| Monthly weight history |
| Recently logged foods |
| Copy all entries between dates |
Related MCP server: foodvisor-mcp
Setup
1. Register for FatSecret API
Create a developer account
Note your IP address and add it to the IP whitelist on the developer dashboard (required for OAuth 2.0 — can take up to 24h to propagate)
2. Get API Credentials
FatSecret uses separate credentials for OAuth 1.0a and OAuth 2.0:
On your developer dashboard, you'll find two credential sections:
Section | Key | Secret | Used for |
REST API OAuth 1.0 Credentials | Consumer Key | Consumer Secret | Food diary, weight, saved meals (user-level access) |
OAuth 2.0 Credentials | Client ID | Client Secret | Food search, food details (app-level access) |
The Consumer Key and Client ID are the same value. The secrets are different — this is a common source of confusion.
3. Get User OAuth Tokens (3-legged OAuth 1.0a)
For diary and weight tools, you need user-level access tokens. Run the included setup script:
FATSECRET_CLIENT_ID=your_consumer_key \
FATSECRET_CLIENT_SECRET=your_consumer_secret \
node scripts/oauth-setup.jsThis will:
Start a local web server at
http://localhost:9876Open your browser to authorize with FatSecret
Complete the OAuth 1.0a 3-legged flow
Display your
FATSECRET_ACCESS_TOKENandFATSECRET_ACCESS_TOKEN_SECRET
Note: The OAuth flow uses authentication.fatsecret.com (not www.fatsecret.com). You must log in with a FatSecret user account (the same one you use in the FatSecret mobile app), not your developer account.
4. Environment Variables
# Required — same value, shown as "Consumer Key" / "Client ID"
export FATSECRET_CLIENT_ID="your_consumer_key"
# OAuth 1.0a Consumer Secret (from "REST API OAuth 1.0 Credentials")
# Used for: diary, weight, saved meals, recently eaten
export FATSECRET_CONSUMER_SECRET="your_consumer_secret"
# OAuth 2.0 Client Secret (from "OAuth 2.0 Credentials")
# Used for: food search, food details
export FATSECRET_OAUTH2_CLIENT_SECRET="your_oauth2_client_secret"
# User tokens from the 3-legged OAuth flow (step 3)
export FATSECRET_ACCESS_TOKEN="your_access_token"
export FATSECRET_ACCESS_TOKEN_SECRET="your_access_token_secret"Legacy fallback: If you set FATSECRET_CLIENT_SECRET instead of the two separate secrets, it will be used for both OAuth flows. This only works if your Consumer Secret and Client Secret happen to be the same value (they aren't on most accounts).
5. Build & Run
npm install
npm run build
npm start6. Configure in Claude Desktop
Add to your Claude Desktop MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"fatsecret": {
"command": "node",
"args": ["/path/to/fatsecret-mcp-server/dist/index.js"],
"env": {
"FATSECRET_CLIENT_ID": "your_consumer_key",
"FATSECRET_CONSUMER_SECRET": "your_oauth1_consumer_secret",
"FATSECRET_OAUTH2_CLIENT_SECRET": "your_oauth2_client_secret",
"FATSECRET_ACCESS_TOKEN": "your_access_token",
"FATSECRET_ACCESS_TOKEN_SECRET": "your_access_token_secret"
}
}
}
}Option B: Directly from GitHub (no local clone)
{
"mcpServers": {
"fatsecret": {
"command": "npx",
"args": ["-y", "github:Yurzs/fatsecret-mcp-server"],
"env": {
"FATSECRET_CLIENT_ID": "your_consumer_key",
"FATSECRET_CONSUMER_SECRET": "your_oauth1_consumer_secret",
"FATSECRET_OAUTH2_CLIENT_SECRET": "your_oauth2_client_secret",
"FATSECRET_ACCESS_TOKEN": "your_access_token",
"FATSECRET_ACCESS_TOKEN_SECRET": "your_access_token_secret"
}
}
}
}This downloads and runs the server directly from the repo — no git clone, npm install, or npm run build needed. npx caches it locally after the first run.
Note: If you've used this before and need to pull updates, clear the npx cache first:
rm -rf ~/.npm/_npxGetting user tokens without cloning
You can run the OAuth setup script directly too:
npx -y github:Yurzs/fatsecret-mcp-server/scripts/oauth-setup.jsOr with a one-liner using curl:
curl -sL https://raw.githubusercontent.com/Yurzs/fatsecret-mcp-server/master/scripts/oauth-setup.js | \
FATSECRET_CLIENT_ID=your_key FATSECRET_CLIENT_SECRET=your_consumer_secret node -This starts a local server at http://localhost:9876, opens your browser, and walks you through the FatSecret authorization. The tokens are printed to the terminal when complete.
Typical Workflow
Search for a food:
fatsecret_search_food("chicken breast")Get details to find serving_id:
fatsecret_get_food(food_id)Log it:
fatsecret_create_food_entry(food_id, "Chicken Breast", serving_id, 2.5, "lunch")Review day:
fatsecret_get_food_entries("2026-05-16")Track weight:
fatsecret_update_weight(77.5, "2026-05-16")
Troubleshooting
"Invalid IP address detected" — Add your public IP to the whitelist at https://platform.fatsecret.com. Propagation can take minutes to hours.
"Invalid signature" on OAuth 1.0a requests — You're likely using the OAuth 2.0 Client Secret instead of the OAuth 1.0a Consumer Secret. These are different values on most accounts. Check the "REST API OAuth 1.0 Credentials" section on your dashboard.
OAuth setup can't log in — The authorization page at authentication.fatsecret.com requires a FatSecret user account (the mobile app account), not your developer account. If you signed up via Apple/Google, do a password reset to set a native password.
API Tier
The free Basic tier (5,000 calls/day) is sufficient for personal use. Apply for Premier Free if you want barcode scanning and autocomplete.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Yurzs/fatsecret-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server