Skip to content

Connect a calorie MCP server

A calorie MCP looks up calories and macros in Claude Code or Cursor with an X-API-Key header. Browser sign-in for Claude.ai, Claude Desktop, and Claude mobile is off until OAuth is enabled. Personal use is $29 a month or $228 a year.

Connect a calorie MCP server

Browser sign-in for Claude.ai, Claude Desktop, and Claude mobile is off until the API enables OAuth. Do not add this server in those apps and expect a login. Use Claude Code or Cursor with the header below.

Claude Code

Terminal
claude mcp add --transport http calorie-api https://calorieapiadmin.com/mcp/ --header "X-API-Key: YOUR_KEY"

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "calorie-api": {
      "url": "https://calorieapiadmin.com/mcp/",
      "headers": {
        "X-API-Key": "YOUR_KEY"
      }
    }
  }
}

Other header-capable clients

Connection
URL: https://calorieapiadmin.com/mcp/
Transport: HTTP (streamable)
Header: X-API-Key: YOUR_KEY
Use this for clients that can set a header. Browser sign-in for Claude apps stays off until the API enables OAuth.

Authentication

Claude Code and Cursor send X-API-Key on every request. The key must belong to the MCP plan. Keys from Free, Basic, Core, Plus, or Custom are refused. REST search, foods, calc, and vision return 403. Account and billing routes still work.

  • Create the key in Dashboard, on the MCP tab. The full value is shown once, at creation.
  • Do not put the key in a public repo, a screenshot, or an email.
  • This plan cannot call REST search, foods, calc, or vision. Those routes return 403.
  • Account, billing, and auth routes still work.

Tools

Tool schemas

search_foods(query, limit (1-25), verified_only)Search the catalog by name and return calories and macros per 100 g, plus a food_id.
get_food_nutrition(food_id)Full nutrient list for one food_id from search_foods.
suggest_foods(query)Short autocomplete suggestions for a partial food name.
lookup_barcode(upc (8-14 digits))UPC or EAN digits to macros per 100 g. Open Food Facts is the fallback when the catalog misses.
calculate_portion(food_id, grams)Scale one food_id to a gram weight.
calculate_recipe(ingredients[{food_id, grams}], servings)Totals and per-serving macros for up to 40 ingredients.
calculate_macro_targets(age, gender, weight_kg, height_cm, activity, goal)Daily calorie and macro targets from age, sex, weight, height, activity, and goal.
analyze_food_photo(image_base64, content_type)Estimate foods in a JPEG, PNG, or WebP. Pass image_base64 yourself.

search_foods returns food_id values. calculate_portion, calculate_recipe, and get_food_nutrition need those ids. Do not invent a food_id.

Limits and errors

Paid plan

Rate20 calls per minute, shared with any REST calls on the same account
Quota10,000 successful MCP calls per month
Results25 foods per search
Distinct foods2% of the catalog per month
Photos150 per month and 20 per day

Trial

Length7 days, card required
Rate5 calls per minute
Quota200 calls total, not reset on the 1st
Results10 foods per search
Photos10 calls total

Error cases

AuthNo key, invalid key, or a plan without mcp_access
PlanCommercial header, or REST routes on an MCP-only key (HTTP 403)
LimitRate, quota, distinct-food cap, or photo cap
UnavailableThe tool could not complete. Retry later. The message does not include a stack trace.

Photos

analyze_food_photo requires image_base64 as raw base64, without a data: prefix. JPEG, PNG, or WebP. Maximum decoded size is 2 MB. Clients do not attach images automatically. Passing a URL is not enabled.

Troubleshooting

  • Browser sign-in is off. Use Claude Code or Cursor with X-API-Key. Do not wait for a login screen in Claude.ai, Claude Desktop, or Claude mobile.
  • 403 on /api/v1/search: expected. This plan is MCP only. Use the tools, or buy a REST plan.
  • The model names a food but never calls search_foods: the food_id it invents will fail. Ask it to search first.
  • A photo call returns a size error: compress below 2 MB and send raw base64.

Frequently asked questions

Which clients can connect to a nutrition MCP server?

Claude Code and Cursor send an X-API-Key header. Browser sign-in for Claude.ai, Claude Desktop, and Claude mobile stays off until the API enables OAuth. The account must be on the MCP plan.

Does the nutrition MCP plan include the REST API?

No. MCP tools only. REST search, foods, calc, and vision return 403. Billing and account pages still work.

What are the nutrition MCP server trial limits?

7 days, card required. Trial: 5/min, 200 calls total, 10 results, 10 photos. Paid: 20/min, 10,000/month, 25 results, 150 photos/month, 20 photos/day.

Can I use a nutrition MCP server in a commercial app?

No. Personal use only. A commercial header is rejected. Apps that resell the data need a REST plan and a commercial license.

How do I estimate calories from a food photo?

Pass image_base64 yourself. JPEG, PNG, or WebP, up to 2 MB, no data: prefix. Pasting a picture into the chat does not attach the file.

Will I be charged when the nutrition MCP trial ends?

Yes, unless you cancel before the trial ends. Cancel from the billing page.