# io.github.codespar/mcp-clearsale (npm · @codespar/mcp-clearsale)

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

- Trust score: 69/100 (medium)
- Change this week: +24
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-04

## Components

- npm · `@codespar/mcp-clearsale`: 69/100 (this document), [markdown](https://verifymcp.io/servers/codespar-mcp-clearsale/codespar-mcp-clearsale.md), [page](https://verifymcp.io/servers/codespar-mcp-clearsale/codespar-mcp-clearsale)

## Channel facts

- Registry: `npm`
- Package: `@codespar/mcp-clearsale`
- Version: `0.2.0-alpha.3`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-04.

- **Supply Chain Security**: 86/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (94 of 98), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 42 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 74/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 2135 tokens (~118/item across 18 items; 18 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 30/100
  - Stability observed for 9 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add codespar-mcp-clearsale -- npx -y @codespar/mcp-clearsale
```

### Codex

```bash
codex mcp add codespar-mcp-clearsale -- npx -y @codespar/mcp-clearsale
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "codespar-mcp-clearsale": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@codespar/mcp-clearsale"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add codespar-mcp-clearsale --command npx --arg -y --arg @codespar/mcp-clearsale
```

### Hermes

```yaml
mcp_servers:
  codespar-mcp-clearsale:
    command: "npx"
    args: ["-y", "@codespar/mcp-clearsale"]
```

### Other

```json
{
  "mcpServers": {
    "codespar-mcp-clearsale": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-clearsale"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 69, +1)

No change was recorded against any check on this day. Stability & Change Management went from 23 to 27. That category is still filling its 30-day observation window: 7 days of observed history at the previous scan, 8 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 68, +48)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [functional improvement] Schema quality: unverified → excellent
- [functional improvement] License: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Stability: unverified → 0.23
- [functional improvement] Tool coverage: unverified → 100
- [functional] Licence: MIT

### 2026-08-01 (score 20, 0)

- [security improvement] Malware scan: unverified → pass
- [functional regression] Tool coverage: 100 → unverified

### 2026-07-31 (score 20, −4)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 24, −21)

- [functional regression] Tool coverage: 100 → unverified
- [functional] First check of Schema quality: unverified

### 2026-07-27 (score 45)

First indexed and scored.

## MCP tools (18)

### `send_order_for_analysis` (~349 tokens)

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.

Input parameters:

- `customer_billing` (object, required): Billing customer: name, document (CPF/CNPJ), birth_date, phone, and address fields (street, number, city, state, zip_code).
- `customer_shipping` (object, required): Shipping customer: name, document, phone, and address fields. Same schema as customer_billing.
- `date` (string, required): Order creation timestamp in ISO-8601 (e.g. 2026-04-21T14:32:00Z)
- `email` (string, required): Buyer's email address
- `id` (string, required): Merchant-side order id (must be unique and stable — used to correlate future status updates and chargebacks)
- `ip` (string, required): Buyer's IP address at order time (IPv4 or IPv6)
- `items` (array, required): Line items: each with sku, name, category, quantity, unit_price.
- `payment` (array, required): One or more payment methods used on this order (card, boleto, pix). Card details MUST be tokenized — never pass a raw PAN.
- `session_id` (string): Optional device fingerprint session_id from create_device_fingerprint_session. Dramatically improves decision quality.
- `total_items` (number, required): Number of items in the order
- `total_order` (number, required): Total order amount in BRL (major units, e.g. 199.90)

### `get_order_analysis` (~56 tokens)

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.

Input parameters:

- `id` (string, required): Merchant-side order id used in send_order_for_analysis

### `update_order_status` (~101 tokens)

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.

Input parameters:

- `id` (string, required): Merchant-side order id
- `reason` (string): Free-text reason for the status change (recommended for CANCELADO and DEVOLVIDO)
- `status` (string, required): Merchant's final decision for this order

### `list_orders` (~136 tokens)

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

Input parameters:

- `end_date` (string): Inclusive upper bound, ISO-8601 date (YYYY-MM-DD)
- `filters` (object): Additional pass-through filters serialized as query params
- `page` (number): Page number (starts at 1)
- `per_page` (number): Page size
- `start_date` (string): Inclusive lower bound, ISO-8601 date (YYYY-MM-DD)
- `status` (string): Filter by decision status (APROVADO, REPROVADO, EM_ANALISE)

### `create_chargeback_notification` (~111 tokens)

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

Input parameters:

- `amount` (number, required): Chargeback amount in BRL (major units)
- `chargeback_date` (string, required): Date the chargeback was confirmed (ISO-8601 date)
- `chargeback_reason` (string, required): Issuer / acquirer reason code or free-text reason
- `order_id` (string, required): Merchant-side order id the chargeback applies to

### `get_order_score` (~50 tokens)

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

Input parameters:

- `id` (string, required): Merchant-side order id

### `create_device_fingerprint_session` (~110 tokens)

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.

Input parameters:

- `ip` (string, required): Client IP observed at session start
- `session_id` (string, required): Merchant-generated session id (UUID recommended). Reuse this value in send_order_for_analysis.session_id.
- `user_agent` (string, required): Browser User-Agent header observed at session start

### `get_device_fingerprint` (~53 tokens)

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

Input parameters:

- `session_id` (string, required): session_id originally passed to create_device_fingerprint_session

### `resolve_manual_review` (~107 tokens)

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.

Input parameters:

- `analyst` (string): Analyst username or id who made the decision (recommended for audit)
- `decision` (string, required): Analyst's manual decision
- `id` (string, required): Merchant-side order id of the order in EM_ANALISE
- `reason` (string): Free-text rationale for the manual decision

### `get_score_by_document` (~80 tokens)

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

Input parameters:

- `document` (string, required): CPF (11 digits) or CNPJ (14 digits). Punctuation is stripped server-side.
- `document_type` (string): Document type. If omitted, inferred from length.

### `get_score_by_contact` (~87 tokens)

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

Input parameters:

- `email` (string): Email address to score. One of email or phone is required.
- `phone` (string): Phone number in E.164 (e.g. +5511999998888). One of email or phone is required.

### `validate_document` (~121 tokens)

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.

Input parameters:

- `birth_date` (string): Holder's birth date (YYYY-MM-DD). Required by Receita for CPF cross-checks.
- `document` (string, required): CPF (11 digits) or CNPJ (14 digits). Punctuation is stripped server-side.
- `document_type` (string): Document type. If omitted, inferred from length.

### `validate_address` (~126 tokens)

KYC: validate a Brazilian postal address against the Correios database. Confirms zip_code → street/neighborhood/city/state and flags mismatches.

Input parameters:

- `city` (string): City
- `complement` (string): Apartment / unit / complement
- `neighborhood` (string): Bairro
- `number` (string): Street number
- `state` (string): State (UF, 2-letter code)
- `street` (string): Street / logradouro to cross-check against the CEP
- `zip_code` (string, required): CEP (8 digits). Punctuation is stripped server-side.

### `track_behavior_event` (~158 tokens)

Log a behavior signal (page view, login, signup, custom event) tied to a fingerprint session. Behavior data sharpens decisions on subsequent send_order_for_analysis calls.

Input parameters:

- `event_name` (string): Free-form event name (required when event_type=custom)
- `event_type` (string, required): Type of behavior event
- `properties` (object): Arbitrary key/value properties attached to the event
- `session_id` (string, required): Fingerprint session_id to attach the event to
- `timestamp` (string): Event timestamp in ISO-8601. Defaults to server receive time.
- `url` (string): Page URL for page_view events
- `user_id` (string): Authenticated user id, if known at event time

### `issue_challenge` (~117 tokens)

Issue an authentication challenge (OTP via SMS/email or KBA question) to a buyer. Use as a step-up after EM_ANALISE or for high-risk flows.

Input parameters:

- `channel` (string, required): Delivery channel for the challenge
- `destination` (string): Phone (E.164) or email — required for sms/email/whatsapp
- `locale` (string): BCP-47 locale for the challenge copy (default pt-BR)
- `order_id` (string): Order id the challenge is associated with (optional but recommended)

### `validate_challenge_response` (~68 tokens)

Verify a buyer's response to a challenge issued via issue_challenge. Returns whether the response is valid and how many attempts remain.

Input parameters:

- `challenge_id` (string, required): challenge_id returned by issue_challenge
- `response` (string, required): OTP code or KBA answer submitted by the buyer

### `create_case` (~125 tokens)

Open a fraud investigation case (e.g. for a suspicious cluster of orders or a confirmed fraud ring). Cases group orders, evidence, and analyst notes.

Input parameters:

- `assignee` (string): Analyst username or id to assign the case to
- `description` (string): Detailed description of the suspected fraud pattern
- `order_ids` (array): Order ids to attach to the case
- `priority` (string): Case priority
- `tags` (array): Tags for filtering (e.g. ring, takeover, friendly_fraud)
- `title` (string, required): Short case title

### `update_case` (~113 tokens)

Update an existing fraud investigation case — change status, add notes, reassign, or attach more orders.

Input parameters:

- `add_order_ids` (array): Order ids to attach to the case
- `assignee` (string): Reassign the case to this analyst
- `case_id` (string, required): Case id returned by create_case
- `note` (string): Append a free-text note to the case timeline
- `status` (string): New case status
- `tags` (array): Replace the case's tag list

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/codespar-mcp-clearsale/codespar-mcp-clearsale#diagnostics

## Score history

- 2026-08-04: 69
- 2026-08-03: 69
- 2026-08-02: 68
- 2026-08-01: 20
- 2026-07-31: 20
- 2026-07-30: 24
- 2026-07-28: 45
- 2026-07-27: 45

## Links

- npm package: https://www.npmjs.com/package/@codespar/mcp-clearsale
- Socket report: https://socket.dev/npm/package/@codespar/mcp-clearsale
- Repository: https://github.com/codespar/mcp-dev-latam
- Changelog RSS feed: https://verifymcp.io/servers/codespar-mcp-clearsale/codespar-mcp-clearsale/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/codespar-mcp-clearsale/codespar-mcp-clearsale/changelog.json
- HTML version of this page: https://verifymcp.io/servers/codespar-mcp-clearsale/codespar-mcp-clearsale
