Daily Calorie Tracker MCP Server

Daily Calorie Tracker MCP Server

Enables users to track daily calorie consumption by logging meals through natural language and searching a comprehensive food database. It provides daily summaries, weekly reports, and persistent SQLite storage to monitor dietary trends and goals.

Category
访问服务器

README

Daily Calorie Tracker MCP Server

A Model Context Protocol (MCP) server for tracking daily calorie consumption through natural language interactions.

Features

  • Natural Language Meal Entry: Log meals using descriptions like "chicken salad and a glass of milk"
  • Daily Summaries: Get total calorie intake with meal breakdowns
  • Weekly Reports: View average consumption, trends, and achievement tracking
  • Food Search: Look up calorie information for specific foods
  • Persistent Storage: SQLite database for cross-session data retention

Installation

Via npm (Recommended)

npm install -g daily-calorie-tracker-mcp

From Source

  1. Clone this repository
  2. Install dependencies:
    npm install
    
  3. Build the project:
    npm run build
    

MCP Server Configuration

For Claude Desktop

Add to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

NPM Installation Configuration:

{
  "mcpServers": {
    "daily-calorie-tracker": {
      "command": "npx",
      "args": ["-y", "daily-calorie-tracker-mcp"]
    }
  }
}

Local Installation Configuration:

{
  "mcpServers": {
    "daily-calorie-tracker": {
      "command": "node",
      "args": ["/path/to/daily-calorie-tracker/dist/index.js"]
    }
  }
}

For Cursor

Add to your Cursor settings (~/.cursor/settings.json):

{
  "mcpServers": {
    "daily-calorie-tracker": {
      "command": "npx",
      "args": ["-y", "daily-calorie-tracker-mcp"]
    }
  }
}

For Continue.dev

Add to your Continue configuration (~/.continue/config.json):

{
  "models": [
    {
      "model": "claude-3-5-sonnet-latest",
      "provider": "anthropic",
      "mcpServers": [
        {
          "name": "daily-calorie-tracker",
          "command": "npx",
          "args": ["-y", "daily-calorie-tracker-mcp"]
        }
      ]
    }
  ]
}

Available MCP Tools

The server provides the following tools:

add_meal

Log a meal with natural language description.

Parameters:

  • description (string, required): Natural language description of the meal (e.g., "chicken salad and a glass of milk")
  • mealType (string, required): Type of meal - "breakfast", "lunch", "dinner", or "snack"

Example:

Add breakfast: oatmeal with banana and coffee

get_daily_summary

Get today's calorie intake summary with meal breakdown.

Parameters:

  • date (string, optional): Date in YYYY-MM-DD format (defaults to today)

Example:

Show today's calorie summary

get_weekly_report

Generate a weekly calorie consumption report with statistics.

Parameters:

  • startDate (string, optional): Start date in YYYY-MM-DD format (defaults to 7 days ago)

Example:

Generate weekly report

search_food

Search for calorie information of specific foods.

Parameters:

  • foodName (string, required): Name of the food to search

Example:

Search calories for pizza

Usage Examples

Once configured, you can use natural language to track your calories:

  • "Log breakfast: oatmeal with banana and coffee"
  • "Add lunch: grilled chicken salad and apple juice"
  • "Record dinner: pasta with tomato sauce and a glass of wine"
  • "I had a snack: apple and yogurt"
  • "Show today's calorie summary"
  • "What did I eat today?"
  • "Generate weekly report"
  • "Show my calorie trends for this week"
  • "Search calories for pizza"
  • "How many calories in chicken breast?"

Data Storage

Data is stored in SQLite database at:

  • MacOS/Linux: ~/.daily-calorie-tracker/calories.db
  • Windows: %USERPROFILE%\.daily-calorie-tracker\calories.db

Food Database

The server includes a comprehensive food database with 100+ common foods organized by categories:

  • Proteins (chicken, beef, fish, eggs, tofu, etc.)
  • Carbohydrates (rice, pasta, bread, potatoes, etc.)
  • Vegetables (broccoli, spinach, tomatoes, etc.)
  • Fruits (apples, bananas, berries, etc.)
  • Beverages (milk, juice, coffee, tea, etc.)
  • Dairy products (cheese, yogurt, butter, etc.)
  • Common meals (hamburger, pizza, sandwiches, etc.)
  • Snacks (chips, nuts, chocolate, etc.)

Development

  • npm run dev - Run in development mode
  • npm run build - Build for production
  • npm start - Run production build

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Repository

GitHub: https://github.com/VeriTeknik/daily-calorie-tracker

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选