Skip to content

Repository files navigation

CICO: Nutrition Tracking MCP Server with Claude Desktop and Google Sheets

Calories In; Calories Out: A simple meal tracking MCP server for Claude Desktop that logs meals with nutrition data to Google Sheets.

Features

  • Log meals with calories and optional macros (protein, carbs, fat)
  • Retrieve meals with flexible filtering by date range and meal type
  • Classify meals as breakfast, lunch, dinner, supper, or snack
  • Data stored in Google Sheets for easy viewing and analysis
  • Built with FastMCP for minimal code

Setup

1. Install dependencies

uv venv
source .venv/bin/activate  # On Windows use `venv\Scripts\activate`
uv sync

2. Set up Google Sheets API

  1. Go to Google Cloud Console
  2. Create a new project
  3. Enable Google Sheets API
  4. Create a service account and download the credentials JSON
  5. Create a Google Sheet and share it with the service account email

3. Configure environment

cp .env.example .env
# Edit .env with your spreadsheet ID

4. Add to Claude Desktop config

{
  "mcpServers": {
    "cico": {
      "command": "uv",
      "args": ["run", "python", "cico_server.py"],
      "cwd": "/path/to/cico-mcp-server"
    }
  }
}

Usage

Logging Meals

Ask Claude to log your meals:

  • "I just had breakfast: 2 eggs and toast, about 320 calories"
  • "Log my lunch: chicken salad, 450 calories, 30g protein"
  • "Had a snack - apple with peanut butter"

Retrieving Meals

Ask Claude to show your meal history:

  • "Show me all my meals from this week"
  • "What did I eat yesterday?"
  • "Show me all my breakfast meals from the last 7 days"
  • "Get my meals from 1 Jan 2025 to now"
  • "Show me all the snacks I've eaten"

Your meals will appear in the Google Sheet with timestamp, meal type, description, and nutrition data.

Sheet Structure

The Google Sheet stores meal data with the following columns:

Timestamp Meal Type Description Calories Protein Carbs Fat Details Price
2025-01-07T08:30:15 Breakfast 2 eggs with toast 320 18 30 14 Scrambled eggs with whole wheat toast $4.50

Available Functions

log_meal

Log a new meal with nutrition information:

  • description: Brief name of the meal
  • details: Detailed ingredients and preparation info
  • calories: Total calories (required)
  • meal_type: breakfast, lunch, dinner, supper, or snack
  • protein/carbs/fat: Optional macronutrients in grams
  • price: Optional price with currency symbol
  • timestamp: Optional timestamp for retroactive logging

get_meals

Retrieve meals with optional filtering:

  • start_date: Filter meals from this date onwards (YYYY-MM-DD)
  • end_date: Filter meals up to this date (YYYY-MM-DD)
  • meal_type: Filter by specific meal type

About

Calories in, calories out: An MCP server with a suite of helper functions that enable meal and nutrition tracking with Claude Desktop and Google Sheets.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages