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 服务器,可根据手头食材生成完整食谱,并可选 dietary 限制。
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