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
io.github.swantron由 GitHub 帳號 swantron 發布v1.0.0更新於 Oct 24, 2026
Generate a recipe from ingredients on hand, with optional dietary restrictions. Free.
一個遠端 MCP 伺服器,可依手邊食材產生完整食譜,並可選擇飲食限制。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.swantron%2Fchomptron/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"chomptron": {
"type": "http",
"url": "https://chomptron.com/mcp"
}
}
}AI-powered recipe generator that transforms ingredients into delicious recipes using Google Gemini AI. Deployed on Google Cloud Run at chomptron.com.
Enter ingredients you have in your kitchen, and Chomptron generates creative, practical recipes complete with measurements, instructions, cooking time, and serving sizes.
Visit http://localhost:8080
Get API key: https://makersuite.google.com/app/apikey
GEMINI_API_KEY (required) - Your Google Gemini API keyGEMINI_MODEL (optional) - Model to use, defaults to gemini-3.1-flash-litePORT (optional) - Server port, defaults to 8080The 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 RPDgemini-2.5-flash - 10 RPM, 250 RPDgemini-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.0December 2025 Quota Shift:
Google overhauled free tier quotas in December 2025:
gemini-2.0-flash was removed from fully unauthenticated free tierlimit: 0 errors for newer models without billing enabledFixing "Limit: 0" Errors:
If you're seeing quota errors with limit: 0:
gemini-2.5-flash-lite - Best free tier model currently available/api/usage endpoint or https://ai.dev/usageFree Tier Limits (as of Dec 2025):
Tests validate:
styles.css and app.js linking/health, /ready) and recipe generationGET /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
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.
Chomptron is built as a serverless application on Google Cloud Run for cost efficiency and automatic scaling.
Tech Stack:
Why Serverless?
Performance Optimizations:
Health checks:
View logs:
Console dashboards:
Recipes are stored in browser localStorage with the following structure:
The application uses in-memory caching on the server side:
Optimized for search engines and social sharing with meta tags, Open Graph, Twitter Cards, structured data (JSON-LD), sitemap, robots.txt, and PWA support.
This repo includes a Buildkite pipeline at .buildkite/pipeline.yml that runs on a self-hosted GCP agent provisioned by buildkite-gcp-agent.
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.
Connect the repo via Buildkite → New Pipeline → point at github.com/swantron/chomptron. Buildkite reads .buildkite/pipeline.yml automatically on each push.
All steps run on the gcp queue:
This is a personal project, but suggestions and improvements are welcome!
MIT
來源:README.md,提交 d433aac
Generate a recipe
Given ingredients on hand (and optional dietary restrictions), generate a complete recipe: name, servings, timing, ingredient list, and steps.
ingredients必填dietaryPreferences已滿足適用檢查項的 100%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
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 startnpm test{ "ingredients": "chicken, tomatoes, garlic", "dietaryPreferences": { "vegan": false, "vegetarian": false, "glutenFree": false, "dairyFree": false, "nutFree": false, "shellfishFree": false, "eggFree": false, "soyFree": false }}{ "success": true, "recipe": "**Recipe Name:** ...", "cached": false}curl https://chomptron.com/healthcurl https://chomptron.com/readycurl https://chomptron.com/api/usage # View usage statistics# Recent logsgcloud run logs read chomptron --region us-central1 --limit 50
# Live streamgcloud run logs tail chomptron --region us-central1{ "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 }}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 UIagents: queue: gcp