{
  "markdown": "<!-- mcp-name: io.github.AlexanderLawson17/revettr-mcp -->\n# Revettr\n\n[![Glama MCP server](https://glama.ai/mcp/servers/AlexanderLawson17/revettr-python/badges/card.svg)](https://glama.ai/mcp/servers/AlexanderLawson17/revettr-python)\n\nCounterparty risk scoring for agentic commerce. One API call answers: **\"Should this agent send money to this counterparty?\"**\n\nRevettr scores counterparties by analyzing domain intelligence, IP reputation, on-chain wallet history, and sanctions lists. It's designed for AI agents transacting via [x402](https://x402.org) on Base.\n\n## Install\n\n```bash\npip install revettr\n```\n\n## Quick Start\n\n```python\nfrom revettr import Revettr\n\nclient = Revettr()\n\n# Score a counterparty — send whatever data you have\nscore = client.score(\n    domain=\"uniswap.org\",\n    ip=\"104.18.28.72\",\n    wallet_address=\"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\n)\n\nprint(f\"Score: {score.score}/100 ({score.tier})\")\nprint(f\"Confidence: {score.confidence}\")\nprint(f\"Flags: {score.flags}\")\n\nif score.tier == \"critical\":\n    print(\"DO NOT TRANSACT\")\n```\n\n## What Gets Scored\n\nSend any combination of inputs. More data = higher confidence.\n\n| Input | Signal Group | What It Checks |\n|-------|-------------|----------------|\n| `domain` | Domain Intelligence | WHOIS age, DNS config (MX, SPF, DMARC), SSL certificate |\n| `ip` | IP Intelligence | Geolocation, VPN/proxy/Tor detection, datacenter vs residential |\n| `wallet_address` | Wallet Analysis | Transaction count, wallet age, counterparty diversity, on-chain behavior |\n| `company_name` | Sanctions Screening | OFAC SDN, EU consolidated, UN consolidated sanctions lists |\n\n## Response\n\n```json\n{\n  \"score\": 90,\n  \"tier\": \"low\",\n  \"confidence\": 0.75,\n  \"signals_checked\": 3,\n  \"flags\": [],\n  \"signal_scores\": {\n    \"domain\": {\n      \"score\": 80,\n      \"flags\": [],\n      \"available\": true,\n      \"details\": {\n        \"domain_age_days\": 2673,\n        \"dns\": {\"has_mx\": true, \"has_spf\": true, \"has_dmarc\": true}\n      }\n    },\n    \"ip\": {\n      \"score\": 100,\n      \"flags\": [],\n      \"available\": true,\n      \"details\": {\n        \"country\": \"US\",\n        \"asn_org\": \"Cloudflare, Inc.\",\n        \"is_private\": false\n      }\n    },\n    \"wallet\": {\n      \"score\": 100,\n      \"flags\": [],\n      \"available\": true,\n      \"details\": {\n        \"blockchain\": {\"tx_count\": 100, \"unique_counterparties\": 29},\n        \"onchain\": {\"nonce\": 16, \"eth_balance\": 0.072}\n      }\n    }\n  },\n  \"metadata\": {\n    \"inputs_provided\": [\"domain\", \"ip\", \"wallet_address\"],\n    \"latency_ms\": 1185,\n    \"version\": \"0.1.0\"\n  }\n}\n```\n\n## Score Tiers\n\n| Score | Tier | Meaning |\n|-------|------|---------|\n| 80-100 | `low` | Counterparty appears legitimate |\n| 60-79 | `medium` | Some signals warrant caution |\n| 30-59 | `high` | Multiple risk indicators present |\n| 0-29 | `critical` | Strong risk signals — do not transact |\n\nA score of **0** means a hard match (e.g., exact sanctions hit). This overrides all other signals.\n\n## Risk Flags\n\nFlags tell you exactly what triggered a score reduction. They are grouped by signal category:\n\n| Category | Examples | What It Covers |\n|----------|----------|----------------|\n| Domain | `domain_age_under_*`, `no_mx_records`, `ssl_*` | Domain age, DNS hygiene, SSL validity |\n| IP | `tor_exit_node`, `known_vpn`, `high_risk_country_*` | Anonymization, geolocation risk |\n| Wallet | `wallet_never_transacted`, `wallet_age_under_*` | On-chain history, activity patterns |\n| Sanctions | `sanctions_exact_match`, `sanctions_high_confidence_match` | OFAC/EU/UN sanctions screening |\n\nThe full set of flags and their descriptions are returned in the API response. Flag names are stable and machine-readable.\n\n## Usage Examples\n\n### Wallet only (minimal)\n\n```python\nscore = client.score(wallet_address=\"0xabc...\")\n```\n\n### Domain + IP (web service check)\n\n```python\nscore = client.score(domain=\"some-api.xyz\", ip=\"185.220.101.42\")\n```\n\n### Full check\n\n```python\nscore = client.score(\n    domain=\"merchant.com\",\n    ip=\"104.18.28.72\",\n    wallet_address=\"0xabc...\",\n    company_name=\"Merchant LLC\",\n)\n```\n\n### With x402 auto-payment\n\nThe client handles x402 payment automatically. You need a funded wallet:\n\n```python\nfrom revettr import Revettr\n\nclient = Revettr(\n    wallet_private_key=\"0xYOUR_PRIVATE_KEY\",  # Wallet that pays for the API call\n)\n\n# Client automatically handles the 402 → payment → retry flow\nscore = client.score(wallet_address=\"0xabc...\")\n```\n\n> **Security**: Never hardcode private keys. Use environment variables or a secrets manager in production.\n\n### With Virtuals Protocol (ACP)\n\nScore seller agents before creating jobs on the [Agent Commerce Protocol](https://app.virtuals.io/acp):\n\n```python\nfrom revettr import Revettr\n\nclient = Revettr()\nresult = client.score(wallet_address=seller_wallet)\nif result.score >= 60:\n    # Safe to create ACP job\n    job_id = chosen_offering.initiate_job(\n        service_requirement={\"task\": \"Analyze Q1 sales data\"},\n        evaluator_address=evaluator_address,\n    )\n```\n\nSee [examples/virtuals_acp_safe_buyer.py](examples/virtuals_acp_safe_buyer.py) for the full buyer agent flow.\n\n## Safe Agent Payments\n\nDrop-in replacement for x402 payments that automatically checks counterparty risk before sending money. If the counterparty scores below your threshold, the payment is blocked.\n\n```python\nfrom revettr import SafeX402Client, PaymentBlocked\n\nasync with SafeX402Client(\n    wallet_private_key=\"0x...\",\n    min_score=60,    # Block \"high\" and \"critical\" risk\n    on_fail=\"block\", # Raise PaymentBlocked (default)\n) as http:\n    try:\n        # Automatically scores the counterparty before paying\n        response = await http.post(\"https://some-api.com/endpoint\", json=data)\n    except PaymentBlocked as e:\n        print(f\"Blocked: {e.url} scored {e.score}/100\")\n```\n\n| `on_fail` | Behavior |\n|-----------|----------|\n| `\"block\"` (default) | Raise `PaymentBlocked` exception |\n| `\"warn\"` | Log warning, proceed with payment |\n| `\"log\"` | Silently log, proceed with payment |\n\n## Pricing\n\n| Tier | Price | What You Get |\n|------|-------|-------------|\n| Standard | $0.01 USDC | All available signals based on inputs provided |\n\nPayment is via [x402](https://x402.org) protocol — USDC on Base network. No API keys, no accounts, no contracts.\n\n## API Reference\n\n### `POST /v1/score`\n\n**Payment**: x402 — $0.01 USDC on Base per request\n\n**Request body** (JSON):\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `domain` | string | No | Domain or URL |\n| `ip` | string | No | IPv4 address |\n| `wallet_address` | string | No | EVM address (0x...) |\n| `chain` | string | No | Blockchain network (default: `base`) |\n| `company_name` | string | No | Name to screen against sanctions |\n| `email` | string | No | Email (future — not scored yet) |\n| `amount` | float | No | Transaction amount in USD (context only) |\n\nAt least one of `domain`, `ip`, `wallet_address`, or `company_name` is required.\n\n### `GET /health`\n\n**Payment**: None (always free)\n\nReturns API status and signal source availability.\n\n## Direct HTTP (without SDK)\n\n```bash\n# Without payment (returns 402):\ncurl -X POST https://revettr.com/v1/score \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"domain\": \"example.com\"}'\n\n# Returns HTTP 402 with payment-required header containing x402 payment terms\n```\n\n## Disclaimer\n\nRevettr is an **informational tool**. It aggregates publicly available signals and returns a risk score. It is **not** a compliance certification, legal advice, or guarantee of counterparty legitimacy. You are responsible for your own transaction decisions.\n\n## Built by\n\n[L Squared Digital Holdings](https://revettr.com)\n",
  "bytes": 7670,
  "sha": "2104b173dc389257086828376a7fa7e9b59125cd09f24337c7b9c394a0ff5f03",
  "repo_slug": "alexanderlawson17/revettr-python",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_alexanderlawson17_revettr_mcp_d27af910/readme"
}