
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).
概览
本地 MCP 服务器,让助手读取并受控写入单个 Clover 商户的销售、库存、订单和客户数据。
- 可以做什么
- 读取商户资料、POS 配置、设备、支付方式、订单类型、营业时间、现金事件和 tipping 预设,银行字段和员工 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 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Clover POS,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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
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:
From source (for development):
Configuration
Copy .env.example to .env and fill in your values:
Required:
Optional:
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 toCLOVER_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. Runscripts/get_sandbox_token.pyto obtain tokens — it writes them straight to the store, so you only setCLOVER_AUTH_MODE,CLOVER_OAUTH_CLIENT_ID,CLOVER_OAUTH_CLIENT_SECRET, andCLOVER_MERCHANT_IDin.env(no token values needed). PastingCLOVER_ACCESS_TOKEN/CLOVER_REFRESH_TOKENinto.envstill 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
*_Wscopes 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:
Cursor setup
Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):
Required Clover permissions
Your token must have the following Clover permission scopes:
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 setCLOVER_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=SUCCESSpayment amounts.FAIL/AUTH/uncapturedPRE_AUTHare excluded. - Refunds come from the dedicated
/refundsendpoint (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 intopayment_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_salesvia payment totals. - Offline payments are included; a
noteflags 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
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 UTCtsrecords when; in multi-tenant mode atenantfield records who. No request bodies or secrets. Disable withCLOVER_AUDIT_LOG=false. -
Latency logging — set
CLOVER_LATENCY_LOG=trueto emit alatency_msline 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):
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版本历史
1- v0.7.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分