> ## Documentation Index
> Fetch the complete documentation index at: https://brewgravity.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Give Claude — or any MCP client — direct access to your brewing data.

Brewgravity ships an [MCP](https://modelcontextprotocol.io) server. Point an MCP
client at it and the assistant can read and edit your recipes, run brewing
calculations, and log fermentation readings, using the same API and the same
ownership rules as everything else.

This is different from the [in-app AI assistant](/docs/guides/ai-assistant): that one
lives in Brewgravity's chat panel, this one brings your data into whatever client
you already work in.

## Setup

**1. Create an API key**

Follow [Authentication](/docs/api-reference/authentication). The MCP server
authenticates as you, with your key.

**2. Add the server to your client**

For Claude Desktop, add this to your MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "gravity": {
      "command": "bun",
      "args": ["run", "/path/to/gravity/packages/mcp/src/index.ts"],
      "env": {
        "GRAVITY_API_URL": "https://brewgravity.com",
        "GRAVITY_API_KEY": "your-api-key"
      }
    }
  }
}
```

**3. Restart the client**

The Brewgravity tools appear once the server connects.

> [!NOTE]
>
> `GRAVITY_API_URL` defaults to `http://localhost:8787`, which is the local
> development API. Set it to `https://brewgravity.com` to work against your real
> data.

## Tools

> **Recipes — 18 tools**
>
> `list_recipes` · `get_recipe` · `get_recipe_stats` · `create_recipe` ·
> `update_recipe` · `delete_recipe`
>
> Plus add, update, and delete for fermentables, hops, yeasts, and mash steps.

> **Brew sessions — 12 tools**
>
> `list_brew_sessions` · `get_brew_session` · `create_brew_session` ·
> `update_brew_session` · `delete_brew_session`
>
> Brew day steps: `add_brew_step` · `update_brew_step` · `delete_brew_step`
>
> Fermentation: `log_fermentation` · `list_fermentation_logs` ·
> `update_fermentation_log` · `delete_fermentation_log`

> **Inventory — 6 tools**
>
> `list_inventory` · `search_inventory` · `get_inventory_item` ·
> `add_inventory_item` · `update_inventory_item` · `delete_inventory_item`

> **Calculations — 14 tools**
>
> `calc_og` · `calc_ibu` · `calc_volumes` · `calc_strike_water` ·
> `calc_mash_schedule` · `calc_priming_sugar` · `calc_forced_carbonation` ·
> `predict_fg` · `analyze_fermentation` · `analyze_water` ·
> `water_profiles` · `srm_color` · `hop_character` · `bugu_ratio`
>
> These run locally against Brewgravity's brewing library and need no API call, so
> they work even without a key.

> **AI — 1 tool**
>
> `recipe_preview` — the structured tasting and style analysis described in
> [AI assistant](/docs/guides/ai-assistant).

## Prompts

Two prepared prompts ship with the server:

> **recipe\_consultant**
>
> Recipe design advice — style guidelines, ingredient selection, process
> parameters. Takes an optional target style and your question.

> **brew\_day\_assistant**
>
> Live brew day help — strike water, timing, gravity checks, and
> troubleshooting. Takes an optional recipe id and the problem you are having.

## What it can do to your data

The MCP tools are not read-only. `delete_recipe` deletes a recipe; `update_hop`
changes a hop. There is no confirmation step at the protocol level, so the
guardrail is your client's — most MCP clients ask before running a tool, and it
is worth leaving that setting on.

> [!TIP]
>
> Deletions made through MCP are not covered by the app's undo history, which is
> local to a browser session. Before letting an assistant reorganise your
> library, pull a copy of your recipes with the script in
> [Exporting](/docs/import/exporting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.