Skip to main content
Glama

Healthy Pokes

by mattattacks

Healthy Pokes

A calorie tracking MCP (Model Context Protocol) server that integrates meal logging with nutrition data and health metrics.

Features

  • 📸 Process food photos and text descriptions using GPT-4o Vision
  • 🥗 Automatic nutrition estimation via OpenNutrition MCP
  • 📊 Google Sheets integration for personalized tracking
  • 🏃 Apple Health integration for activity and weight data
  • 📱 SMS interface via Poke platform

Architecture

This MCP server acts as a bridge between multiple services:

  1. OpenAI GPT-4o: Extracts food items from photos/text
  2. OpenNutrition MCP: Provides nutrition data
  3. Google Sheets: Stores user data persistently
  4. Apple Health MCP: Retrieves fitness metrics
  5. Poke Platform: Handles messaging interface

Setup

Prerequisites

  • Python 3.9+
  • Google Cloud Project with Sheets & Drive APIs enabled
  • OpenAI API key
  • Poke API key

Installation

# Clone the repository git clone https://github.com/mattattacks/healthy-pokes.git cd healthy-pokes # Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Set up environment variables cp .env.example .env # Edit .env with your API keys

Environment Variables

Create a .env file with:

OPENAI_API_KEY=your_openai_key POKE_API_KEY=your_poke_key GOOGLE_SERVICE_ACCOUNT_JSON={"type":"service_account"...} HEALTH_DATA_DIR=/path/to/health/exports # Optional

Usage

Running Locally

python server.py

The MCP server will be available at http://localhost:8000/mcp

Deploying to Render

This project includes a render.yaml for easy deployment to Render.

MCP Tools

  • connect_user(email) - Set up Google Sheet for user
  • ingest_image(image_url) - Process food photo
  • parse_text(text) - Process text description
  • estimate_from_items(items) - Get nutrition data
  • log_rows(rows) - Save to Google Sheet
  • today_total() - Calculate daily intake
  • health_summary() - Get Apple Health metrics
  • send_message(text) - Reply via Poke

Development

Project Structure

healthy-pokes/ ├── server.py # Main MCP server ├── tools/ # MCP tool implementations │ ├── __init__.py │ ├── google_sheets.py │ ├── nutrition.py │ ├── vision.py │ └── messaging.py ├── utils/ # Helper functions ├── requirements.txt # Python dependencies ├── render.yaml # Render deployment config └── .env.example # Environment template

Testing

pytest tests/

Contributing

Pull requests are welcome! Please ensure all tests pass and follow the existing code style.

License

MIT

Acknowledgments

Built for the HackMIT Poke Challenge

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A calorie tracking MCP server that processes food photos and text descriptions to automatically log nutrition data to Google Sheets. Integrates with Apple Health for fitness metrics and provides SMS interface for convenient meal logging.

  1. Features
    1. Architecture
      1. Setup
        1. Prerequisites
        2. Installation
        3. Environment Variables
      2. Usage
        1. Running Locally
        2. Deploying to Render
      3. MCP Tools
        1. Development
          1. Project Structure
        2. Testing
          1. Contributing
            1. License
              1. Acknowledgments

                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/mattattacks/healthy-pokes'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server