Mcp Clearsale

io.github.codespar由 GitHub 帳號 codespar 發布v0.2.0-alpha.3更新於 Oct 24, 2026

MCP server for ClearSale — Brazilian fraud prevention, order risk scoring, device fingerprinting

概覽

AI 產生的概覽

讓助理把訂單提交給 ClearSale 進行巴西反詐欺評分、取得決策結果,並處理相關的 KYC 與案件流程。

可以做什麼
把 ClearSale 反詐欺 API 包裝成 18 個工具,涵蓋「分析—決策—回饋」流程:send_order_for_analysis 提交訂單,get_order_analysis 與 get_order_score 回傳訂單狀態與 0-100 風險分數,update_order_status 回報商家的最終決定。另外也支援裝置指紋工作階段、行為事件追蹤、CPF/CNPJ 與地址驗證、依證件或聯絡方式查詢評分、OTP/KBA 驗證、拒付通知以及詐欺調查案件管理。
適用情境
當助理需要處理巴西電商訂單的 ClearSale 反詐欺決策時使用,例如提交訂單分析、輪詢或回報訂單結果,或查詢某個證件、聯絡方式的風險訊號。它面向已與 ClearSale 簽約的商家,而非一般用途。
執行需求
透過 npm 套件 @codespar/mcp-clearsale 以 stdio 在本機執行(需要 Node.js;npx @codespar/mcp-clearsale)。需要 ClearSale 簽發的 bearer token,放在 CLEARSALE_API_KEY 中;可選 CLEARSALE_BASE_URL,預設指向正式環境 API,可改為合約提供的測試網址。需要連線至 ClearSale 的網路,且沒有公開沙箱。
安裝前請注意
此伺服器在 CLEARSALE_API_KEY 中保存 ClearSale bearer token,可存取訂單、付款與客戶資料,應視為敏感密鑰。多個工具會寫入 ClearSale 或改變訂單狀態,包括 send_order_for_analysis、update_order_status、resolve_manual_review、create_chargeback_notification 以及案件相關工具。提交訂單與依證件、聯絡方式查詢會把客戶與訂單資料傳送給 ClearSale,驗證工具還可能向買家發送 OTP 訊息。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

@codespar/mcp-clearsale

MCP server for ClearSale — Brazilian fraud prevention.

ClearSale pioneered fraud analytics in Brazil (founded 2001, São Paulo) and remains the default antifraud layer for most major BR ecommerce. This is the first entry in the CodeSpar fraud category — no other server in the catalog does fraud scoring. Future entries (Konduto, Legiti, Sift, Cybersource) will follow the same analyze → decide → feedback shape.

Tools (18)

ToolPurpose
send_order_for_analysisSubmit an order to ClearSale for fraud analysis.
get_order_analysisRetrieve the current analysis state of an order previously sent to ClearSale.
update_order_statusNotify ClearSale of the merchant's final decision on an order (APROVADO / CANCELADO / DEVOLVIDO).
list_ordersList orders submitted to ClearSale with optional filters.
create_chargeback_notificationReport a confirmed chargeback back to ClearSale.
get_order_scoreFetch only the fraud score (numeric 0-100) for an order.
create_device_fingerprint_sessionStart a device fingerprint session.
get_device_fingerprintRetrieve captured device characteristics for a fingerprint session (OS, browser, timezone, canvas/WebGL has...
resolve_manual_reviewManually resolve an order currently in EM_ANALISE by approving or declining it.
get_score_by_documentLook up the risk score and historical signals associated with a Brazilian document (CPF or CNPJ).
get_score_by_contactLook up the risk score for a contact identifier (email or phone).
validate_documentKYC: validate a CPF or CNPJ against Receita Federal.
validate_addressKYC: validate a Brazilian postal address against the Correios database.
track_behavior_eventLog a behavior signal (page view, login, signup, custom event) tied to a fingerprint session.
issue_challengeIssue an authentication challenge (OTP via SMS/email or KBA question) to a buyer.
validate_challenge_responseVerify a buyer's response to a challenge issued via issue_challenge.
create_caseOpen a fraud investigation case (e.g.
update_caseUpdate an existing fraud investigation case — change status, add notes, reassign, or attach more orders.

Install

bash
npm install @codespar/mcp-clearsale@alpha

Environment

bash
CLEARSALE_API_KEY="..."    # Bearer token issued by ClearSaleCLEARSALE_BASE_URL="..."   # Optional. Defaults to https://api.clearsale.com.br. Override per contract-issued staging URL.

Authentication

Server-side Bearer token:

Authorization: Bearer <CLEARSALE_API_KEY>

ClearSale issues the token via the developer portal or through your commercial contract. There is no public sandbox — staging URLs are provisioned per contract; override CLEARSALE_BASE_URL to point at it.

Typical flow

  1. On page load, the merchant calls create_device_fingerprint_session and embeds ClearSale's browser JS using the returned session_token.
  2. At checkout, the merchant calls send_order_for_analysis with the same session_id plus full order, payment, items, and billing/shipping data.
  3. The response carries a decision: APROVADO (ship it), REPROVADO (block), or EM_ANALISE (poll get_order_analysis or wait for a webhook).
  4. Once the order lifecycle completes, call update_order_status with the final merchant decision — this is required for ongoing model quality.
  5. If a chargeback arrives later, call create_chargeback_notification so ClearSale can tune its model.

Run

bash
# stdio (default — for Claude Desktop, Cursor, etc)npx @codespar/mcp-clearsale
# HTTP (for server-to-server testing)MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-clearsale

Category

fraud — first server in this CodeSpar category. Fraud servers share a common shape (analyze → decide → feedback) distinct from payments, which makes cross-provider swaps (ClearSale ↔ Konduto ↔ Legiti) more straightforward than cross-acquirer swaps.

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

來源:packages/fraud/clearsale/README.md,提交 d0a519a

工具

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

版本歷史

1
  1. v0.2.0-alpha.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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