AG

attmous/grocy-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

16 stars 9 forks 质量 70 趋势 21MIT

MCP服务器和Grocy的CLI -- -- 通过人工智能代理控制库存、购物清单、食谱和杂活

概览

grocy-mcp让AI代理和终端用户通过一个共享代码库与Grocy合作. 它通过下列方式揭露股票、购物清单、食谱、杂务、电池、设备、日历出口、文件组、打印助手、工作流程预览/应用助手、发现工具和通用实体管理: - Claude Desktop、Claude Code和其他MCP客户端等工具的 MCP 服务器 -- -- 用于直接命令行的grocy CLI - 想把Grocy联系到克洛德,ChatGPT,还是另一个MCP客户端? 安装 grocy- mcp, 运行 MCP 服务器, 并指向客户端 。 - 想从终端管理Grocy吗? 安装软件包并直接使用 grocy CLI 。 - 要建立聊天,OCR,还是相片驱动的流量? 将此repo以外的项目规范化, 然后在此调用工作流程预览/应用工具 .

概述(AI 翻译)

Python MCP服务器和CLI为Grocy服务.

grocy-mcp让AI代理和终端用户通过一个共享代码库与Grocy合作. 它通过下列方式揭露股票、购物清单、食谱、杂务、电池、设备、日历出口、文件组、打印助手、工作流程预览/应用助手、发现工具和通用实体管理:

  • Claude Desktop、Claude Code等工具的MCP服务器和其他MCP客户端
  • a grocy直接用于命令行的CLI

□ 选择路径

  • 想把Grocy联系到克洛德,ChatGPT,还是另一个MCP客户端? 安装 grocy-mcp,运行 MCP 服务器,并指向客户端 。
  • 想从终端管理Grocy吗? 安装软件包并直接使用 [[T3] CLI.
  • 要建立聊天,OCR,还是相片驱动的流量? 将此repo以外的项目规范化, 然后在此调用工作流程预览/应用工具 。

如果你只想要最快的第一跑,就够了:

□为什么这个项目

Grocy已经拥有了坚实的REST API,但大多数日常的相互作用仍然需要两种:

-通过Grocy UI点击

  • 编写一次性API脚本
  • 围绕数字标识进行临时自动化

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

grocy-mcp

Python MCP server and CLI for Grocy.

grocy-mcp lets AI agents and terminal users work with Grocy through one shared codebase. It exposes stock, shopping lists, recipes, chores, batteries, equipment, calendar exports, file groups, print helpers, workflow preview/apply helpers, discovery tools, and generic entity management through:

  • an MCP server for tools like Claude Desktop, Claude Code, and other MCP clients
  • a grocy CLI for direct command-line use

Choose your path

  • Want to connect Grocy to Claude, ChatGPT, or another MCP client? Install grocy-mcp, run the MCP server, and point your client at it.
  • Want to manage Grocy from the terminal? Install the package and use the grocy CLI directly.
  • Want to build chat, OCR, or photo-driven flows? Normalize items outside this repo, then call the workflow preview/apply tools here.

If you only want the fastest possible first run, this is enough:

pip install grocy-mcp
export GROCY_URL="https://grocy.example.com"
export GROCY_API_KEY="your-api-key-here"
grocy stock overview

Why this project

Grocy already has a solid REST API, but most day-to-day interactions still require either:

  • clicking through the Grocy UI
  • writing one-off API scripts
  • wiring ad hoc automations around numeric IDs

grocy-mcp packages those API capabilities into a cleaner operator experience:

  • human-friendly names instead of IDs for common flows
  • a reusable MCP surface for AI agents
  • a mirrored CLI for shell workflows and scripting
  • one shared implementation for both interfaces

Features

  • 80+ MCP tools across stock, shopping, recipes, chores, locations, tasks, meal plans, batteries, equipment, calendar, files, print, discovery, workflow helpers, and system operations
  • Full Typer CLI with grouped subcommands under grocy
  • Global --json mode for machine-readable output on the supported list/view/reporting commands
  • Top-level CLI config overrides via --url and --api-key
  • Name-based resolution for products, recipes, chores, locations, batteries, and equipment
  • Stable workflow-oriented JSON contracts for preview/apply flows driven by chat, OCR, or vision clients
  • Batch preview/apply helpers for product matching, stock intake, and shopping-list reconciliation
  • First-class catalog helpers for shopping metadata, quantity metadata, task categories, meal-plan sections, and price-history views
在 GitHub 查看完整 README

安装

uvx grocy-mcp --transport stdio
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "grocy": { "command": "grocy-mcp", "args": ["--transport", "stdio"], "env": { "GROCY_URL": "https://grocy.example.com", "GROCY_API_KEY": "your-api-key-here" } } } }