Skip to main content
C

ClearSale

@codespar/mcp-clearsale Β· v0.2.0-alpha.3

πŸ‡§πŸ‡· BrazilFraud & RiskAuth Β· API Keybeta18 tools2 env varsprerelease

Brazilian fraud prevention pioneer (founded 2001). Order risk scoring, device fingerprinting, chargeback feedback. Alpha release on npm β€” endpoints pending validation against contract-gated ClearSale developer portal.

Get started Β· freeView docs

MIT Β· runs locally with your own credentials

Limitations

  • v0.2.0-alpha.3 is a prerelease; npm has no stable release of this package.
  • Hosted calls with a test key are not available: the runtime has not recorded this provider's test behaviour (test venue unclassified).
Package
@codespar/mcp-clearsale
Version
0.2.0-alpha.3 Β· prerelease
npm dist-tag
latest
Category
Fraud & Risk
Auth
API Key
Country
πŸ‡§πŸ‡· Brazil
License
MIT
Transport
stdio Β· streamable-http

Quickstart

Install, set the credentials, make the first call.

Pick your client. The server runs locally over stdio, with your own credentials.

Add the server to your clientOne config entry. No build step, no SDK required.
Set the environment variables2 variables read by this server's code, listed below.
Restart and make the first callThe agent can call any of the 18 tools. Try send_order_for_analysis first.
terminal
# Claude Code claude mcp add clearsale -e CLEARSALE_API_KEY=… -e CLEARSALE_BASE_URL=… -- npx -y @codespar/mcp-clearsale@0.2.0-alpha.3 # then: /mcp to confirm the server is connected
Environment variables2 variables
CLEARSALE_API_KEYClearSale API key / bearer token used in the Authorization headerrequiredsecret
CLEARSALE_BASE_URLClearSale API base URL. Defaults to https://api.clearsale.com.br (prod). Override per contract-issued staging URL.optional

Names read from the package code (@codespar/mcp-clearsale@0.2.0-alpha.3). Descriptions and flags come from its manifest. Self-hosted, you hold the credentials.

First call demosend_order_for_analysis

"Submit an order to ClearSale for fraud analysis. Returns a score"

tools/callsend_order_for_analysisresult returned

Tools

What your agent can call.

18 tools, as the package's tools/list returns them.

send_order_for_analysis

Submit an order to ClearSale for fraud analysis. Returns a score (0-100) and a decision (APROVADO / REPROVADO / EM_ANALISE). Include as much signal as possible β€” billing + shipping, IP, device, items, and payment β€” to improve the decision.

get_order_analysis

Retrieve the current analysis state of an order previously sent to ClearSale. Useful when the initial response was EM_ANALISE and the decision is made asynchronously.

update_order_status

Notify ClearSale of the merchant's final decision on an order (APROVADO / CANCELADO / DEVOLVIDO). This feeds the ML model and is required for accurate future decisions on the same buyer.

list_orders

List orders submitted to ClearSale with optional filters. Use for dashboards, reconciliation, and reviewing pending manual decisions.

create_chargeback_notification

Report a confirmed chargeback back to ClearSale. Critical for model tuning: unreported chargebacks degrade future decision quality for similar buyers.

get_order_score

Fetch only the fraud score (numeric 0-100) for an order. Lighter than get_order_analysis when the full decision envelope isn't needed.

create_device_fingerprint_session

Start a device fingerprint session. Returns a session_token the client embeds via ClearSale's browser JS SDK to capture device characteristics. Pass the same session_id into send_order_for_analysis to link the device to the order.

get_device_fingerprint

Retrieve captured device characteristics for a fingerprint session (OS, browser, timezone, canvas/WebGL hash, suspected emulator, etc).

resolve_manual_review

Manually resolve an order currently in EM_ANALISE by approving or declining it. Use when an analyst overrides ClearSale's pending decision. The decision is fed back into the model.

get_score_by_document

Look up the risk score and historical signals associated with a Brazilian document (CPF or CNPJ). Use for pre-checkout screening or onboarding.

get_score_by_contact

Look up the risk score for a contact identifier (email or phone). Use for account-takeover screening at login or password reset.

validate_document

KYC: validate a CPF or CNPJ against Receita Federal. Returns registration status (REGULAR / SUSPENSA / CANCELADA / NULA / PENDENTE) and, when authorized, holder name and birth date.

Names and descriptions come from the package's tools/list (@codespar/mcp-clearsale@0.2.0-alpha.3). A kind (read, write, delete) is shown only when the package annotates its tools or each tool was verified one by one; neither exists for this server yet.

Compatibility

MCP is a protocol. Any client that speaks it can mount this server.

codespar_discover lists this server's tools, but a project with a test key cannot call them yet: the runtime has not recorded what this provider does in test mode, and refuses rather than guess.

Protocol

Any MCP client

stdio Β· streamable-http

Questions

Before you install.

How do I install the ClearSale MCP server?

Run npx -y @codespar/mcp-clearsale@0.2.0-alpha.3 and add the config block above to your MCP client: Claude Code, Cursor, Claude Desktop, VS Code, or any MCP-compatible client. No build step, no SDK required.

What can my agent do with ClearSale?

ClearSale exposes 18 tools for fraud & risk. Your agent calls them directly; the full list is above.

How does ClearSale authenticate, and how are credentials stored?

ClearSale uses API Key. Self-hosted, you hold the credentials: the server reads them from its environment variables.

How does ClearSale handle upstream API changes?

Every server is versioned independently on npm. The command on this page pins 0.2.0-alpha.3, the version whose tools are listed here; your agent keeps running it until you change the version.

Is ClearSale open source? How do I report a bug?

Yes. ClearSale is MIT-licensed and published on npm as @codespar/mcp-clearsale, source on GitHub (link in the Details panel). Report issues on the package repository; security issues go to security@codespar.dev, and we respond within 24 hours.

Pairs well with

Fraud & Risk Β· same category.

K

Konduto

@codespar/mcp-konduto Β· 18 tools

BR fraud analytics β€” more API-first than ClearSale. Order analysis, blocklist/allowlist/review-list management, chargeback feedback via status updates. Bundle with ClearSale for score comparison or failover. Alpha on npm β€” 3 brief endpoints not in public docs; core verified against docs.konduto.com.

Open
S

Sift

@codespar/mcp-sift Β· 20 tools

Global ML-based fraud detection β€” events + scores + decisions + labels feedback. Alpha on npm β€” paths verified against SiftScience/sift-ruby SDK.

Open
L

Legiti

@codespar/mcp-legiti Β· 18 tools

BR ticketing-native fraud prevention (formerly Inspetor, SΓ£o Paulo). 4th fraud entry. Order evaluation + Collection API for events/accounts/auth tracking. Alpha on npm β€” public docs thinner than ClearSale/Konduto; tool shapes match docs-backend repo.

Open

Start in seconds.

Add the config above, set the variables, and your agent calls the tools.

Start in seconds demo
Add the server to your client with the config above.
Set the environment variables listed above.
Ask your agent for the first call.
ClearSale β€” MCP server Β· 18 tools | CodeSpar