Metadata-Version: 2.4
Name: clearsigned-mcp
Version: 0.1.0
Summary: MCP server for Clearsigned: calibrated claim verification for AI agents, paid per call over x402, receipts verified offline.
License: MIT
Project-URL: Homepage, https://clearsigned.com
Project-URL: Repository, https://github.com/diawest82/clearsigned-mcp
Project-URL: Documentation, https://clearsigned.com/llms.txt
Project-URL: Live quality, https://clearsigned.com/quality
Keywords: mcp,x402,verification,fact-checking,agents,calibration
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=2.0
Requires-Dist: x402[evm]>=2.19
Requires-Dist: httpx>=0.27
Requires-Dist: eth-account>=0.13
Requires-Dist: cryptography>=42
Dynamic: license-file

# clearsigned-mcp

An MCP server that gives any agent a `verify_claim` tool: calibrated claim verification against
live web evidence, paid per call over x402 ($0.05 USDC on Base), with an Ed25519-signed receipt
the server verifies offline against Clearsigned's pinned published key before your agent sees it.

## Tools

| Tool | Paid? | What it returns |
|---|---|---|
| `verify_claim(claim, evidence?)` | $0.05 USDC | `SUPPORTED` / `REFUTED` / `UNVERIFIABLE`, calibrated confidence (a measured realized rate), per-source stances, receipt id, settlement tx, `signature_verified_offline` |
| `quote()` | free | the price an unpaid request is quoted right now, decoded from the 402 |
| `service_status()` | free | what is serving, ledger height, published buyer counts |

`UNVERIFIABLE` is a real answer, not an error: the engine abstains instead of guessing. The price
never depends on the verdict; refunds exist only for failure to deliver. A request with no claim
is refused locally, before any payment.

## Install

```bash
pip install clearsigned-mcp        # or: pipx install clearsigned-mcp
export CLEARSIGNED_BUYER_KEY=0x…   # an EVM key holding a little USDC on Base mainnet
clearsigned-mcp                    # stdio transport
```

Claude Desktop / Claude Code / any MCP client:

```json
{
  "mcpServers": {
    "clearsigned": {
      "command": "clearsigned-mcp",
      "env": { "CLEARSIGNED_BUYER_KEY": "0x…" }
    }
  }
}
```

The key is used only to sign x402 payment authorizations from your own wallet. It is never sent
to Clearsigned; the service sees the payment, not the key.

## How to check us

- Pin the key at https://verify.clearsigned.com/pubkey; this server does, and refuses a receipt
  whose signature does not verify against it.
- Walk the public hash-chained ledger at https://verify.clearsigned.com/ledger/verify; every
  paid receipt and its on-chain settlement are separate events joined on payer and nonce.
- Read the live figures at https://clearsigned.com/quality (counts and timings, never a claim)
  and the serving calibration curve at https://clearsigned.com/stats.json.

## Source of truth

This package is developed inside the Clearsigned monorepo (`products/mcp-server/`) and mirrored
to a public repository for registries and installs. Issues and pull requests on the mirror are
welcome; changes land in the monorepo first.

## Development

```bash
python -m pytest tests/
```

The tests never touch the network or a wallet: the exchange is injected, and receipts are
signed with a throwaway Ed25519 key to exercise the offline verification exactly as production
does it.
