FF

fcoury/fatsecret-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

10 stars 16 forks Качество 65 Тренд 8MIT

🍽️ MCP server to access to the FatSecret API.

Обзор

A Model Context Protocol (MCP) server that provides access to the FatSecret nutrition database API with full 3-Legged OAuth authentication support. - : Full 3-legged OAuth flow for user authentication - : Search and retrieve detailed nutrition information - : Search for recipes and get detailed cooking instructions - : Access user food diaries and add food entries - : Encrypted storage of API credentials and tokens - Node.js (v14 or higher) - npm or yarn - A FatSecret developer account 1. Visit the FatSecret Platform 2. Create a developer account and register your application 3. Note down your and The server needs to be configured in your MCP client (like Claude Desktop). Add this to your MCP configuration: The easiest way to authenticate is using the included OAuth console utility: This interactive utility will: 1. Ask for your Client ID and Client Secret 2. Save them securely in ~/.fatsecret-mcp-config.json 3.

README

Показан фрагмент оригинального README. Открыть оригинал.

FatSecret MCP Server

A Model Context Protocol (MCP) server that provides access to the FatSecret nutrition database API with full 3-Legged OAuth authentication support.

Features

  • Complete OAuth 1.0a Implementation: Full 3-legged OAuth flow for user authentication
  • Food Database Access: Search and retrieve detailed nutrition information
  • Recipe Database: Search for recipes and get detailed cooking instructions
  • User Data Management: Access user food diaries and add food entries
  • Secure Credential Storage: Encrypted storage of API credentials and tokens

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • A FatSecret developer account

Installation

# Clone the repository
git clone https://github.com/your-username/fatsecret-mcp.git
cd fatsecret-mcp

# Install dependencies
npm install

# Build the TypeScript
npm run build

Setup

1. Get FatSecret API Credentials

  1. Visit the FatSecret Platform
  2. Create a developer account and register your application
  3. Note down your Client ID and Client Secret

2. Configure the MCP Server

The server needs to be configured in your MCP client (like Claude Desktop). Add this to your MCP configuration:

{
  "mcpServers": {
    "fatsecret": {
      "command": "node",
      "args": ["path/to/fatsecret-mcp-server/dist/index.js"]
    }
  }
}

3. Authentication Process

The easiest way to authenticate is using the included OAuth console utility:

# Make sure you've built the project first
npm run build

# Run the OAuth console utility
node dist/cli.js

This interactive utility will:

  1. Ask for your Client ID and Client Secret
  2. Save them securely in ~/.fatsecret-mcp-config.json
  3. Guide you through the OAuth flow:
    • Opens your browser to the FatSecret authorization page
    • Prompts you to paste the verifier code after authorization
    • Saves the access tokens for future use

Option 2: Manual Authentication via MCP Tools

If you prefer to authenticate through the MCP interface (e.g., in Claude):

  1. Set your API credentials:

    Use tool: set_credentials
    Parameters:
    - clientId: "your_client_id_here"
    - clientSecret: "your_client_secret_here"
    
  2. Start the OAuth flow:

    Use tool: start_oauth_flow
    Parameters:
    - callbackUrl: "oob" (for out-of-band authentication)
    
  3. Visit the authorization URL provided in the response:

    • Log in to your FatSecret account (or create one)
    • Click “Allow” to authorize the application
    • Copy the verifier code shown on the page
  4. Complete the OAuth flow:

    Use tool: complete_oauth_flow
    Parameters:
    - requestToken: [from step 2 response]
    - requestTokenSecret: [from step 2 response]
    - verifier: [the code you copied from the authorization page]
    
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "fatsecret": { "command": "node", "args": ["path/to/fatsecret-mcp-server/dist/index.js"] } } }