chomptron

io.github.swantron由 GitHub 账号 swantron 发布v1.0.0更新于 Oct 24, 2026

Generate a recipe from ingredients on hand, with optional dietary restrictions. Free.

已验证Streamable HTTP可网页运行位置与生活AI 与机器学习

概览

AI 生成的概览

一个远程 MCP 服务器,可根据手头食材生成完整食谱,并可选 dietary 限制。

可以做什么
根据食材清单生成完整食谱:菜名、份量、准备与烹饪时间、带计量的食材表和分步做法,并可按纯素、无麸质、无坚果等饮食偏好筛选。
适用场景
适合想用厨房现有食材找做菜灵感,或需要一份符合饮食限制的结构化食谱,而不必另开烹饪网站时使用。
运行要求
通过 streamable HTTP 连接 chomptron.com 的远程端点;MCP 连接未声明需要账号、API 密钥或请求头。服务本身基于 Google Gemini 运行,并设有每日食谱上限。
安装前请注意
该端点无需认证且服务免费,因此每日用量有上限且为共享;你发送的食材文本会由托管服务及其 AI 提供商处理。生成的食谱可能不准确,过敏原与烹饪安全需自行核实。

安装

在 SourceWeft 中

  1. 打开 控制台中的 chomptron,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.swantron%2Fchomptron/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "chomptron": {
      "type": "http",
      "url": "https://chomptron.com/mcp"
    }
  }
}

README

Chomptron

[watchtron]

AI-powered recipe generator that transforms ingredients into delicious recipes using Google Gemini AI. Deployed on Google Cloud Run at chomptron.com.

What It Does

Enter ingredients you have in your kitchen, and Chomptron generates creative, practical recipes complete with measurements, instructions, cooking time, and serving sizes.

Local Development

bash
npm installexport GEMINI_API_KEY="your-api-key-here"export GEMINI_MODEL="gemini-3.1-flash-lite"  # Optional, defaults to gemini-3.1-flash-litenpm start

Visit http://localhost:8080

Get API key: https://makersuite.google.com/app/apikey

Environment Variables

  • GEMINI_API_KEY (required) - Your Google Gemini API key
  • GEMINI_MODEL (optional) - Model to use, defaults to gemini-3.1-flash-lite
  • PORT (optional) - Server port, defaults to 8080

Model Configuration

The Gemini model can be configured via the GEMINI_MODEL environment variable:

Recommended Models (as of December 2025):

  • gemini-3.1-flash-lite (default) - Best free tier limits: 15 RPM, 1,000 RPD
  • gemini-2.5-flash - 10 RPM, 250 RPD
  • gemini-2.0-flash - 10 RPM, 200 RPD (⚠️ unstable quota, often shows limit: 0)
  • gemini-1.5-flash - Legacy model, may have better limits than 2.0

December 2025 Quota Shift:

Google overhauled free tier quotas in December 2025:

  • gemini-2.0-flash was removed from fully unauthenticated free tier
  • Many accounts see limit: 0 errors for newer models without billing enabled
  • Free tier quotas don't automatically reset monthly

Fixing "Limit: 0" Errors:

If you're seeing quota errors with limit: 0:

  1. Switch to gemini-2.5-flash-lite - Best free tier model currently available
  2. Enable billing (Pay-As-You-Go) - Linking a credit card (even if you don't spend) moves you from "Limited Free" to "Tier 1" and unlocks promised free quotas
  3. Check your region - EEA, UK, and Switzerland have restricted free tier access
  4. Monitor usage - Visit /api/usage endpoint or https://ai.dev/usage

Free Tier Limits (as of Dec 2025):

ModelRequests/MinuteRequests/DayBest For
gemini-2.5-flash-lite151,000High-volume apps
gemini-2.5-flash10250General use
gemini-2.0-flash10200Legacy (unstable)
gemini-2.5-pro250Complex reasoning

Testing

bash
npm test

Tests validate:

  • Modular File Structure: Verification of external styles.css and app.js linking
  • CI/CD & DevOps: Docker and Cloud Build configurations
  • API Integrity: Health check endpoints (/health, /ready) and recipe generation
  • Feature Robustness: Recipe history, scaling logic, and favorites

API Endpoints

  • GET /health - Liveness check, returns service status

  • GET /ready - Readiness check, verifies AI configuration and shows current model

  • GET /api/usage - Usage statistics (total requests, quota errors, model info)

  • POST /api/generate-recipe - Main recipe generation endpoint

    • Request Body:
      json
      {  "ingredients": "chicken, tomatoes, garlic",  "dietaryPreferences": {    "vegan": false,    "vegetarian": false,    "glutenFree": false,    "dairyFree": false,    "nutFree": false,    "shellfishFree": false,    "eggFree": false,    "soyFree": false  }}
    • Response:
      json
      {  "success": true,  "recipe": "**Recipe Name:** ...",  "cached": false}
  • POST /mcp — MCP Streamable HTTP. Tool generate_recipe (ingredients + optional dietary flags). Unauthenticated. Daily cap MCP_DAILY_RECIPE_LIMIT (default 20), persisted to MCP_BUDGET_FILE so a process restart on the same instance does not reset it.

Architecture

Chomptron is built as a serverless application on Google Cloud Run for cost efficiency and automatic scaling.

Tech Stack:

  • Backend: Node.js 24 + Express
  • AI: Google Gemini (configurable model, defaults to gemini-3.1-flash-lite)
  • Frontend: Modular Vanilla HTML/CSS/JavaScript (Clean separation of concerns)
  • Storage: Browser localStorage for recipe history
  • Platform: Google Cloud Run (serverless)
  • CI/CD: Cloud Build
  • Domain: chomptron.com

Why Serverless?

  • Scales to zero when idle → $0 cost (vs. $5-50/month traditional hosting)
  • Auto-scales from 0 to 1000+ instances based on traffic
  • Zero maintenance - no servers to manage, patch, or configure
  • Perfect for AI workloads - handles burst traffic and CPU-intensive recipe generation efficiently

Performance Optimizations:

  • In-Memory Caching: Per-instance recipe cache (24-hour TTL, max 100 recipes)
  • Structured Recipe Parsing: Extracts recipe components for better display and scaling
  • Client-Side Rate Limiting: Prevents excessive API calls
  • Smart Retry Logic: Handles quota errors gracefully with exponential backoff

Usage Guide

Generating Recipes

  1. Enter your ingredients in the text area
  2. (Optional) Select dietary preferences/allergies
  3. Click "Generate Recipe ✨"
  4. View your structured recipe with:
    • Recipe name and metadata
    • Scaled ingredients list
    • Step-by-step instructions
    • Cooking tips

Recipe Features

  • Scale Servings: Use +/- buttons to adjust serving size (0.25x to 4x)
  • Rate Recipes: Click stars to rate recipes (1-5 stars)
  • Add Notes: Type personal notes in the notes field
  • Favorite: Click the star button to favorite recipes
  • Print: Click print button for print-friendly view
  • Share: Click share button to generate shareable URL

Recipe History

  • Click the 📚 button (top-right) to open recipe history
  • Search recipes by name, ingredients, or content
  • Filter by favorites
  • Export all recipes as JSON or text
  • Click any recipe to reload it

Dark Mode

  • Click the 🌙 button (top-left) to toggle dark/light mode
  • Preference is saved automatically

Monitoring

Health checks:

bash
curl https://chomptron.com/healthcurl https://chomptron.com/readycurl https://chomptron.com/api/usage  # View usage statistics

View logs:

bash
# Recent logsgcloud run logs read chomptron --region us-central1 --limit 50
# Live streamgcloud run logs tail chomptron --region us-central1

Console dashboards:

Features

Core Functionality

  • ✨ AI-powered recipe generation using Google Gemini
  • 🍳 Creative recipe names and instructions
  • 📏 Precise measurements and serving sizes
  • ⏱️ Cooking time estimates (prep, cook, total time)
  • 🎨 Modern Visual Polish: Glassmorphism design with staggered entrance animations
  • 🔠 Premium Typography: Outfit and Inter fonts for a contemporary feel
  • ⚡ Serverless, auto-scaling infrastructure on Google Cloud Run

Recipe Management

  • 📚 Recipe history with localStorage persistence (up to 100 recipes)
  • ⭐ Favorites system to mark and filter beloved recipes
  • 🔍 Search and filter through saved recipes
  • 💾 Export recipes to JSON or text format
  • 📋 Quick access to past recipes via sidebar panel
  • 📝 Add personal notes to each recipe
  • ⭐ Rate recipes with 5-star rating system

Recipe Customization

  • 🥗 Dietary Preferences & Allergies: Vegan, Vegetarian, Gluten-Free, Dairy-Free, Nut-Free, Shellfish-Free, Egg-Free, Soy-Free
  • 📊 Recipe Scaling: Adjust serving sizes from 0.25x to 4x with automatic ingredient scaling
  • 🖨️ Print-Friendly View: Clean print layout optimized for printing recipes
  • 🔗 Shareable URLs: Generate shareable links for recipes (Web Share API support)

Recipe Display

  • 📋 Structured Recipe Format: Parsed display with organized sections:
    • Recipe name
    • Serving size and timing information
    • Ingredients list
    • Step-by-step instructions
    • Cooking tips
  • 🎨 Dark/Light Mode: Toggle between themes with persistent preference

Performance & Optimization

  • 💾 Recipe Caching: In-memory cache reduces API calls for similar ingredient combinations
  • 🔄 Smart Retry Logic: Automatic retry with exponential backoff for quota errors
  • ⚡ Rate Limiting: Client-side rate limiting prevents excessive API calls

Technical Features

  • 🔍 Health monitoring and readiness checks
  • 🔎 SEO optimized with meta tags, Open Graph, Twitter Cards, and structured data
  • 📱 PWA support with manifest.json
  • 🤖 robots.txt and sitemap.xml for search engine indexing

Recipe Data Structure

Recipes are stored in browser localStorage with the following structure:

json
{  "id": "timestamp",  "ingredients": "chicken, tomatoes, garlic",  "recipe": "Full recipe text...",  "recipeName": "Extracted recipe name",  "timestamp": "2025-01-01T00:00:00.000Z",  "favorite": false,  "rating": 0,  "notes": "",  "servingSize": 4,  "dietaryPreferences": {    "vegan": false,    "vegetarian": false,    "glutenFree": false,    "dairyFree": false,    "nutFree": false,    "shellfishFree": false,    "eggFree": false,    "soyFree": false  }}

Caching Strategy

The application uses in-memory caching on the server side:

  • Cache Key: Normalized ingredients + dietary preferences
  • TTL: 24 hours
  • Max Size: 100 recipes per instance
  • Scope: Per-instance (serverless instances are ephemeral)
  • Benefits: Reduces API calls for similar requests hitting the same instance

SEO Features

Optimized for search engines and social sharing with meta tags, Open Graph, Twitter Cards, structured data (JSON-LD), sitemap, robots.txt, and PWA support.

Buildkite Pipeline

This repo includes a Buildkite pipeline at .buildkite/pipeline.yml that runs on a self-hosted GCP agent provisioned by buildkite-gcp-agent.

Pipeline structure

Push / PR  └── Three steps dispatched in parallel:        ├── :prettier: Format check   (npm run format -- --check)        ├── :eslint:   Lint           (npm run lint)        └── :nodejs:   Tests          (npm test)  └── Annotate — consolidated pass/fail surfaced in the Buildkite UI

The key difference from the GitHub Actions workflow, which runs format → lint → test sequentially in a single job: these three steps have no dependencies on each other and run simultaneously. On a pool of agents this distributes the work; even on a single agent the explicit dependency graph documents intent and makes the pipeline trivially scalable.

The deploy stage is intentionally omitted — Cloud Run deployments are handled by the existing GHA workflow which holds the production GCP credentials. CI (fast feedback) and CD (production access) are kept in separate systems as a security boundary.

Pipeline setup

Connect the repo via Buildkite → New Pipeline → point at github.com/swantron/chomptron. Buildkite reads .buildkite/pipeline.yml automatically on each push.

Agent targeting

All steps run on the gcp queue:

yaml
agents:  queue: gcp

Contributing

This is a personal project, but suggestions and improvements are welcome!

License

MIT

来源:README.md,提交 d433aac

工具

1

generate_recipe

Generate a recipe

Given ingredients on hand (and optional dietary restrictions), generate a complete recipe: name, servings, timing, ingredient list, and steps.

输入参数ingredients必填dietaryPreferences

版本历史

1
  1. v1.0.0最新Sep 23, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分