grocy-mcp-server
A Model Context Protocol server for Grocy — the self-hosted household ERP: stock, products, shopping lists, chores, locations, stores and recipes.
Built for Grocy 4.x (tested against 4.7.1). Read-only-capable: the tools are annotated so MCP clients can tell reads from writes from destructive actions.
26 tools: stock (8) · products (4) · shopping list (6) · locations (1)
product groups (1) · quantity units (1) · stores (1) · chores (1)
recipes (2) · system (1)
Why this one
The most-used Grocy MCP servers are no longer maintained:
saya6k/mcp-grocy-api— archived, README marked unmaintainedattmous/grocy-mcp— last release April 2026; its #10 reports theexpiring_productskey removal on Grocy 4.x, unanswered
This server handles the Grocy 4.x /api/stock/volatile shape (a single object
keyed by category) rather than assuming a flat list, which is the failure mode
in the servers above.
Install
Requires Python 3.10+.
pip
pip install grocy-mcp-server
GROCY_URL=https://grocy.example.com GROCY_KEY=your-api-key grocy-mcp-server
uvx (no install)
uvx --from grocy-mcp-server grocy-mcp-server
Docker
docker build -t grocy-mcp .
docker run --rm -i \
-e GROCY_URL=https://grocy.example.com \
-e GROCY_KEY=your-api-key \
grocy-mcp
From source
git clone https://github.com/margosmark/grocy-mcp-server.git
cd grocy-mcp-server
python3 -m venv .venv && . .venv/bin/activate
pip install -e .
grocy-mcp-server
Configuration
| Variable | Required | Description |
|---|---|---|
GROCY_URL |
yes | Base URL of your Grocy instance, no trailing slash needed |
GROCY_KEY |
yes | Grocy API key — Settings → Manage API keys → Add |
The key is sent as the GROCY-API-KEY header. Use a dedicated key so you can
revoke it without disturbing anything else.
Client setup
Claude Desktop / Cursor / any MCP client (stdio):
After pip install grocy-mcp-server, point the client at the console script:
{
"mcpServers": {
"grocy": {
"command": "grocy-mcp-server",
"env": {
"GROCY_URL": "https://grocy.example.com",
"GROCY_KEY": "your-api-key"
}
}
}
}
Running from a checkout instead:
{
"mcpServers": {
"grocy": {
"command": "python3",
"args": ["-m", "grocy_mcp_server"],
"env": {
"GROCY_URL": "https://grocy.example.com",
"GROCY_KEY": "your-api-key"
}
}
}
}
Tools
Stock
grocy_get_stock— everything in stock with quantities, locations and due datesgrocy_get_stock_volatile— overdue / due soon / expired / missing, groupedgrocy_get_product_stock— stock detail for one productgrocy_add_stock— add stock (amount, location, optional best-before)grocy_consume_stock— consume stockgrocy_transfer_stock— move stock between locationsgrocy_set_stock— inventory correction (overwrites the count)grocy_open_stock— mark items as opened
Products
grocy_list_products— list or search by namegrocy_get_product— full product recordgrocy_create_product— create a productgrocy_delete_product— delete a product (destructive)
Shopping list
grocy_get_shopping_listgrocy_add_to_shopping_listgrocy_add_note_to_shopping_list— free text, no product neededgrocy_remove_from_shopping_listgrocy_clear_shopping_list(destructive)grocy_add_missing_to_shopping_list— everything below minimum stock
Lookups
grocy_list_locations, grocy_list_product_groups,
grocy_list_quantity_units, grocy_list_shopping_locations,
grocy_list_chores, grocy_list_grocy_recipes, grocy_get_system_info
Recipes
grocy_add_recipe_to_shopping_list— add a recipe's missing ingredients
IDs are instance-specific. Every tool that takes an ID has a matching list tool; resolve IDs at call time rather than hardcoding them.
Notes and limitations
- Recipes are read-only and basic — Grocy's recipe API is thin. Use a dedicated recipe server if you need full recipe management.
grocy_set_stockperforms an inventory correction and overwrites the current amount. Prefergrocy_add_stock/grocy_consume_stockfor normal changes.- Tested against Grocy 4.7.1. Older 3.x instances may differ in the volatile stock response shape; both the 4.x object shape and a flat list are handled.
License
MIT — see LICENSE.
Metadata
Release files for grocy-mcp-server 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grocy_mcp_server-1.0.0.tar.gz | 12.6 kB | With provenance | Details for grocy_mcp_server-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grocy_mcp_server-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for grocy_mcp_server-1.0.0-py3-none-any.whl |
Total release size: 23.4 kB
Release files / grocy_mcp_server-1.0.0.tar.gz
| Download URL | grocy_mcp_server-1.0.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6dd34584cf6e7a1257b608e2b2d52bbfa03dd67e8cd18d91dc44aaabdfad071
|
|
BLAKE2b-256 checksum How to use checksums |
7dea8064750a1ebfa1a7fcce1d2961ae502b9ef107cc6aea179d589d483018cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / grocy_mcp_server-1.0.0-py3-none-any.whl
| Download URL | grocy_mcp_server-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ecdfb0f0bdd2d4f6d25034c62a37ac009b9ac01623a025b2d749fb87ba4405f
|
|
BLAKE2b-256 checksum How to use checksums |
ad853c94c4ebfd8e5f2c187983b4e81071704cfa14c2ead9df0198f9ace23fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for grocy-mcp-server 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for grocy_mcp_server-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.