连接器指南阅读约 6 分钟40 个 MCP 工具7 种语言

如何通过 MCP 将 Loyverse 连接到 ChatGPT

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

HC作者:HelpCode 团队更新于 6 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Loyverse

Loyverse

Loyverse point of sale: sales and refund receipts, shifts and cash, items with variants, categories, modifiers, discounts and taxes, stock per store, loyalty customers, employees, stores, POS devices, payment types, suppliers and webhooks.

个工具

40

区域

INTL

类别

电子商务

身份验证

Bearer Token

所需环境变量

LOYVERSE_ACCESS_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 Loyverse,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

试试这样问

Loyverse 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Loyverse · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Loyverse、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Loyverse + ChatGPT

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

LOYVERSE_ACCESS_TOKEN

步骤 1 — 获取凭证

设置大约需要 2 分钟。你需要 Loyverse 账户的所有者登录。

  1. 以所有者身份登录 Loyverse Back Office,打开 Settings、Access tokens(https://r.loyverse.com/dashboard/#/integrations/tokens)。在部分套餐中,访问令牌属于 Integrations 附加功能。
  2. 点击 Add access token,填写名称,如需要也可设置到期日,然后保存。复制令牌。
  3. 把它粘贴到 LOYVERSE_ACCESS_TOKEN。它以 Authorization: Bearer <token> 发送,拥有账户的完全访问权限,请妥善保管。
  4. 安装连接器并运行 loyverse_get_merchant:它会显示商户名称和币种,并确认令牌可用。

连接器与 Loyverse API v1.0(https://api.loyverse.com/v1.0)通信,这是 Loyverse 收银系统的后台 API。

读取内容:账户用 loyverse_get_merchant(币种及小数位数),门店用 loyverse_list_stores 和 loyverse_get_store,POS 设备用 loyverse_list_pos_devices。销售:loyverse_list_receipts 按门店和日期范围(created_at_min/created_at_max)或小票号查询,最新的在前,包含明细、折扣、税、付款、员工和顾客;loyverse_get_receipt 按小票号读取一张小票。班次和现金:loyverse_list_shifts 和 loyverse_get_shift(现金进出、应有现金和实际现金、总销售额和净销售额、税、按支付方式的付款)。支付方式用 loyverse_list_payment_types 和 loyverse_get_payment_type。商品目录:loyverse_list_items、loyverse_get_item,带 SKU、条码和分门店价格的规格用 loyverse_list_variants(按 sku 搜索)和 loyverse_get_variant,还有分类、修饰项、折扣、税和供应商。库存:loyverse_list_inventory 给出每个规格在每个门店的 in_stock。顾客用 loyverse_list_customers(按 email 搜索)和 loyverse_get_customer,包含到店次数、累计消费和会员积分;员工用 loyverse_list_employees 和 loyverse_get_employee;webhook 用 loyverse_list_webhooks。

写入内容:loyverse_create_receipt 记录在其他地方(例如其他渠道)完成的销售:它会扣减启用库存跟踪的商品库存并计入报表,且付款合计必须等于小票总额。保存类工具不带 id 时创建记录,带 id 时更新记录:loyverse_save_item、loyverse_save_variant、loyverse_save_category、loyverse_save_discount、loyverse_save_tax 和 loyverse_save_customer(total_points 设置积分余额)。更新会替换整条记录,所以 AI 会先读取,并带上所有需要保留的字段。loyverse_set_inventory 在 stock_after 中接收新的绝对数量,而不是增减量。loyverse_create_webhook 为一个 HTTPS 地址订阅一个事件(小票、商品、顾客、库存变动或已结班次);事件类型加地址必须唯一。在创建小票或修改库存之前,AI 会先展示明细、金额或新的库存数,等你同意。

安装时关闭:loyverse_refund_receipt、loyverse_delete_item 和 loyverse_delete_customer。它们无法撤销,因此在团队需要时由工作区管理员开启。

数据格式:ID 是 UUID;小票通过 receipt_number(例如 1-1001)指定。金额是账户币种的小数(见 loyverse_get_merchant)。小票的 receipt_type 为 SALE 或 REFUND;退款以正数金额记录,因此 AI 在汇总销售额时会将其扣除,cancelled_at 标记已作废的小票。所有时间均为 UTC(ISO 8601);按天分组前,AI 会把它们换算成门店时区。在 Back Office 中删除的记录默认隐藏,除非 show_deleted 为 true。

分页:列表工具返回 limit 条记录(默认 50,最多 250),只要还有更多就返回 cursor;AI 会把它作为 cursor 传回,直到不再出现。门店、POS 设备、支付方式、折扣和税会一次全部返回。

限制和常见错误:每个账户每 300 秒 300 个请求;超出时 Loyverse 返回 429 RATE_LIMITED。错误以 errors: [{code, details, field}] 返回。401 UNAUTHORIZED 表示令牌错误或已过期:请重新复制或新建一个。402 PAYMENT_REQUIRED 表示订阅或包含 API 的附加功能已到期。403 FORBIDDEN,404 NOT_FOUND 表示 ID 错误,400 INVALID_VALUE 或 MISSING_REQUIRED_PARAMETER 会指明出错的字段。

使用安装时开启的工具,连接器不会对小票退款,也不会删除任何内容。门店、POS 设备、支付方式、员工、修饰项和供应商只读,不会创建或修改,也不会删除 webhook。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 ChatGPT 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

ChatGPT 在网页版的 Plugins 页面把 MCP 服务器添加为插件,仅付费套餐可用,不再需要开发者模式。在 Business 工作区中只有管理员和所有者可以添加;在 Enterprise 和 Edu 中,管理员可以授予 Create plugins with MCPs 权限。

  1. 前往 chatgpt.com/plugins,点击 Add,然后选择 Add custom MCP server。
  2. 填写名称,例如 Name: Loyverse。
  3. 在 Connection 下的 Server URL 中填入 https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,Authentication 保持为 OAuth。
  4. 选择 I understand and want to continue,然后点击 Create as a plugin。ChatGPT 提示时,登录 AnythingMCP 并允许访问。
  5. 在个人插件中安装这个新插件,然后在对话中输入 @ 并选择它。

可用工具

ToolWhat it does
loyverse_get_merchantGet the Loyverse account (merchant) behind the token: business name, email, country and currency with its decimal places
loyverse_list_storesList the stores of the account with name, address, phone and description
loyverse_get_storeGet one store by its id (UUID) with name, address, phone number and description, as shown in the Back Office
loyverse_list_pos_devicesList the POS devices (registers) of the account, optionally for one store, with name, store id and whether the device is activated
loyverse_list_receiptsList sales and refund receipts, newest first, with line items, discounts, taxes, payments, totals, store, employee, customer and POS device
loyverse_get_receiptGet one receipt by its receipt number (e.g. 1-1001) with all line items, modifiers, discounts, taxes, payments and the refund link
loyverse_create_receiptRecord a sales receipt in Loyverse (e.g. a sale made in another channel)
loyverse_refund_receiptCreate a refund receipt for some or all lines of a sales receipt
loyverse_list_shiftsList closed cash register shifts with opening and closing time, cash movements, expected and actual cash, gross and net sales, taxes and…
loyverse_get_shiftGet one shift by id with cash drawer amounts, cash movements, sales totals, taxes and payment totals per payment type
loyverse_list_payment_typesList payment types (cash, card, check and custom ones) with their id and type
loyverse_get_payment_typeGet one payment type by id with its name, type (CASH, NONINTEGRATEDCARD, CHECK, OTHER and so on) and stores
loyverse_list_itemsList items of the catalog with category, taxes, modifiers, options and their variants (SKU, barcode, cost, default price and price per…
loyverse_get_itemGet one item by id with its variants, prices per store, category, tax ids, modifier ids, stock tracking and composite components
loyverse_save_itemCreate an item, or update it when id is given (Loyverse upserts with POST)
loyverse_delete_itemDelete an item and its variants from the catalog
loyverse_list_variantsList item variants with SKU, barcode, option values, cost, default price and per-store price and availability
loyverse_get_variantGet one item variant by id with SKU, barcode, option values, cost and the price and availability in each store
loyverse_save_variantCreate a variant of an existing item, or update it when variant_id is given (upsert with POST)
loyverse_list_categoriesList item categories with name and colour
loyverse_get_categoryGet one item category by id (UUID) with its name, colour and creation and deletion times
loyverse_save_categoryCreate an item category, or rename or recolour it when id is given (Loyverse upserts with POST)
loyverse_list_modifiersList modifiers (e.g
loyverse_list_discountsList discounts with type (fixed or variable, percent or amount, by points), value, stores and whether access is restricted
loyverse_get_discountGet one discount by id (UUID) with its type, amount or percent, stores and restricted access flag
loyverse_save_discountCreate a discount, or update it when id is given (upsert with POST)
loyverse_list_taxesList taxes with rate, type (included in the price or added to it) and stores
loyverse_get_taxGet one tax by id (UUID) with its name, rate in percent, type (INCLUDED or ADDED) and stores
loyverse_save_taxCreate a tax, or update it when id is given (upsert with POST)
loyverse_list_suppliersList suppliers with contact name, email, phone, website, address and note
loyverse_list_inventoryList stock levels per item variant and store (in_stock)
loyverse_set_inventorySet the stock of item variants in stores. stock_after is the new absolute quantity, not a change: read the current level first and confirm…
loyverse_list_customersList loyalty customers with contact details, customer code, note, first and last visit, total visits, total spent and points balance
loyverse_get_customerGet one customer by id with contact details, address, customer code, visits, total spent and loyalty points
loyverse_save_customerCreate a customer, or update one when id is given (upsert with POST). total_points sets the loyalty balance
loyverse_delete_customerDelete a customer with their loyalty points
loyverse_list_employeesList employees with name, email, phone, role and the stores they work in
loyverse_get_employeeGet one employee by id (UUID) with name, email, phone number, owner flag and the stores they work in
loyverse_list_webhooksList the webhooks of the account with event type, target URL and status (ENABLED or DISABLED after failed deliveries)
loyverse_create_webhookSubscribe an HTTPS URL to one event: receipts, items, customers or inventory changes, or closed shifts

示例提示

  • “昨天每个门店扣除退款后的净销售额是多少?”
  • “给我看市中心门店最近一个已结班次,包括应有现金和实际现金。”
  • “市中心门店哪些规格的库存少于 5 件?”
  • “把市中心门店 SKU LATTE-CUP-12 的库存设为 200。先给我看当前库存。”
  • “找到邮箱为 [email protected] 的顾客,显示他的到店次数、累计消费和积分。”

FAQ

ChatGPT 免费套餐能用自定义 MCP 服务器吗? OpenAI 只为付费套餐提供自定义 MCP 服务器的说明,Free 套餐不在其列。

下一步

这份指南对你有帮助吗?

你的 Loyverse 智能体只差一次点击。

安装连接器,粘贴密钥,向 ChatGPT 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 Loyverse 连接到 Claude

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

连接器

如何通过 MCP 将 Loyverse 连接到 Cursor

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

连接器

如何通过 MCP 将 Loyverse 连接到 Gemini

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

连接器

如何通过 MCP 将 Loyverse 连接到 Meta Muse

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

连接器

Loyverse 接入 MCP:在任意 AI 智能体中处理小票、班次、商品、库存和会员顾客

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。

连接器

如何通过 MCP 将 Loyverse 连接到 Microsoft Copilot

Loyverse 收银系统后台:销售和退款小票,班次和现金,带规格的商品,分类、修饰项、折扣和税,各门店库存,会员顾客,员工、门店、POS 设备、支付方式、供应商和 webhook。退款和删除在安装时关闭。