Skip to content
MCP server

FatSecret

MCP server connecting AI assistants to the FatSecret food, diary and weight API

Runs locally

FatSecret is an open-source MCP server for health and science. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, API, macOS
Runs
Locally
What it can do
Can change data (2 tools)
Access
Needs a secret key or token
Version
0.2.0

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add fatsecret-mcp-go --env FATSECRET_CLIENT_ID='<FATSECRET_CLIENT_ID>' --env FATSECRET_CLIENT_SECRET='<FATSECRET_CLIENT_SECRET>' --env FATSECRET_CONSUMER_SECRET='<FATSECRET_CONSUMER_SECRET>' -- docker run -i --rm -e FATSECRET_CLIENT_ID -e FATSECRET_CLIENT_SECRET -e FATSECRET_CONSUMER_SECRET ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "fatsecret-mcp-go": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "FATSECRET_CLIENT_ID",
        "-e",
        "FATSECRET_CLIENT_SECRET",
        "-e",
        "FATSECRET_CONSUMER_SECRET",
        "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
      ],
      "env": {
        "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
        "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
        "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "fatsecret-mcp-go": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "FATSECRET_CLIENT_ID",
        "-e",
        "FATSECRET_CLIENT_SECRET",
        "-e",
        "FATSECRET_CONSUMER_SECRET",
        "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
      ],
      "env": {
        "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
        "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
        "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "fatsecret-mcp-go": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "FATSECRET_CLIENT_ID",
        "-e",
        "FATSECRET_CLIENT_SECRET",
        "-e",
        "FATSECRET_CONSUMER_SECRET",
        "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
      ],
      "env": {
        "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
        "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
        "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "fatsecret-mcp-go": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "FATSECRET_CLIENT_ID",
        "-e",
        "FATSECRET_CLIENT_SECRET",
        "-e",
        "FATSECRET_CONSUMER_SECRET",
        "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
      ],
      "env": {
        "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
        "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
        "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add fatsecret-mcp-go --env FATSECRET_CLIENT_ID='<FATSECRET_CLIENT_ID>' --env FATSECRET_CLIENT_SECRET='<FATSECRET_CLIENT_SECRET>' --env FATSECRET_CONSUMER_SECRET='<FATSECRET_CONSUMER_SECRET>' -- docker run -i --rm -e FATSECRET_CLIENT_ID -e FATSECRET_CLIENT_SECRET -e FATSECRET_CONSUMER_SECRET ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.fatsecret-mcp-go]
command = "docker"
args = ["run", "-i", "--rm", "-e", "FATSECRET_CLIENT_ID", "-e", "FATSECRET_CLIENT_SECRET", "-e", "FATSECRET_CONSUMER_SECRET", "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"]
env = { FATSECRET_CLIENT_ID = "<FATSECRET_CLIENT_ID>", FATSECRET_CLIENT_SECRET = "<FATSECRET_CLIENT_SECRET>", FATSECRET_CONSUMER_SECRET = "<FATSECRET_CONSUMER_SECRET>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "fatsecret-mcp-go": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "FATSECRET_CLIENT_ID",
        "-e",
        "FATSECRET_CLIENT_SECRET",
        "-e",
        "FATSECRET_CONSUMER_SECRET",
        "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
      ],
      "env": {
        "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
        "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
        "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e FATSECRET_CLIENT_ID='<FATSECRET_CLIENT_ID>' -e FATSECRET_CLIENT_SECRET='<FATSECRET_CLIENT_SECRET>' -e FATSECRET_CONSUMER_SECRET='<FATSECRET_CONSUMER_SECRET>' fatsecret-mcp-go docker -- run -i --rm -e FATSECRET_CLIENT_ID -e FATSECRET_CLIENT_SECRET -e FATSECRET_CONSUMER_SECRET ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "fatsecret-mcp-go": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "FATSECRET_CLIENT_ID",
            "-e",
            "FATSECRET_CLIENT_SECRET",
            "-e",
            "FATSECRET_CONSUMER_SECRET",
            "ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0"
          ],
          "env": {
            "FATSECRET_CLIENT_ID": "<FATSECRET_CLIENT_ID>",
            "FATSECRET_CLIENT_SECRET": "<FATSECRET_CLIENT_SECRET>",
            "FATSECRET_CONSUMER_SECRET": "<FATSECRET_CONSUMER_SECRET>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • FATSECRET_CLIENT_IDFatSecret API client ID (platform.fatsecret.com → My Account → API Keys)Required
  • FATSECRET_CLIENT_SECRETFatSecret API client secretRequired
  • FATSECRET_CONSUMER_SECRETConsumer secret for the OAuth1 profile flow (usually same as client secret)

About FatSecret

Gives an AI assistant access to the FatSecret Platform API for nutrition work. Once connected, a client can search foods and barcodes, look up recipes, and read or write food diary, saved meal, weight and exercise entries for a signed-in account. The server is written in Go and ships as a single binary or Docker image, and it can run over stdio or Streamable HTTP.

Writes are staged first. A draft is created with a validated preview, and it only takes effect when confirmed. An environment flag can disable direct writes entirely. For households, one HTTP server can host several members, each authorizing their own FatSecret profile through a request header.

It suits people who track their diet with an AI client and want logging to go through a conversation, as well as developers who need a self-hosted FatSecret bridge. It is not an official FatSecret product, and it needs a free FatSecret developer key to function.

Tools this server provides (12)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 12 tools change data; 3 names don't say.

From the server's own tool labels and tool names; not verified by us.

search_foodsName suggests: reads
Search the food database
get_foodName suggests: reads
Get detailed nutrition info for a food
find_food_by_barcodeName suggests: reads
Find food by GTIN-13 barcode
search_recipesName suggests: reads
Search recipes with filters
get_recipeName suggests: reads
Get recipe details with ingredients and directions
log_meal
Log a whole meal in one call and get day totals
get_food_entriesName suggests: reads
Get food diary entries for a date
create_food_entryName suggests: changes
Add a food diary entry
update_weightName suggests: changes
Record weight for a date
get_weight_monthName suggests: reads
Get weight history for a month
prepare_call
Stage a write as a single-use draft
confirm_draft
Execute a draft staged by prepare_call

What it does

Food and barcode search
Finds foods by name or GTIN-13 barcode and returns nutrition details.
Diary and meal logging
Adds, edits, copies and deletes food diary entries, and logs whole meals in one call.
Weight and exercise tracking
Records weight history and manages exercise entries and templates.
Staged write confirmation
Previews changes as drafts that must be confirmed before they are saved.
Household profiles
Lets several people share one server, each with their own authorized account.
Stdio and HTTP transports
Runs locally for desktop clients or as a self-hosted remote endpoint.

Good for

  • Logging a meal by describing it to an AI assistant
  • Reviewing daily or monthly calorie and macro totals
  • Building saved meals and favorites for quick logging
  • Tracking weight trends alongside diary data
  • Looking up nutrition facts for a packaged food by barcode

Pricing

Open source

MIT-licensed and free to self-host; a FatSecret developer account is required.

FatSecret FAQ

Is this an official FatSecret server?

No. It is an independent project that uses the FatSecret Platform API, which requires a free developer account.

Do I need a paid FatSecret plan?

A free API key works. Some features, such as branded foods, text parsing and image recognition, need Premier or paid add-ons.

Can FatSecret change my diary without asking?

Writes are staged as drafts and only take effect after confirmation. An environment setting can block direct writes entirely.

Which clients can use FatSecret?

Any MCP-compatible client, including Claude Desktop, Claude Code, Cursor and OpenCode.

How do I add FatSecret to Claude Code?

Run this command in your terminal: claude mcp add fatsecret-mcp-go --env FATSECRET_CLIENT_ID='<FATSECRET_CLIENT_ID>' --env FATSECRET_CLIENT_SECRET='<FATSECRET_CLIENT_SECRET>' --env FATSECRET_CONSUMER_SECRET='<FATSECRET_CONSUMER_SECRET>' -- docker run -i --rm -e FATSECRET_CLIENT_ID -e FATSECRET_CLIENT_SECRET -e FATSECRET_CONSUMER_SECRET ghcr.io/kondratjev/fatsecret-mcp-go:0.2.0

What are the best alternatives to FatSecret?

The closest alternatives to FatSecret are Fatsecret MCP, Fatsecret MCP, MyFitnessPal MCP, BasalFit and Sphere.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers