Skip to main content
Glama
hivelog-mcp

hivelog-mcp

README.md
# hivelog-mcp

Beekeeping math as an MCP server: how much sugar and water make 1:1 or 2:1 sugar syrup for feeding bees (by weight,
in kg or lb, litres or US gallons) and bee fondant; a varroa alcohol wash or sugar roll as mites per 100 bees against
the treatment threshold for the season or your country; the days when the mite level will reach that threshold from
two counts; and a varroa treatment's calendar and honey super rule from its label (Apivar, Apiguard, Formic Pro,
oxalic acid and more). Four read-only tools, no sign-in, nothing stored.

It is the calculator of the **[HiveLog](https://zhukovskyi.space/apps/hivelog/)** beekeeping app by Dre Dev, ported
from Dart to Python and checked against the app's own test values.

- App: [zhukovskyi.space/apps/hivelog](https://zhukovskyi.space/apps/hivelog/) (coming to Google Play)
- Server: `https://mcp.zhukovskyi.space/hivelog/mcp` (streamable HTTP)

## Tools

| Tool | Gives |
|---|---|
| `mix_sugar_syrup_for_bees` | Sugar and water (kg, lb, litres, US gallons) for 1:1, 3:2 or 2:1 syrup, from the sugar you have or for the syrup volume you want, and what it makes; fondant 4:1 with boiling and beating temperatures |
| `check_varroa_mite_count` | Mites per 100 bees (% infestation) from a wash or roll, the threshold of that day (HBHC by colony phase, or Australia, UK, Ontario, or your own), low / moderate / high and what to do; sticky board drop per day |
| `forecast_varroa_threshold_date` | From two counts 14–90 days apart: the growth rate, doubling time and the range of days the level reaches the threshold |
| `plan_varroa_treatment` | Dose and removal days of 12 treatments from their labels, the last day in the hive, the honey super rule and the first day supers may go on; checks a planned super day |

All tools: `readOnlyHint: true`, `destructiveHint: false`, `openWorldHint: false`.

## Connect

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

**Local (stdio):**

```bash
git clone https://github.com/andronaft/hivelog-mcp && cd hivelog-mcp
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
```

```json
{ "mcpServers": { "hivelog": { "command": "/path/to/hivelog-mcp/.venv/bin/python",
                               "args": ["/path/to/hivelog-mcp/server.py", "--stdio"] } } }
```

Ask, for example: *"How much sugar and water for 10 litres of 2:1 syrup?"* or *"My alcohol wash on 10 August had
9 mites in 300 bees. Do I need to treat?"*

## Method

- Syrup ratios by weight: Michigan State University Extension, *Feeding Honey Bees* (1:1 = 50 % for spring, 2:1 =
  66.7 % for autumn). Syrup volume: USDA AMS *Sucrose Conversion Table* at 20 °C (1:1 50 °Brix 10.252 lb/US gal,
  3:2 60 °Brix 10.727, 2:1 66.7 °Brix 11.063); sugar for a volume = volume × density × sugar share, water as 0.9982
  kg/L. Fondant: Utah State University Extension, 4 : 1 by weight, boil to 235–240 °F (113–116 °C).
- Mites per 100 bees = mites ÷ bees × 100, from 100 bees up (300 is usual). Threshold: Honey Bee Health Coalition,
  *Tools for Varroa Management*, 9th ed., Table 1 — 1 % dormant and increase, 2 % peak and decrease; the months per
  phase (north: March–May increase, June–July peak, August–October decrease; south six months later) are HiveLog's
  approximation. Presets: Australia NVMMP (5 per 300 bees, 9 per 300 in December–February), UK National Bee Unit
  Fact Sheet 13 (5 %), Ontario OMAFA (1 %, 2 % June–October). High at or above the line, moderate from half of it.
- Forecast: rate = ln(latest ÷ earlier) ÷ days; the first day latest × e^(rate × d) reaches that day's threshold, at
  the rate 25 % faster and slower, within 180 days (HBHC: uncontrolled mites "can double monthly").
- Treatments: US labels as summarised by Wisconsin DATCP (*2026 Wisconsin Honey Bee Pest Management Options*), EU
  and UK summaries of product characteristics (Apitraz, PolyVar Yellow, VarroMed, Oxybee), honey super texts from the
  labels (Apivar EPA 87243-1: supers 14 days after the strips are out).
- Checked against: 10 L of 1:1 → 6.14 kg sugar + 6.14 kg water; 1 US gal of 2:1 → 7.375 lb sugar; 10 kg sugar at
  2:1 → 5 kg water, 11.32 L; 9 mites in 300 bees in August → 3 %, high; 0.5 % → 1 % over 28 days → 2 % line
  22 July – 6 August; Apivar 20 Aug → out 1 Oct; Apiguard 20 Aug, 3 Sep, out 17 Sep. See `test_server.py`.

Thresholds, forecasts and schedules are guides from published sources, not a diagnosis. The product label and local
rules come first; this server gives no medicine doses. Hot sugar burns.

## Run and test

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

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

## Licence

MIT for the code. Numbers from the extension services, USDA, Honey Bee Health Coalition and product labels named
above. Made by Andrii Zhukovskyi ([Dre Dev](https://zhukovskyi.space/)).