跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Clover,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
单个商户的 Clover 收银系统(Fiserv):商户信息和设置,带库存的商品,分类、税率、折扣和修饰项,带明细的订单,付款、退款和支付方式,顾客、员工和班次。可创建和更新商品、库存、分类、订单和顾客。支持北美、欧洲、拉丁美洲和沙箱。
试试这样问
Clover 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Clover、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Clover + Gemini
单个商户的 Clover 收银系统(Fiserv):商户信息和设置,带库存的商品,分类、税率、折扣和修饰项,带明细的订单,付款、退款和支付方式,顾客、员工和班次。可创建和更新商品、库存、分类、订单和顾客。支持北美、欧洲、拉丁美洲和沙箱。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
CLOVER_API_TOKEN, CLOVER_MERCHANT_ID, CLOVER_API_URL
步骤 1 — 获取凭证
设置大约需要 5 分钟。你需要一个 Clover 商户账户(或测试商户),以及一个可以创建 API 令牌的管理员用户。
- 以管理员身份登录 Clover Merchant Dashboard,打开 Settings、View all settings、API tokens(位于 Account and setup、Business operations 下)。创建一个令牌,勾选工具需要的权限:Merchant read、Inventory read 和 write、Orders read 和 write、Payments read、Customers read 和 write、Employees read。测试商户请在 Global Developer Dashboard(Test merchants、Launch dashboard)中做同样的操作。
- 把令牌粘贴到
CLOVER_API_TOKEN。它以Authorization: Bearer <token>发送。 - 把
CLOVER_MERCHANT_ID设为 13 位商户 ID(mId)。它显示在后台地址.../merchants/<mId>/...中,也可在 Account and setup、Merchants 下找到。 - 把
CLOVER_API_URL设为商户所在区域:https://api.clover.com(北美)、https://api.eu.clover.com(欧洲)、https://api.la.clover.com(拉丁美洲)或https://apisandbox.dev.clover.com(沙箱)。 - 安装连接器并运行
clover_get_merchant:它会显示商户名称并确认令牌可用。
读取内容:商户信息用 clover_get_merchant、clover_get_merchant_address 和 clover_get_merchant_properties(币种、时区、语言区域、小费和税务设置),以及订单类型和员工角色;商品用 clover_list_items 和 clover_get_item(价格、价格类型、SKU、编码、成本;可通过 expand 获取分类、税率、修饰项组或库存),库存用 clover_list_item_stocks 和 clover_get_item_stock,分类用 clover_list_categories、clover_get_category 和 clover_list_category_items,还有税率、预设折扣和修饰项组;订单用 clover_list_orders 和 clover_get_order(expand lineItems 和 payments),以及订单明细和整单折扣;付款用 clover_list_payments、clover_get_payment、clover_list_order_payments 和 clover_list_employee_payments(便于按员工统计小费和销售额),退款用 clover_list_refunds 和 clover_get_refund,支付方式(tender)用 clover_list_tenders 和 clover_get_tender;顾客用 clover_list_customers 和 clover_get_customer(expand emailAddresses、phoneNumbers 和 addresses);员工用 clover_list_employees 和 clover_get_employee,打卡班次用 clover_list_shifts 和 clover_list_employee_shifts。
写入内容:商品用 clover_create_item 和 clover_update_item;库存用 clover_update_item_stock,它设置的是绝对数量而不是增减量,所以 AI 会先读取当前库存;分类用 clover_create_category 和 clover_update_category;顾客用 clover_create_customer 和 clover_update_customer。一次调用创建订单:clover_calculate_order 在不保存的情况下计算总额、税、折扣和服务费,然后 clover_create_atomic_order 创建同样的购物车。分步创建:clover_create_order、clover_add_line_item、clover_add_order_discount 和 clover_update_order。Clover 通过向记录地址发送 POST 来更新记录。订单和库存变更会立即出现在商户的设备和报表中,因此 AI 会先展示要改动的内容,等你同意。
安装时关闭:clover_void_line_item、clover_delete_order 和 clover_delete_customer。它们无法撤销,因此在团队需要时由工作区管理员开启。
筛选:filter 接受一个条件列表,每个条件形如 字段 运算符 值,例如 ["createdTime>=1767225600000", "createdTime<1767830400000"];条件之间是 AND 关系。订单、付款和退款的时间筛选每次请求最多覆盖 90 天,因此 AI 会把更长的时间段拆成 90 天的窗口。expand 在同一次调用中附带相关记录(逗号分隔)。
数据格式:列表以 {elements: [...], href} 返回。金额是商户币种的分为单位的整数(1999 = 19.99);折扣为负数金额。明细数量(unitQty)乘以了 1000。税率乘以了 100000(825000 = 8.25%)。时间是 UTC 的 Unix 毫秒时间戳;AI 会用 clover_get_merchant_properties 中的时区换算。ID 是 13 位字符串。
分页:使用 limit(默认 100,最多 1000)和 offset。当一页正好有 limit 条时,AI 会用 offset 加 limit 再次请求。通过 expand 获取的嵌套列表最多 100 条。
限制和常见错误:每个令牌每秒 16 个请求、同时 5 个请求;超出时 Clover 返回带 retry-after 的 429。401 表示令牌错误或已撤销,或 CLOVER_API_URL 的区域不对(沙箱令牌只能在 apisandbox.dev.clover.com 上使用)。403 表示令牌缺少该数据的权限:在 Merchant Dashboard 中编辑令牌并勾选该权限。404 表示商户 ID 或记录 ID 错误。400 通常表示筛选字段无效。
连接器不受理刷卡付款,也不发起退款:这些操作在 Clover 设备上或通过 Clover Ecommerce API 完成。税率、折扣、修饰项组、员工和班次只读不改,使用安装时开启的工具也不会删除任何内容。
步骤 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 — 在 Gemini 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
Clover的工具。
可用工具
| Tool | What it does |
|---|---|
clover_get_merchant | Get the merchant behind the token: business name, address, phone, website, owner and default currency |
clover_get_merchant_address | Get the business address of the merchant: street lines, city, state, zip and country, as stored in Clover |
clover_get_merchant_properties | Get merchant settings: default currency, time zone, locale, tips and tax settings, receipt and order options |
clover_list_order_types | List order types of the merchant (dine in, take out, delivery and custom ones) with label, taxable flag, fee and hours |
clover_list_roles | List the employee roles of the merchant (admin, manager, employee and custom roles) with their system role and employees |
clover_list_items | List inventory items with name, price, price type, SKU, code, cost, stock tracking and visibility |
clover_get_item | Get one inventory item by id with price, price type, SKU, code, cost and, when expanded, categories, tax rates, modifier groups and stock |
clover_create_item | Create an inventory item. price is in cents (1999 = 19.99) and required; priceType FIXED, VARIABLE (entered at sale) or PER_UNIT |
clover_update_item | Update an inventory item (Clover updates with POST): name, price in cents, SKU, code, cost, visibility or categories |
clover_list_item_stocks | List the stock of all inventory items: item id, quantity on hand (decimal) and the low-stock alert threshold |
clover_get_item_stock | Get the stock of one inventory item: quantity on hand, stock alert threshold and when it last changed |
clover_update_item_stock | Set the stock of an inventory item to a new absolute quantity (not a change) |
clover_list_categories | List item categories with name, sort order and colour; expand items to get the items in each category |
clover_get_category | Get one item category by id with name, sort order and colour; expand items to list its items |
clover_list_category_items | List the items in one category with price, SKU and, when expanded, stock, tax rates and modifier groups |
clover_create_category | Create an item category shown on the register, with a name, sort order and colour |
clover_update_category | Rename a category or change its sort order or colour (Clover updates with POST). name is required by the API |
clover_list_tax_rates | List tax rates with name, rate (in units of 1/100000, so 825000 = 8.25%), flat amount, type and whether it is the default |
clover_list_discounts | List the predefined discounts of the merchant: name, amount in cents (negative) or percentage |
clover_list_modifier_groups | List modifier groups (e.g |
clover_list_orders | List orders with state, total in cents, payment state, employee, order type and times |
clover_get_order | Get one order by id with total, state, payment state and, when expanded, line items, discounts, payments, refunds and customers |
clover_create_atomic_order | Create a complete order in one call from an order cart: line items (inventory items or ad hoc), modifiers, discounts and service charge… |
clover_calculate_order | Calculate an order cart without saving it: totals, taxes, discounts and service charges for the same cart as clover_create_atomic_order |
clover_create_order | Create an empty custom order (title, note, state, order type), then add lines with clover_add_line_item |
clover_update_order | Update an order (Clover updates with POST): title, note, state, order type or tax removal |
clover_list_order_line_items | List the line items of an order with name, price in cents, quantity, discounts, modifications and refund state |
clover_get_order_line_item | Get one line item of an order with name, price in cents, unit quantity, note, discounts and modifications |
clover_add_line_item | Add a line item to an order: an inventory item by id, or an ad hoc line with name and price in cents. unitQty is quantity x 1000 for… |
clover_void_line_item | Remove (void) a line item from an order |
clover_list_order_discounts | List the order-level discounts applied to an order with name, amount in cents or percentage and approver |
clover_add_order_discount | Apply a discount to a whole order: a name plus an amount in cents (negative, e.g. -500) or a percentage, or a predefined discount by id |
clover_delete_order | Delete an order |
clover_list_payments | List payments with amount, tip and tax in cents, result (SUCCESS, FAIL and so on), tender, card type, order and employee |
clover_get_payment | Get one payment by id with amount, tip, tax, cash back in cents, result, tender, card transaction details and refunds |
clover_list_order_payments | List the payments made on one order with amount, tip and tax in cents, result, tender and card details |
clover_list_employee_payments | List the payments taken by one employee, with amount, tip and tax in cents, result and tender |
clover_list_refunds | List refunds with amount and tax in cents, the payment and order they belong to, employee and time |
clover_get_refund | Get one refund by id with amount, tax and tip in cents, the refunded payment, line items and employee |
clover_list_tenders | List tenders (payment methods such as cash, credit card, debit card, check, gift card, external) with label, label key and whether enabled |
clover_get_tender | Get one tender (payment method) by id with label, label key, instructions and whether it opens the cash drawer |
clover_list_customers | List customers with name, customer since and marketing consent; expand emailAddresses, phoneNumbers and addresses for contact data |
clover_get_customer | Get one customer by id with name, customer since, marketing consent and, when expanded, emails, phone numbers, addresses and notes |
clover_create_customer | Create a customer with name, email addresses, phone numbers, addresses and marketing consent |
clover_update_customer | Update a customer (Clover updates with POST): name, marketing consent or metadata such as business name and note |
clover_delete_customer | Delete a customer with their contact data |
clover_list_employees | List employees with name, nickname, email, role, PIN-protected flags and custom id; expand roles or shifts |
clover_get_employee | Get one employee by id with name, nickname, email, role and, when expanded, roles and shifts |
clover_list_shifts | List clock-in and clock-out shifts of all employees with in time, out time and overrides |
clover_list_employee_shifts | List the clock-in and clock-out shifts of one employee with in time, out time and overrides, newest first |
示例提示
- “昨天的销售额和小费总共多少?按支付方式分开,用我们商户的时区统计。”
- “哪些启用了库存跟踪的商品剩余不到 10 件?显示名称、SKU 和数量。”
- “把商品 Cappuccino 的价格改为 4.20。保存前先给我看旧价格和新价格。”
- “计算一个包含 2 份玛格丽特披萨和 1 杯柠檬水、使用员工折扣的订单,先给我看总额,再创建订单。”
- “列出最近 30 天的退款,包括金额、原订单和员工。”
FAQ
Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?