Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Cups To Grams

БесплатноНе проверен

Cups to grams MCP server: ingredient-aware kitchen conversion with USDA and King Arthur densities, recipe scaling

GitHubEmbed

Описание

Cups to grams MCP server: ingredient-aware kitchen conversion with USDA and King Arthur densities, recipe scaling

README

Ingredient-aware cups to grams for AI assistants, using measured grams per cup from USDA FoodData Central and the King Arthur Baking weight chart instead of guessed densities.

Hosted MCP URL (no sign-in, no token): https://cups-to-grams-mcp.lipmichal.workers.dev/mcp

Converters and recipe tools on the web: ingredientcalculator.com

Tools

Tool What it does
convert_ingredient Converts an amount between volume and weight for a named ingredient (cup, tbsp, tsp, fl oz, mL, L to g, oz, lb and back). Supports US, metric, imperial, US legal and Japanese cups, US, metric and Australian spoons, sticks of butter. Says which cup it used and cites the density source.
search_ingredients Fuzzy search over 271 ingredients. Returns canonical names, grams per US cup and per tablespoon, and the source (USDA FDC id or King Arthur chart).
scale_recipe Scales ingredient lines by a factor or from one servings count to another. Parses mixed numbers and fraction characters. Optionally gives grams for every line.
convert_oven_temperature Fahrenheit, Celsius and gas mark (1/4 to 10), with a 20 C fan oven adjustment.

Every result has structured JSON, a one-paragraph summary, an as_of date, a source URL and a more link to the matching ingredientcalculator.com page.

What it knows that your model does not

  • Measured weights. A cup of all-purpose flour is 120 g, granulated sugar 200 g, butter 227 g, honey 339 g, water 237 g. Models often apply one density to everything or mix up fluid ounces and weight ounces. Each of the 271 rows carries its source, and USDA rows carry the FDC id.
  • Which cup. A US cup is 236.5882365 mL, a metric cup 250 mL, an imperial cup 284.13 mL, the US nutrition-label cup 240 mL and a Japanese cup 200 mL. A 1 cup of flour in an Australian recipe is about 127 g, not 120 g. The server states the cup it used.
  • Exact unit constants. US units come from the US gallon of 231 cubic inches (NIST SP 811). Imperial units come from the UK Weights and Measures Act 1985 (gallon = 4.54609 L). The pound is exactly 453.59237 g.
  • Where published tables disagree. For 23 ingredients USDA and King Arthur differ by more than 5% (cornstarch, bread flour, oats, baking soda and others). The result names the value used and lists the other published value, so the user can see the spread.

Install

Claude.ai custom connector, ChatGPT developer mode

Paste this URL as a custom connector. No token or sign-in.

https://cups-to-grams-mcp.lipmichal.workers.dev/mcp

Claude Code

claude mcp add --transport http cups-to-grams https://cups-to-grams-mcp.lipmichal.workers.dev/mcp

Or run it locally over stdio:

claude mcp add cups-to-grams -- npx -y cups-to-grams-mcp

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "cups-to-grams": {
      "command": "npx",
      "args": ["-y", "cups-to-grams-mcp"]
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "cups-to-grams": { "url": "https://cups-to-grams-mcp.lipmichal.workers.dev/mcp" }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "cups-to-grams": { "type": "http", "url": "https://cups-to-grams-mcp.lipmichal.workers.dev/mcp" }
  }
}

Test with curl

curl -s -X POST https://cups-to-grams-mcp.lipmichal.workers.dev/mcp \
  -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"convert_ingredient","arguments":{"amount":1,"from_unit":"cup","to_unit":"g","ingredient":"all-purpose flour"}}}'

Example prompts

  • "How many grams is 3/4 cup of brown sugar?"
  • "Convert 250 g of bread flour to cups."
  • "This Australian recipe says 2 cups plain flour. How many grams is that?"
  • "Double this recipe and give me grams: 1 1/2 cups flour, 1/2 cup sugar, 2 tbsp honey, 1 stick butter."
  • "Scale this recipe from 4 servings to 10."
  • "What is gas mark 6 in Fahrenheit, and what should I set a fan oven to?"

How it converts

  • Density in g per mL = grams per US cup / 236.5882365.
  • Volume to weight = amount x unit mL x density. Weight to volume is the reverse.
  • Volume to volume and weight to weight use the unit constants only.
  • A stick of butter is 1/4 lb (113.398 g), which USDA lists as 113 g and 1/2 cup.
  • Gas marks follow the standard recipe table (gas mark 4 = 350 F = 180 C). Fan ovens are set 20 C lower, per oven maker guidance.

27 test fixtures check unit constants and table values. The expected values come from scripts/expected.py, which works from the unit definitions and the published table values, not from the server code.

Data sources

See DATA_SOURCES.md. In short, densities come from USDA FoodData Central SR Legacy portion weights (FDC ids per row) and the King Arthur Baking ingredient weight chart, both fetched on 2026-10-30. The table is rebuilt by scripts/build_data.py.

Limitations

  • Volume measures vary with how you fill the cup. Dry values assume spoon-and-level filling. Scooping flour from the bag can add 30 g or more per cup. Weigh when it matters.
  • Table values are whole grams per cup, so results carry about plus or minus 0.5 g per cup of rounding. King Arthur rows given per tablespoon or teaspoon are coarser.
  • Whole eggs and other count items are not converted by volume. A large egg is about 50 g.
  • Ingredient matching is fuzzy. Check the matched name in the result, or use search_ingredients first.
  • Fan oven guidance is a rule of thumb. Oven calibration varies.

Development

npm install
npm run build
npm test
npx wrangler deploy

src/core.ts holds the pure conversion logic and src/data.ts the generated density table. src/stdio.ts and src/worker.ts are thin entries over the same tool registry in src/tools.ts.

License

MIT

Part of the Zovo MCP collection: https://mcp.zovo.one

More data servers from the same author

Each one is free, needs no API key and has a hosted URL you can paste into Claude or ChatGPT.

server tools hosted URL
dscr-loan-calculator-mcp calculate_dscr, max_loan_for_target_dscr, rent_needed_for_target_dscr, compare_scenarios, amortization_summary https://dscr-loan-calculator-mcp.lipmichal.workers.dev/mcp
gold-price-per-gram-mcp get_gold_price_per_gram, get_metal_prices, calculate_jewelry_value, convert_gold_units https://gold-price-per-gram-mcp.lipmichal.workers.dev/mcp
lake-level-mcp search_lakes, get_lake_level, get_lake_history, compare_lakes https://lake-level-mcp.lipmichal.workers.dev/mcp
minimum-wage-mcp get_minimum_wage, list_upcoming_increases, compare_states, annual_income_at_minimum_wage https://minimum-wage-mcp.lipmichal.workers.dev/mcp
no-tax-on-overtime-mcp calculate_overtime_deduction, calculate_tips_deduction, calculate_senior_deduction, estimate_tax_savings, explain_eligibility https://no-tax-on-overtime-mcp.lipmichal.workers.dev/mcp
paycheck-calculator-mcp calculate_take_home_pay, compare_states_take_home, salary_to_hourly, hourly_to_salary, get_federal_tax_brackets https://paycheck-calculator-mcp.lipmichal.workers.dev/mcp
uk-income-tax-salary-mcp calculate_uk_take_home, get_uk_tax_bands, compare_salaries, marginal_rate_at_income https://uk-income-tax-salary-mcp.lipmichal.workers.dev/mcp
us-federal-holidays-business-days-mcp list_federal_holidays, is_business_day, add_business_days, count_business_days, invoice_due_date https://us-federal-holidays-business-days-mcp.lipmichal.workers.dev/mcp
ab-test-sample-size-calculator-mcp calculate_sample_size, estimate_test_duration, test_ab_significance, fisher_exact_test, check_peeking_risk https://ab-test-sample-size-calculator-mcp.lipmichal.workers.dev/mcp
aca-premium-tax-credit-calculator-mcp get_federal_poverty_level, calculate_premium_tax_credit, check_subsidy_cliff, get_aptc_repayment_cap https://aca-premium-tax-credit-calculator-mcp.lipmichal.workers.dev/mcp
ap-score-distributions-mcp get_ap_score_distribution, estimate_ap_percentile, compare_ap_exams, list_ap_exams, estimate_ap_score_from_composite https://ap-score-distributions-mcp.lipmichal.workers.dev/mcp
car-loan-interest-deduction-calculator-mcp calculate_car_loan_interest_deduction, calculate_salt_deduction, get_tax_brackets_and_standard_deduction, calculate_child_tax_credit https://car-loan-interest-deduction-calculator-mcp.lipmichal.workers.dev/mcp
estate-gift-tax-exemption-calculator-mcp get_exemption_amounts, calculate_estate_tax, check_gift, compare_years https://estate-gift-tax-exemption-calculator-mcp.lipmichal.workers.dev/mcp
recipe-nutrition-calculator-mcp lookup_ingredient_nutrition, calculate_recipe_nutrition, round_nutrition_label, scale_recipe_nutrition https://recipe-nutrition-calculator-mcp.lipmichal.workers.dev/mcp
retirement-contribution-limits-2027-mcp get_contribution_limits, calculate_max_contribution, get_social_security_cola, compare_years https://retirement-contribution-limits-2027-mcp.lipmichal.workers.dev/mcp
section-179-deduction-calculator-mcp calculate_section_179, calculate_bonus_depreciation, get_vehicle_depreciation_limits, calculate_asset_loan_payment https://section-179-deduction-calculator-mcp.lipmichal.workers.dev/mcp
student-loan-repayment-assistance-plan-calculator-mcp calculate_rap_payment, compare_rap_vs_standard, get_federal_loan_limits, get_plan_transition_dates https://student-loan-repayment-assistance-plan-calculator-mcp.lipmichal.workers.dev/mcp
subdomain-finder-mcp find_subdomains, resolve_subdomains, get_certificate_history, summarize_attack_surface https://subdomain-finder-mcp.lipmichal.workers.dev/mcp
uk-statutory-sick-pay-maternity-pay-calculator-mcp calculate_statutory_sick_pay, calculate_statutory_maternity_pay, get_minimum_wage_rates, check_eligibility https://uk-statutory-sick-pay-maternity-pay-calculator-mcp.lipmichal.workers.dev/mcp

The paid back-office collection (invoices, VAT, PDFs, spreadsheets) is at https://mcp.zovo.one

from github.com/theluckystrike/cups-to-grams-mcp

Установка Cups To Grams

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/theluckystrike/cups-to-grams-mcp

FAQ

Cups To Grams MCP бесплатный?

Да, Cups To Grams MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Cups To Grams?

Нет, Cups To Grams работает без API-ключей и переменных окружения.

Cups To Grams — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Cups To Grams в Claude Desktop, Claude Code или Cursor?

Открой Cups To Grams на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Opencode Omniroute Plugin

OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @openc

GitHub Actionsавтор: GitHub Actions
80

Roblox Studio

Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce

paralovавтор: paralov

Antigravity Drawio

MCP server that enables AI assistants to create, parse, render, and validate Draw.io diagrams programmatically.

S-SUJAN-Sавтор: S-SUJAN-S

Fetch

Web content fetching and conversion for efficient LLM usage.

автор: Community

AWS KB Retrieval

Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.

modelcontextprotocolавтор: modelcontextprotocol

Spring AI MCP Server

Provides auto-configuration for setting up an MCP server in Spring Boot applications.

автор: Community

llm-analysis-assistant

A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also

xuzexin-hzавтор: xuzexin-hz

MCP-Agent

A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)

lastmile-aiавтор: lastmile-ai

Spring AI MCP Client

Provides auto-configuration for MCP client functionality in Spring Boot applications.

автор: Community

mcp.natoma.ai

A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)

автор: Community

Compare Cups To Grams with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории ai