Skip to main content
Glama
Sortance MCP

Sortance MCP

README.md
# Sortance MCP

<p align="center">
  <img src="assets/banner.svg" width="900" alt="Sortance: stop fake signups before they become users" />
</p>

<p align="center">
  <a href="https://registry.modelcontextprotocol.io/v0/servers?search=com.sortance"><img src="https://img.shields.io/badge/MCP%20Registry-com.sortance%2Fmcp-c67139?style=for-the-badge" alt="Official MCP Registry: com.sortance/mcp" /></a>
  <a href="https://sortance.com/docs/mcp"><img src="https://img.shields.io/badge/docs-sortance.com-2b2118?style=for-the-badge" alt="Docs" /></a>
  <br/>
  <img src="https://img.shields.io/badge/transport-Streamable%20HTTP-5a4a3c?style=flat-square" alt="Streamable HTTP" />
  <img src="https://img.shields.io/badge/auth-OAuth%202.1-5a4a3c?style=flat-square" alt="OAuth 2.1" />
  <img src="https://img.shields.io/badge/tools-10-5a4a3c?style=flat-square" alt="10 tools" />
  <img src="https://img.shields.io/badge/install-zero%20config-5a4a3c?style=flat-square" alt="Zero install" />
</p>

**Your AI agent checks every email address before it becomes a user, a lead or a bounce.**

```
https://api.sortance.com/mcp
```

Paste that URL into Claude, ChatGPT, Cursor, Codex, VS Code or any MCP client. Sign in once in the browser. Nothing to install, no API key to copy.

**Claude Code**
```bash
claude mcp add --transport http sortance https://api.sortance.com/mcp
```
or as a plugin, with the signup-integration skill included:
```
/plugin install sortance --marketplace wilsonbright/sortance-mcp
```

**Codex**
```bash
codex mcp add sortance --url https://api.sortance.com/mcp && codex mcp login sortance
```

More clients in [Install](#install).

---

Fake signups are cheap. A throwaway inbox takes four seconds. A typo like `gmial.com` takes none. Every one of them costs you something: a free trial burned, a welcome email that bounces, a sender reputation that drops, a "user" in your dashboard who never existed.

Your signup form checks that there's an `@`. That's it.

Sortance checks the address the way a fraud team would: does the domain receive mail at all, is it a known disposable provider, is it a typo of a real provider, does the name look made up, is it a shared `info@` inbox, does it break one of *your* rules. Then it gives one answer you can act on: **send, challenge, hold or drop**.

Now your agent can ask it directly.

<p align="center">
  <img src="assets/demo.svg" width="820" alt="Claude checking four signups with Sortance: one let in, two dropped, one held" />
</p>

## What you can ask

**Clean up today's signups.** *"Check the 40 signups from today and tell me which ones are fake."* Your agent runs `verify_email` on each and sorts them into let in, confirm first, and reject, with the reason for each one.

**Catch the typo before the user leaves.** *"Is sam.lee@gmial.com real?"* `screen_contact` says `gmial.com` has no mail server and suggests `gmail.com`. That's a real customer you would have lost to a welcome email that never arrived.

**Write rules in plain English.** *"Block disposable emails on signup, but let students with .edu addresses through."* The agent drafts the policy, replays it against your recent traffic with `check_policy_draft` so you see what would change, and activates it only when you say so.

**Manage your blocklist from chat.** *"Block everything from promo-mail.net and show me what else is on the list."* `update_blocklist` and `list_blocklist`.

**Know who signed up.** *"Who is jane@acme-robotics.com?"* `enrich_contact` returns the company, industry, size and the person's role when it can find them, and skips paid lookups for consumer mailboxes.

**Before a campaign.** *"Which of these 12 addresses will bounce?"* `verify_email` with `purpose: "outbound"` tunes the checks for sending instead of signup.

## Tools

| Tool | What it does | Changes anything? |
|------|--------------|-------------------|
| `verify_email` | The full check: syntax, mail server, disposable lists, AI read of the address, role/relay/agent mailboxes, your rules. Returns `recommendation` (send, challenge, hold, drop), a 0–100 `score`, a `verdict`, `email_type`, the ordered `checks` and the policy `decision`. | No |
| `check_email` | Free, fast domain pre-filter: syntax, MX, disposable lists, your block and allow lists. Never looks at the part before the `@`. Not counted against any quota. | No |
| `screen_contact` | Signup screening with the name the person typed: typo suggestions (`gmial.com` → `gmail.com`), placeholder addresses, fake-looking names, name/address mismatch. Answers allow or review, never deny. | No |
| `enrich_contact` | Person and company behind an address: name, title, seniority, LinkedIn, company, domain, industry, size, country, tech stack. Fields it can't find are `null`. | No |
| `get_policy_context` | Your active signup policy, the fields a rule can use, and the reference the agent needs to write rules. | No |
| `check_policy_draft` | Replays a draft policy against recent traffic so you see what it would allow, review and deny. | No |
| `save_policy_draft` | Saves a new draft version. Not live until activated. | Adds a draft |
| `activate_policy_version` | Makes a saved version the live signup policy. | **Yes** |
| `list_blocklist` | Your blocked and allowed domains and addresses. | No |
| `update_blocklist` | Adds to or removes from the blocklist or allowlist. | **Yes** |

Every tool carries `readOnlyHint` / `destructiveHint` annotations, so clients that ask before risky actions will ask before the two that change your live rules. Grant **Read-only** at sign-in and those two are not available at all.

### The four answers

| `recommendation` | Means | At signup you should |
|---|---|---|
| `send` | Nothing against the address | Let them in |
| `challenge` | Relay alias or agent mailbox. Real and deliverable | Let them in, or ask for one more step |
| `hold` | One fake signal, a shared `info@` inbox, or a mailbox provider doubts it | Require email confirmation before activating. Real people land here, so don't hard-reject |
| `drop` | No mail server, disposable, on your blocklist, bad syntax, or two fake signals agree | Reject |

`score` reads the same on every mail host: 0–5 is a hard fact (no mail server, disposable, blocked), ≤ 45 is one fake signal, ≥ 70 is nothing against it, ≥ 80 means the AI says it looks real or a mailbox provider confirmed it. Full ladder in [sortance.com/llms.txt](https://sortance.com/llms.txt).

## Install

The server is remote. There is nothing to download, run or update.

| Client | How |
|--------|-----|
| **Claude Code** | `claude mcp add --transport http sortance https://api.sortance.com/mcp`, or as a plugin (server + skill): `/plugin install sortance --marketplace wilsonbright/sortance-mcp` |
| **Claude.ai / Claude Desktop** | Settings → Connectors → Add custom connector → `https://api.sortance.com/mcp` |
| **ChatGPT** | Add a custom connector (developer mode) with the URL `https://api.sortance.com/mcp` |
| **Codex** | `codex mcp add sortance --url https://api.sortance.com/mcp` then `codex mcp login sortance` |
| **Cursor** | Copy [`clients/cursor.json`](clients/cursor.json) into `.cursor/mcp.json` |
| **VS Code (Copilot)** | Copy [`clients/vscode.json`](clients/vscode.json) into `.vscode/mcp.json` |
| **Windsurf** | Copy [`clients/windsurf.json`](clients/windsurf.json) into `~/.codeium/windsurf/mcp_config.json` |
| **Cline** | `cline mcp install sortance --transport http https://api.sortance.com/mcp` |
| **Gemini CLI** | `gemini extensions install https://github.com/wilsonbright/sortance-mcp` |
| **Anything else** | Any client that speaks Streamable HTTP: URL `https://api.sortance.com/mcp`, OAuth discovery at `/.well-known/oauth-protected-resource/mcp` |

The first call opens a browser to sign in with your email (a one-time code, no password) and pick the organisation the agent acts for. You choose **Full** or **Read-only** access.

### No browser? Use an API key

Servers, CI and headless agents can send a key instead of signing in. Open [sortance.com/app](https://sortance.com/app), copy your organisation's key, and set it as `SORTANCE_API_KEY`:

```json
{
  "mcpServers": {
    "sortance": {
      "url": "https://api.sortance.com/mcp",
      "headers": { "Authorization": "Bearer ${SORTANCE_API_KEY}" }
    }
  }
}
```

Never commit the key. It works only from the environment.

## Teach your coding agent to wire it in

The repo ships an [Agent Skill](skills/sortance/SKILL.md) that tells Claude Code, Codex, Cursor and friends how to add Sortance to a signup form correctly: which endpoint to call, what to do with each answer, and what not to hard-reject.

```bash
npx skills add wilsonbright/sortance-mcp -g
```

Then ask: *"Add Sortance to our signup form."*

Prefer code? [`examples/`](examples/) has a Next.js route handler, an Express middleware and a Python function, each about 30 lines.

## How it works

1. **Free gate first.** Syntax, DNS MX lookup, disposable-domain lists and your own block/allow lists. Cheap, cached, and settles most junk.
2. **Look at the address itself.** Role inboxes (`info@`, `sales@`), relay aliases (Apple Hide My Email, Firefox Relay), agent mailboxes, placeholder patterns (`test123@`), and an AI read of whether the part before the `@` looks like a real person.
3. **Mailbox providers when it matters.** Where a mailbox verification provider is configured, Sortance asks it only when the cheaper checks can't settle the answer. `mailbox_checked` tells you whether one did.
4. **Your rules last, and they win.** Your allowlist beats every check. Your policy can turn any field into allow, review, challenge or deny.

Every call is logged in your dashboard with its answer and the rule that decided it, so you can see exactly why someone was held.

## Honest limits

- **Nobody can prove a mailbox exists without sending to it.** Many providers (Microsoft 365, catch-all domains) accept every address at the door. When nothing checked the mailbox, `mailbox_checked` is `false` and a plausible-looking address that doesn't exist will read `send`. Keep email confirmation on.
- **`hold` is not `drop`.** Real people use `info@` addresses and odd-looking names. Hold them for confirmation; don't bounce them.
- **`check_email` judges the domain, not the person.** `admissions@indiana.edu` and `made-up-name@indiana.edu` get the same answer. Gate signups with `verify_email`.

## Data handling

- Before an address reaches storage, a log line or a metrics blob, it is replaced by a keyed hash under a deployment secret.
- Each call is scoped to one organisation. OAuth tokens last one hour, work only on `/mcp`, and are capped at the access level you granted. Membership is re-checked on every request.
- Read-only grants cannot change rules or blocklists.
- Details: [sortance.com/trust](https://sortance.com/trust).

## FAQ

**Is this open source?** This repository is the public home of the Sortance MCP server: its registry entry, client configs, agent skill and examples. The server itself is a hosted service; there is nothing to self-host.

**Does it cost anything?** You need a Sortance account. `check_email` is free and unmetered. `verify_email` counts against your organisation's monthly verification quota, and `screen_contact` against its screening allowance. See [sortance.com/pricing](https://sortance.com/pricing).

**Which mail providers does it understand?** Every answer names the mail host it detected (`esp`) and classifies the address as business, free (Gmail, Outlook, Yahoo, Apple and other consumer providers), role, disposable or relay (Apple Hide My Email, Firefox Relay, DuckDuckGo, SimpleLogin).

**Can I use it without an AI agent?** Yes: the same checks are a REST API. `POST https://api.sortance.com/v1/verify`. See the [quickstart](https://sortance.com/docs/quickstart).

**Where is it listed?** Official MCP Registry as [`com.sortance/mcp`](https://registry.modelcontextprotocol.io/v0/servers?search=com.sortance).

## Links

- Docs: [sortance.com/docs/mcp](https://sortance.com/docs/mcp)
- API reference: [sortance.com/docs/api](https://sortance.com/docs/api)
- For agents: [sortance.com/llms.txt](https://sortance.com/llms.txt)
- Dashboard: [sortance.com/app](https://sortance.com/app)
- Issues and requests: [open an issue](https://github.com/wilsonbright/sortance-mcp/issues)
- Security reports: see [SECURITY.md](SECURITY.md)

## License

The files in this repository (configs, skill, examples, docs) are [MIT](LICENSE). The Sortance service is governed by its own terms.