# mcp-clearsale

Connects your coding agent to ClearSale for fraud screening and Brazilian buyer verification. Handy for online stores selling in Brazil.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/fraud/clearsale
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-clearsale

## What it does

The server exposes 18 tools to manage ecommerce risk workflows directly from your agent. It lets the model submit shopping carts for evaluation, fetch risk scores on a 0 to 100 scale, and return merchant resolutions like order cancellations or approvals. It also handles Brazilian KYC, including checking CPFs and CNPJs with Receita Federal or verifying delivery addresses against Correios.

Integration needs a token passed in `CLEARSALE_API_KEY`. Staging endpoints go into `CLEARSALE_BASE_URL`. You cannot test this without a formal contract because ClearSale provides no public sandbox. The package runs over stdio by default, but you can switch to HTTP using `MCP_HTTP=true` and `MCP_PORT=3000`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `CLEARSALE_API_KEY`, `CLEARSALE_BASE_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env CLEARSALE_API_KEY=<CLEARSALE_API_KEY> --env CLEARSALE_BASE_URL=<CLEARSALE_BASE_URL> --transport stdio clearsale -- npx -y @codespar/mcp-clearsale
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add clearsale --env CLEARSALE_API_KEY=<CLEARSALE_API_KEY> --env CLEARSALE_BASE_URL=<CLEARSALE_BASE_URL> -- npx -y @codespar/mcp-clearsale
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "clearsale": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-clearsale"
            ],
            "env": {
                "CLEARSALE_API_KEY": "<CLEARSALE_API_KEY>",
                "CLEARSALE_BASE_URL": "<CLEARSALE_BASE_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "clearsale": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-clearsale"
            ],
            "env": {
                "CLEARSALE_API_KEY": "<CLEARSALE_API_KEY>",
                "CLEARSALE_BASE_URL": "<CLEARSALE_BASE_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CLEARSALE_API_KEY=<CLEARSALE_API_KEY> -e CLEARSALE_BASE_URL=<CLEARSALE_BASE_URL> clearsale npx -y @codespar/mcp-clearsale
```
Replace <…> with your own values

## When to use it
- evaluate transaction fraud risk before shipping goods
- verify CPF or CNPJ identity numbers via official Brazilian registries
- send dispute notices and chargebacks back to the risk engine
- trigger SMS or email authentication challenges for suspicious shoppers

## Example prompts
- Submit order 4921 to ClearSale and return the fraud score
- Verify this shipping address against Correios records
- Report a confirmed chargeback for transaction 8812

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109
- [Robin: AI-Powered Dark Web OSINT](https://affpapa.org/en/nevibecode/mcp/robin-ai-powered-dark-web-osint.md) — MCP server · ★ 7658
- [jshookmcp](https://affpapa.org/en/nevibecode/mcp/jshookmcp.md) — MCP server · ★ 2061
- [OpenOSINT](https://affpapa.org/en/nevibecode/mcp/openosint.md) — MCP server · ★ 1802

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
