Skip to main content
Glama

ferment-mcp

Mead, cider and homebrew fermentation math as an MCP server: ABV from original and final gravity (standard and Hall formulas, refractometer correction), SG / Brix / Plato conversion with hydrometer temperature correction, how much honey per gallon a mead needs for a target gravity, priming sugar for bottle carbonation, and backsweetening sugar with the CO2 it would make in the bottle. Five read-only tools, no sign-in, nothing stored.

It is the calculator of the Ferment fermentation tracker app by Dre Dev, ported from Dart to Python and checked against the app's own test values. The ABV calculator also runs in the browser: mead ABV calculator.

Tools

Tool

Gives

calculate_abv_from_gravity

ABV by (OG − FG) × 131.25 and by Hall's formula, apparent attenuation, OG/FG in SG and Brix, the BJCP mead class (dry / semi-sweet / sweet, hydromel / standard / sack); hydrometer readings in SG, Brix or Plato, or two refractometer Brix readings corrected for alcohol (Terrill)

convert_gravity_reading

SG ↔ °Brix ↔ °Plato, gravity points and potential ABV, and a hydrometer reading corrected to 60 °F or 68 °F calibration

calculate_honey_for_target_gravity

Honey (or table / corn sugar) for a target original gravity from water or juice, the water to dilute a must that is too strong, or the gravity a given amount of honey gives

calculate_priming_sugar

Table sugar, corn sugar or honey to bottle-carbonate to 1.5–3+ volumes of CO2, total and per bottle (grams, ounces, teaspoons), from the warmest temperature after fermentation

calculate_backsweetening_sugar

Honey or sugar to sweeten a finished cider or mead to a target gravity, the CO2 it makes if the yeast is alive, and the verdict: don't bottle unless the yeast is stopped

Volumes in litres or US gallons, temperatures in °C or °F, masses in g, kg, oz and lb. All tools: readOnlyHint: true, destructiveHint: false, openWorldHint: false.

Related MCP server: Ingredient Convert MCP

Connect

Claude (claude.ai, Desktop), ChatGPT (developer mode), Cursor, VS Code — add a remote MCP server with the URL https://mcp.zhukovskyi.space/ferment/mcp, no authentication.

Local (stdio):

git clone https://github.com/andronaft/ferment-mcp && cd ferment-mcp
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
{ "mcpServers": { "ferment": { "command": "/path/to/ferment-mcp/.venv/bin/python",
                               "args": ["/path/to/ferment-mcp/server.py", "--stdio"] } } }

Ask, for example: "My mead started at 1.110 and is at 1.004 now, what's the ABV?" or "How much honey for 5 gallons of mead at 1.100?"

Method

  • Brix / Plato → SG by the Lyons equation, SG → Plato by the ASBC polynomial (Brewer's Friend).

  • ABV = (OG − FG) × 131.25 (Brewer's Friend); alternate = 76.08 × (OG − FG) ÷ (1.775 − OG) × (FG ÷ 0.794) (Michael L. Hall, Zymurgy, Summer 1995). Mead classes: BJCP Mead Guidelines.

  • Hydrometer temperature correction: CG = MG × f(Tr) ÷ f(Tc), Brewer's Friend's cubic in °F.

  • Refractometer: OG from Brix ÷ WCF (1.04 default); FG by Sean Terrill's cubic fit (2011), fitted on beer.

  • Sugar: points = PPG × lb ÷ US gal; honey 35 (Ken Schramm, The Compleat Meadmaker), table sugar 46, corn sugar 42 (Craft Beer & Brewing). Dilution: gravity points × volume stay the same.

  • Priming: (target − residual CO2) × 1.977 g/L ÷ CO2 per gram of sugar × litres; residual CO2 = 3.0378 − 0.050062·T + 0.00026555·T² (°F, Zymurgy 1995, matches BYO's chart); CO2 per gram by Gay-Lussac's equation (sucrose 0.514, dextrose monohydrate 0.444, honey with 82 % sugars per USDA 0.401).

  • Backsweetening: the same points math, and CO2 volumes = grams × CO2 per gram ÷ litres ÷ 1.977; bottle ratings (beer 3, Belgian 500 ml 4, 750 ml 5.5 volumes) as the sellers state them.

  • Checked against the app's tests (test/calc_test.dart, test/ideas10_backsweeten_test.dart): 1.110 → 1.000 is 14.44 % (Hall 15.85 %); 12 °Bx = 1.0484; 1.050 at 100 °F reads 1.0561 at 60 °F; Terrill 12 → 6 °Bx = 1.0114; 1.369 kg of honey for a 1.100 mead in 4 L; 119 g of table sugar for 5 gal at 2.5 volumes and 68 °F; 495 g of table sugar or 650 g of honey to take 19 L from 1.000 to 1.010. And the site's worked example: 1.100 → 1.010 is 11.8 % (Hall 12.9 %). See tests/test_server.py.

  • Not here (in the Ferment app): the batch journal and "done when the gravity holds for 3 days", step-feeding counted in the ABV, TOSNA mead nutrients, sulfite (Campden) doses, salt for sauerkraut.

All results are estimates from published formulas: honey varies, refractometer corrections were fitted on beer, and a hydrometer reading after mixing is the check. Sugar in a sealed bottle with live yeast makes gas: prime only a drink whose gravity has held for 3 days, and stop the yeast (sorbate with sulfite, or pasteurising) before backsweetening.

Run and test

pip install -r requirements.txt
python server.py                  # http://127.0.0.1:8000/mcp
python server.py --stdio
python -m unittest discover tests   # 13 tests

Hosted with the other Dre Dev MCP servers in one process; build_app() is mounted at /ferment.

Licence

MIT for the code. Formulas as published by the sources named above. Made by Andrii Zhukovskyi (Dre Dev).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables chemistry and physics homework help through five read-only tools that calculate molar mass, balance chemical equations, convert between grams, moles and particles, convert units, and round to significant figures. All arithmetic is done by tested code locally, so answers are consistent and require no internet, account or API key.
      10
      80 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables converting cooking ingredient volumes and weights (cups, tablespoons, teaspoons, millilitres, fluid ounces, grams, ounces) using a per-ingredient density table, plus scaling recipes and switching between decimal and fractional amounts. It runs deterministically with no key or sign-up, either hosted over Streamable HTTP or locally via stdio.
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes five read-only tools that let AI agents compute strength-sport math instead of guessing: Wilks, Wilks-2020, DOTS, IPF GL and IPF Points scores, one-rep-max estimates, weight-for-reps targets, per-side plate loading, and exact kg/lb conversion, with no network calls.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables sourdough bakers to compute dough formulas, true hydration, recipe scaling, starter feeds, levain builds, and water temperature for a target dough temperature. All five tools are read-only and require no sign-in.
      MIT