Clover POS

io.github.SBolivarLoL由 GitHub 帳號 SBolivarLoL 發布v0.7.0更新於 Oct 24, 2026

Clover POS for a single merchant: sales, inventory, orders, customers (reads + safe writes).

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理讀取並受控寫入單一 Clover 商家的銷售、庫存、訂單與客戶資料。

可以做什麼
讀取商家資料、POS 設定、裝置、付款方式、訂單類型、營業時間、現金事件與小費預設,銀行欄位與員工 PIN 不會回傳。彙總銷售、付款、退款、折抵、依員工的小費與分時段銷售,以及熱銷商品。瀏覽訂單歷史、未結訂單與訂單明細。查詢庫存、低庫存商品、目錄結構、稅費、折扣、修飾項與標籤。搜尋並讀取客戶、員工、班別與角色。建立或更新客戶、商品、分類、訂單、訂單明細、修飾項與標籤,調整價格、庫存數量或訂單折扣,支援 dry-run 預覽與確認。提供唯讀的 AI 輔助,例如銷售簡報、補貨建議與異常偵測。
適用情境
適合經營單一 Clover 商家、希望助理直接回答銷售、庫存與客戶問題,或在不開啟 Clover 後台的情況下做小幅目錄與訂單調整的情境。接入正式資料前先在沙盒測試。
執行需求
透過 uvx 從 PyPI 套件以 stdio 在本機執行,需要 Python 工具鏈。必須設定 CLOVER_MERCHANT_ID 與 CLOVER_ACCESS_TOKEN;可選 CLOVER_REGION、CLOVER_SANDBOX、CLOVER_AUTH_MODE,oauth_refresh 模式另需 CLOVER_OAUTH_CLIENT_ID、CLOVER_OAUTH_CLIENT_SECRET 與 CLOVER_REFRESH_TOKEN。權杖需具備對應的 Clover 權限範圍,並需要連線 Clover API 的網路。
安裝前請注意
寫入工具會修改正式商家資料:價格、庫存、客戶、商品、訂單與折扣。請使用最小權限權杖,先在沙盒測試,並考慮啟用 CLOVER_READ_ONLY 與寫入上限設定。伺服器持有 CLOVER_ACCESS_TOKEN、CLOVER_OAUTH_CLIENT_SECRET 與 CLOVER_REFRESH_TOKEN 等密鑰;oauth_refresh 模式下輪換後的權杖會寫入磁碟。它不能退款、收款或作廢付款,也不是 PCI-DSS 方案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Clover POS,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

clover-mcp

MCP server for the Clover POS REST API — gives AI assistants (Claude, Cursor, etc.) read and safe-write access to a Clover merchant's sales, inventory, orders, and customers.

[PyPI] [Python versions] [License: MIT]

Status: v0.7.0 released; working tree (unreleased) — 56 tools, 6 prompts, both auth modes, 399 tests. Runs locally (stdio, single merchant) or remotely over HTTP with OAuth, single- or multi-tenant (see docs/DEPLOY.md). Endpoint contracts are sandbox-verified in docs/endpoints.md.

⚠️ Independent project — not affiliated with, endorsed by, or sponsored by Clover Network, LLC or Fiserv, Inc. "Clover" is a trademark of its respective owner and is used here only nominatively to describe interoperability. Provided as is, without warranty — see Legal & disclaimer.

What it can do

  • Sales summaries, payment and refund reports
  • Inventory lookups and low-stock alerts
  • Order history and open-order inspection
  • Customer search and creation
  • Employee, shift, role, category, modifier, tax, tender, and device lookups; best-selling items
  • Pricing config lookups: discount catalogue, tip-suggestion presets, default service charge
  • Safe writes: update item prices, set stock quantities, create customers/items/categories/orders, add line items, update customers, rename items, apply order discounts, create modifier groups/modifiers/tags
  • AI tools (reason via your client's model — the server holds no LLM key): sales briefings, reorder suggestions, anomaly detection, category suggestions, customer-message drafts
  • Predefined prompt workflows: daily briefing, weekly sales report, inventory health check, end-of-day closeout, customer lookup, monthly tax summary

What it cannot do (by design): process refunds, capture payments, void charges, delete records. Those stay in the Clover dashboard.

Tools

ToolKindNotes
get_merchant_info / get_merchant_propertiesreadprofile + POS config (banking fields never returned)
get_sales_summaryreadaggregated window (see Sales summary semantics)
get_sales_by_employee / get_tips_by_employee / get_sales_by_hourreademployee attribution, tip-out, and merchant-local daypart reporting (PAYMENTS_R; employee names are best-effort)
list_payments / list_refunds / list_credits / list_tendersreadpayments, refunds, credits, tender types
list_orders / get_order / list_open_orders / list_order_typesreadorder history + detail
list_items / get_item / list_low_stock_itemsreadinventory + stock; get_item(include=[...]) opts in to modifier_groups/tax_rates/categories/tags association detail
list_categories / list_modifiers / list_taxes / list_item_groups / list_attributes / list_tags / list_discountsreadcatalog structure
list_tip_suggestions / get_default_service_chargereadtip presets + service-charge config
list_devices / list_opening_hours / list_cash_eventsreadterminals, hours, cash-drawer log
get_top_itemsreadbest-sellers by units in a window
list_employees / get_employee / list_shifts / list_active_shifts / list_rolesreadPINs never returned (EMPLOYEES_R)
search_customers / get_customerreadcards never returned
whoamireadmulti-tenant identity diagnostic (no secrets)
summarize_sales / inventory_reorder_suggestions / detect_sales_anomalies / suggest_item_categories / draft_customer_messageAIreason via your client's model; read-only suggestions
create_customer / update_customerwritedup-check + dry_run; update confirms via elicitation
create_item / create_category / create_order / add_line_itemwriteguarded: dry_run + confirm before writing
set_item_price_cents / set_item_stock_quantity / update_item_namewriteoptimistic-lock pre-check, bounds, dry_run
apply_order_discountwriteexactly one of percentage / amount_cents / catalogue_discount_id; negates positive amount_cents to Clover's required negative wire value; catalogue path resolves name+value client-side; dry_run preview includes a client-computed line-item subtotal
create_modifier_group / create_modifier / create_tagwritedup-guard (group/tag) or parent pre-check (modifier); guarded: dry_run + confirm before writing

Every tool carries MCP behaviour annotations (readOnlyHint / destructiveHint / idempotentHint) so clients can parallelize reads and prompt before writes.

Install

Published on PyPI — no clone needed:

bash
uvx clover-mcp          # run directly (recommended)# orpip install clover-mcp  # then launch with: clover-mcp

From source (for development):

bash
git clone https://github.com/SBolivarLoL/clover-mcp-servercd clover-mcp-serveruv pip install -e .

Configuration

Copy .env.example to .env and fill in your values:

bash
cp .env.example .env

Required:

VariableDescription
CLOVER_MERCHANT_IDYour Clover merchant ID
CLOVER_ACCESS_TOKENYour Clover API access token

Optional:

VariableDefaultDescription
CLOVER_REGIONnana, eu, or la
CLOVER_SANDBOXfalsetrue to use the Clover sandbox
CLOVER_AUTH_MODEtokentoken or oauth_refresh
CLOVER_READ_ONLYfalseRefuse every write before making a Clover request
CLOVER_WRITE_LIMIT_COUNT10Maximum writes per safety window; 0 disables, negative values are rejected
CLOVER_WRITE_LIMIT_WINDOW_S300Positive write-safety window in seconds

Auth modes

  • token — paste a static access token. Works for sandbox and single-merchant production use. If the token expires, regenerate it in the Clover Developer Dashboard.
  • oauth_refresh — the server auto-refreshes on expiry and persists the new token pair to CLOVER_TOKEN_STORE (default: ~/.config/clover-mcp/tokens.json, mode 0600). Clover refresh tokens are single-use, so the rotated pair is written back after each refresh. Run scripts/get_sandbox_token.py to obtain tokens — it writes them straight to the store, so you only set CLOVER_AUTH_MODE, CLOVER_OAUTH_CLIENT_ID, CLOVER_OAUTH_CLIENT_SECRET, and CLOVER_MERCHANT_ID in .env (no token values needed). Pasting CLOVER_ACCESS_TOKEN / CLOVER_REFRESH_TOKEN into .env still works as an alternative.

Use a least-privilege token. Grant only the permission scopes the tools you actually use require (see the table below). A read-only deployment needs no *_W scopes at all. Don't reuse a production token in sandbox or vice versa.

Claude Desktop setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "clover": {      "command": "uvx",      "args": ["clover-mcp"],      "env": {        "CLOVER_MERCHANT_ID": "your_merchant_id",        "CLOVER_ACCESS_TOKEN": "your_token",        "CLOVER_REGION": "na"      }    }  }}

Cursor setup

Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):

json
{  "mcpServers": {    "clover": {      "command": "uvx",      "args": ["clover-mcp"],      "env": {        "CLOVER_MERCHANT_ID": "your_merchant_id",        "CLOVER_ACCESS_TOKEN": "your_token"      }    }  }}

Required Clover permissions

Your token must have the following Clover permission scopes:

PermissionUsed by
MERCHANT_Rget_merchant_info
ORDERS_Rlist_orders, get_order, list_open_orders
PAYMENTS_Rlist_payments, list_refunds, list_credits, get_sales_summary, get_sales_by_employee, get_tips_by_employee, get_sales_by_hour
ORDERS_R…also get_top_items
INVENTORY_Rlist_items, get_item, list_low_stock_items, list_categories, list_modifiers, list_taxes, list_discounts, list_item_groups, list_attributes, list_tags
INVENTORY_Wset_item_price_cents, set_item_stock_quantity, create_item, create_category, update_item_name, create_modifier_group, create_modifier, create_tag
ORDERS_Wcreate_order, add_line_item, apply_order_discount
CUSTOMERS_Rsearch_customers, get_customer
CUSTOMERS_Wcreate_customer, update_customer
EMPLOYEES_Rlist_employees, get_employee, list_shifts, list_active_shifts, list_roles (optional)
MERCHANT_R…also list_devices, list_tenders, list_order_types, list_opening_hours, list_cash_events, list_tip_suggestions, get_default_service_charge

Read scopes (*_R) are probed at startup; the server warns about any missing ones (it no longer exits — a hosted server must still start) and the affected tools return a 403 when called. EMPLOYEES_R is optional. Write scopes (*_W) are not probed (a probe would mutate data) — a missing write scope surfaces as a 403 the first time you call that tool. Permission changes on a Clover app require the merchant to reinstall the app.

Remote / hosted (v2)

By default this runs locally over stdio for a single merchant. To run it remotely:

  • FastMCP Cloud / Horizon (easiest): deploy with entrypoint server.py:mcp, enable the platform's built-in auth, and set single-merchant Clover env vars. The platform handles OAuth, HTTPS, and transport — no IdP setup, and do not set CLOVER_TRANSPORT/CLOVER_AUTH_* (that path needs an IdP and will fail).
  • Self-host: use server.py:create_server, which makes clover-mcp an OAuth 2.1 resource server (validates your IdP's JWTs, publishes Protected Resource Metadata per RFC 9728, routes by token claim) and refuses to start without an IdP so it can't run open.

Full setup for both in docs/DEPLOY.md. How SSO/SAML, SCIM, audit, and multi-tenant authorization fit: docs/enterprise-identity.md.

Sales summary semantics

get_sales_summary makes the accounting explicit so the LLM can explain it:

  • Gross = sum of result=SUCCESS payment amounts. FAIL/AUTH/uncaptured PRE_AUTH are excluded.
  • Refunds come from the dedicated /refunds endpoint (Clover refunds are separate objects with a positive amount, not negative payments). Voids are counted from voided payments. Both are reported separately (refund_count/refund_amount, void_count) — never netted into payment_count. net_sales = gross_sales - refund_amount.
  • Tips and taxes are broken out as their own line items.
  • Service charges are not reported separately: Clover exposes them on the order only as a percentage (no computed amount), and what customers actually paid is already in gross_sales via payment totals.
  • Offline payments are included; a note flags the window when any are present.
  • Currency comes from the merchant record, never defaulted.
  • Windows longer than 90 days are split and concatenated transparently.

Development

bash
uv pip install -e ".[dev]"pytestruff check src/ tests/ scripts/ruff format --check src/ tests/ scripts/mypy src/clover_mcp/

Correctness eval + latency/load benchmark against a sandbox: uv run python scripts/benchmark.py — methodology, results, and failure analysis in docs/eval.md.

Architecture (diagrams + module map): docs/ARCHITECTURE.md. Run a 5-minute demo: uv run python scripts/demo.py (or the runbook in docs/DEMO.md).

Observability

All observability output goes to stderr (stdout carries the MCP stdio protocol).

  • Audit logging (on by default) — every write emits one structured JSON line: {"ts":"2026-07-02T…Z","audit":"write","method":"PUT","path":"/items/…","status":200,"merchant":"…"}. The UTC ts records when; in multi-tenant mode a tenant field records who. No request bodies or secrets. Disable with CLOVER_AUDIT_LOG=false.

  • Latency logging — set CLOVER_LATENCY_LOG=true to emit a latency_ms line per Clover HTTP call.

  • Distributed tracing (optional) — install the OpenTelemetry extra and point it at your collector; every Clover call becomes a span. Without it, tracing is a zero-cost no-op (no dependency added):

    bash
    uv pip install -e ".[otel]"export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317export OTEL_SERVICE_NAME=clover-mcp

Security

See SECURITY.md for the vulnerability disclosure policy.

Legal & disclaimer

This is not legal advice. The notes below describe the project's intent and the operator's responsibilities.

  • Not affiliated. This is an independent, community project. It is not affiliated with, endorsed by, or sponsored by Clover Network, LLC or Fiserv, Inc. "Clover" and related marks are trademarks of their respective owners and are used here only nominatively — to state that this software interoperates with the Clover REST API. No Clover logos or branding are used.
  • No warranty / no liability. The software is provided "AS IS" under the MIT License, without warranty of any kind. The authors are not liable for any claim, damage, or loss arising from its use — including incorrect data, unintended writes, downtime, or API changes outside the authors' control.
  • You operate it; you're responsible. You run this server with your own Clover account and API credentials. You are solely responsible for: complying with Clover's developer/API terms and trademark-usage policy; safeguarding your tokens; and meeting any data-protection (e.g. GDPR/CCPA) and tax obligations for data you access. The write tools modify live merchant data — test in the sandbox first and use least-privilege tokens.
  • No card data, no payments. The server never handles payment card data (the shaping layer blocks it) and deliberately cannot capture payments, refund, or void. It is not a PCI-DSS solution.
  • Third-party API. This project only calls Clover's public REST API using the operator's credentials; it bundles no Clover SDK or proprietary code. Clover may change or restrict its API at any time, which may break functionality.

License

MIT — see LICENSE.

來源:README.md,提交 280f411

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.7.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分