ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

SRA-RiskGate

โดย sriram1983007-devรุ่น 0.13.0i★ –iรันบนเครื่อง
ชื่อใน registryio.github.sriram1983007-dev/sra-riskgate-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Check stablecoin and x402 payments before an AI agent pays: approve, hold or reject.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: คริปโตและบล็อกเชน
  • ต้องใส่ค่าเหล่านี้: SRA_API_KEY

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: SRA_BASE_URL, SRA_MODEL, SRA_MAX_AMOUNT, SRA_ALLOWED_TOKENS, SRA_KNOWN_RECIPIENTS, SRA_KNOWN_RECIPIENTS_FILE, SRA_BLOCKED_ADDRESSES, SRA_BLOCKED_ADDRESSES_FILE, SRA_MAX_AUTH_VALIDITY_SECONDS, SRA_API_KEY, SRA_TIMEOUT, SRA_DEPEG_HOLD_PCT, SRA_DEPEG_REJECT_PCT, SRA_MAX_GATEWAY_VALIDITY_SECONDS, SRA_CIRCLE_WALLETS, SRA_CIRCLE_USDC_TOKEN_IDS, SRA_EXPECTED_DELEGATES, SRA_EXPECTED_DELEGATES_FILE, SRA_EXPECTED_PAYMASTERS, SRA_EXPECTED_PAYMASTERS_FILE, SRA_EXPECTED_SPENDERS, SRA_EXPECTED_SPENDERS_FILE, SRA_MAX_ALLOWANCE, SRA_ALLOW_ACCOUNT_DEPLOYMENT

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • PyPIติดตั้ง uv ของ Python (มีคำสั่ง uvx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "sra-riskgate": {
      "command": "uvx",
      "args": [
        "sra-riskgate-mcp"
      ],
      "env": {
        "SRA_BASE_URL": "ใส่ค่าของคุณ",
        "SRA_MODEL": "ใส่ค่าของคุณ",
        "SRA_MAX_AMOUNT": "ใส่ค่าของคุณ",
        "SRA_ALLOWED_TOKENS": "ใส่ค่าของคุณ",
        "SRA_KNOWN_RECIPIENTS": "ใส่ค่าของคุณ",
        "SRA_KNOWN_RECIPIENTS_FILE": "ใส่ค่าของคุณ",
        "SRA_BLOCKED_ADDRESSES": "ใส่ค่าของคุณ",
        "SRA_BLOCKED_ADDRESSES_FILE": "ใส่ค่าของคุณ",
        "SRA_MAX_AUTH_VALIDITY_SECONDS": "ใส่ค่าของคุณ",
        "SRA_API_KEY": "ใส่ค่าของคุณ",
        "SRA_TIMEOUT": "ใส่ค่าของคุณ",
        "SRA_DEPEG_HOLD_PCT": "ใส่ค่าของคุณ",
        "SRA_DEPEG_REJECT_PCT": "ใส่ค่าของคุณ",
        "SRA_MAX_GATEWAY_VALIDITY_SECONDS": "ใส่ค่าของคุณ",
        "SRA_CIRCLE_WALLETS": "ใส่ค่าของคุณ",
        "SRA_CIRCLE_USDC_TOKEN_IDS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_DELEGATES": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_DELEGATES_FILE": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_PAYMASTERS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_PAYMASTERS_FILE": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_SPENDERS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_SPENDERS_FILE": "ใส่ค่าของคุณ",
        "SRA_MAX_ALLOWANCE": "ใส่ค่าของคุณ",
        "SRA_ALLOW_ACCOUNT_DEPLOYMENT": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add sra-riskgate --env SRA_BASE_URL='ใส่ค่าของคุณ' --env SRA_MODEL='ใส่ค่าของคุณ' --env SRA_MAX_AMOUNT='ใส่ค่าของคุณ' --env SRA_ALLOWED_TOKENS='ใส่ค่าของคุณ' --env SRA_KNOWN_RECIPIENTS='ใส่ค่าของคุณ' --env SRA_KNOWN_RECIPIENTS_FILE='ใส่ค่าของคุณ' --env SRA_BLOCKED_ADDRESSES='ใส่ค่าของคุณ' --env SRA_BLOCKED_ADDRESSES_FILE='ใส่ค่าของคุณ' --env SRA_MAX_AUTH_VALIDITY_SECONDS='ใส่ค่าของคุณ' --env SRA_API_KEY='ใส่ค่าของคุณ' --env SRA_TIMEOUT='ใส่ค่าของคุณ' --env SRA_DEPEG_HOLD_PCT='ใส่ค่าของคุณ' --env SRA_DEPEG_REJECT_PCT='ใส่ค่าของคุณ' --env SRA_MAX_GATEWAY_VALIDITY_SECONDS='ใส่ค่าของคุณ' --env SRA_CIRCLE_WALLETS='ใส่ค่าของคุณ' --env SRA_CIRCLE_USDC_TOKEN_IDS='ใส่ค่าของคุณ' --env SRA_EXPECTED_DELEGATES='ใส่ค่าของคุณ' --env SRA_EXPECTED_DELEGATES_FILE='ใส่ค่าของคุณ' --env SRA_EXPECTED_PAYMASTERS='ใส่ค่าของคุณ' --env SRA_EXPECTED_PAYMASTERS_FILE='ใส่ค่าของคุณ' --env SRA_EXPECTED_SPENDERS='ใส่ค่าของคุณ' --env SRA_EXPECTED_SPENDERS_FILE='ใส่ค่าของคุณ' --env SRA_MAX_ALLOWANCE='ใส่ค่าของคุณ' --env SRA_ALLOW_ACCOUNT_DEPLOYMENT='ใส่ค่าของคุณ' -- uvx sra-riskgate-mcp

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "sra-riskgate": {
      "command": "uvx",
      "args": [
        "sra-riskgate-mcp"
      ],
      "env": {
        "SRA_BASE_URL": "ใส่ค่าของคุณ",
        "SRA_MODEL": "ใส่ค่าของคุณ",
        "SRA_MAX_AMOUNT": "ใส่ค่าของคุณ",
        "SRA_ALLOWED_TOKENS": "ใส่ค่าของคุณ",
        "SRA_KNOWN_RECIPIENTS": "ใส่ค่าของคุณ",
        "SRA_KNOWN_RECIPIENTS_FILE": "ใส่ค่าของคุณ",
        "SRA_BLOCKED_ADDRESSES": "ใส่ค่าของคุณ",
        "SRA_BLOCKED_ADDRESSES_FILE": "ใส่ค่าของคุณ",
        "SRA_MAX_AUTH_VALIDITY_SECONDS": "ใส่ค่าของคุณ",
        "SRA_API_KEY": "ใส่ค่าของคุณ",
        "SRA_TIMEOUT": "ใส่ค่าของคุณ",
        "SRA_DEPEG_HOLD_PCT": "ใส่ค่าของคุณ",
        "SRA_DEPEG_REJECT_PCT": "ใส่ค่าของคุณ",
        "SRA_MAX_GATEWAY_VALIDITY_SECONDS": "ใส่ค่าของคุณ",
        "SRA_CIRCLE_WALLETS": "ใส่ค่าของคุณ",
        "SRA_CIRCLE_USDC_TOKEN_IDS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_DELEGATES": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_DELEGATES_FILE": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_PAYMASTERS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_PAYMASTERS_FILE": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_SPENDERS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_SPENDERS_FILE": "ใส่ค่าของคุณ",
        "SRA_MAX_ALLOWANCE": "ใส่ค่าของคุณ",
        "SRA_ALLOW_ACCOUNT_DEPLOYMENT": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "sra-riskgate": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sra-riskgate-mcp"
      ],
      "env": {
        "SRA_BASE_URL": "ใส่ค่าของคุณ",
        "SRA_MODEL": "ใส่ค่าของคุณ",
        "SRA_MAX_AMOUNT": "ใส่ค่าของคุณ",
        "SRA_ALLOWED_TOKENS": "ใส่ค่าของคุณ",
        "SRA_KNOWN_RECIPIENTS": "ใส่ค่าของคุณ",
        "SRA_KNOWN_RECIPIENTS_FILE": "ใส่ค่าของคุณ",
        "SRA_BLOCKED_ADDRESSES": "ใส่ค่าของคุณ",
        "SRA_BLOCKED_ADDRESSES_FILE": "ใส่ค่าของคุณ",
        "SRA_MAX_AUTH_VALIDITY_SECONDS": "ใส่ค่าของคุณ",
        "SRA_API_KEY": "ใส่ค่าของคุณ",
        "SRA_TIMEOUT": "ใส่ค่าของคุณ",
        "SRA_DEPEG_HOLD_PCT": "ใส่ค่าของคุณ",
        "SRA_DEPEG_REJECT_PCT": "ใส่ค่าของคุณ",
        "SRA_MAX_GATEWAY_VALIDITY_SECONDS": "ใส่ค่าของคุณ",
        "SRA_CIRCLE_WALLETS": "ใส่ค่าของคุณ",
        "SRA_CIRCLE_USDC_TOKEN_IDS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_DELEGATES": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_DELEGATES_FILE": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_PAYMASTERS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_PAYMASTERS_FILE": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_SPENDERS": "ใส่ค่าของคุณ",
        "SRA_EXPECTED_SPENDERS_FILE": "ใส่ค่าของคุณ",
        "SRA_MAX_ALLOWANCE": "ใส่ค่าของคุณ",
        "SRA_ALLOW_ACCOUNT_DEPLOYMENT": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • SRA_BASE_URL env
    OpenAI-compatible endpoint serving SRA-RiskGate-4B (default: Ollama at http://localhost:11434/v1)
  • SRA_MODEL env
    Model name on that endpoint (default: sriram1983007/sra-riskgate)
  • SRA_MAX_AMOUNT env
    Rule ceiling in whole tokens of the stablecoin paid; larger payments are held (default: 1000)
  • SRA_ALLOWED_TOKENS env
    Stablecoins the payment checks may approve: USDC, USDT, USDB, USDG (comma-separated). Default: USDC only
  • SRA_KNOWN_RECIPIENTS env
    Verified payee addresses, comma-separated; payments to anyone else are held (default: check off)
  • SRA_KNOWN_RECIPIENTS_FILE env
    File with one verified payee address per line, added to SRA_KNOWN_RECIPIENTS
  • SRA_BLOCKED_ADDRESSES env
    Addresses to always reject, comma-separated
  • SRA_BLOCKED_ADDRESSES_FILE env
    File with one address to reject per line, added to SRA_BLOCKED_ADDRESSES
  • SRA_MAX_AUTH_VALIDITY_SECONDS env
    Longest an x402 authorization may stay valid before it is held (default: 3600)
  • SRA_API_KEY ความลับ env
    API key for the model endpoint, if it needs one
  • SRA_TIMEOUT env
    Seconds to wait for the model (default: 120)
  • SRA_DEPEG_HOLD_PCT env
    Hold payments when USDC is this many percent off $1.00 (default: 1)
  • SRA_DEPEG_REJECT_PCT env
    Reject payments when USDC is this many percent off $1.00 (default: 5)
  • SRA_MAX_GATEWAY_VALIDITY_SECONDS env
    Longest a Circle Gateway batched payment may stay valid before it is held (default: 691200, 8 days)
  • SRA_CIRCLE_WALLETS env
    Circle Wallets the agent may use, as walletId=0xaddress pairs, comma-separated; any other wallet is held
  • SRA_CIRCLE_USDC_TOKEN_IDS env
    Circle token ids confirmed to be USDC, for transfers by tokenId, comma-separated
  • SRA_EXPECTED_DELEGATES env
    EIP-7702 delegate contracts your wallet uses on purpose, comma-separated; with account_code, any other delegation is held
  • SRA_EXPECTED_DELEGATES_FILE env
    File with one expected delegate address per line, added to SRA_EXPECTED_DELEGATES
  • SRA_EXPECTED_PAYMASTERS env
    Paymasters your smart account uses on purpose (comma/space separated). When set, a UserOperation with any other paymaster is held.
  • SRA_EXPECTED_PAYMASTERS_FILE env
    File with one expected paymaster address per line.
  • SRA_EXPECTED_SPENDERS env
    Contracts your wallet approved on purpose (comma/space separated). check_allowances holds an allowance to any other spender.
  • SRA_EXPECTED_SPENDERS_FILE env
    File with one expected spender address per line.
  • SRA_MAX_ALLOWANCE env
    The most any one spender may be allowed, in whole tokens. check_allowances holds anything larger.
  • SRA_ALLOW_ACCOUNT_DEPLOYMENT env
    Set to 1 to allow a UserOperation that also deploys the smart account (initCode/factory). Default: held.

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub sriram1983007-dev ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด คริปโตและบล็อกเชนi

  • ดาวมากกว่า 0% ของอีก 1613 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 99% ของอีก 1613 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 1613 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

SRA-RiskGate ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: SRA_API_KEY

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.13.0) เข้า registry เมื่อวาน

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Agentwallet, Dinero en la Mesa — Perp DEX costs & funding, CryptoKeyhole

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Agentwallet

โดย hifriendbot

Wallet infrastructure for Ai agents. EVM + Solana. x402 payments. No KYC.

รันบนเครื่องอัปเดต วันนี้
ติดตั้ง

CryptoKeyhole

โดย cryptokeyhole.com

Read-only market and on-chain data for Bitcoin, Ethereum and more; on-chain from our own nodes.

รันบนคลาวด์อัปเดต วันนี้
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

sra-riskgate-mcp

An MCP server that lets AI assistants and agents check a stablecoin payment before paying it: approve, hold or reject. USDC by default; from 0.13.0 also USDT, USDB (Bridge) and USDG once the server enables them with SRA_ALLOWED_TOKENS.

ToolWhat it doesNeeds
check_address_sanctionsExact, offline match of up to 100 addresses against OFAC's published SDN crypto addresses (bundled, dated snapshot)Nothing
check_payment_rulesInstant rule checks: OFAC SDN address match, address validity, self-transfers, amount ceiling, depeg in both directions, and self-asserted claims in the payment's text; token for USDT, USDB or USDGNothing
check_x402_paymentThe same checks for an x402 payment requirement, before the agent signs; from 0.11.0, a server asking for a signature valid longer than an hour (max_timeout_seconds) is held, except Circle Gateway requirements for Circle's real GatewayWalletNothing
check_transactionThe same checks for the exact transaction the agent is about to sign (to, calldata, value); token approvals, other functions, other contracts and native ETH are heldNothing
check_x402_authorizationThe same checks for the x402 signature itself (the EIP-3009 TransferWithAuthorization typed data) before signing; expired, post-dated or long-lived authorizations, permits and non-USDC domains are heldNothing
check_circle_wallets_requestThe same checks for a Circle Wallets (developer-controlled) API request before it is sent: transfers, contract executions, typed-data and transaction signing; approve(), other tokens, raw messages and wallet upgrades are heldNothing
check_delegationAn EIP-7702 authorization before signing it: always held, naming the delegate contract and whether it is valid on every chainNothing
check_user_operationAn ERC-4337 UserOperation from a smart account (Coinbase Smart Wallet, Safe, Kernel, Nexus, SimpleAccount), call by call: an approval hidden in a batch is held, payments to the same payee are summed, self-calls, delegatecalls and unknown paymasters are heldNothing
verify_settlementAfter settlement: the mined receipt must hold exactly the approved payment (USDC, or token = USDT, USDB, USDG or any ERC-20 by address) (payer, payee, amount, and for x402 the approved authorization); reverts, wrong amounts, wrong payees, double payments and extra transfers are reportedNothing (you pass the receipt)
check_allowancesStanding approvals behind pull payments (subscriptions, loan repayments): unlimited, above SRA_MAX_ALLOWANCE or to a spender outside SRA_EXPECTED_SPENDERS is held; a sanctioned or blocked spender is rejectedNothing (you pass the allowances you read)
verify_gateway_balancesAfter a Circle Gateway payment: the payer's Gateway balance went down, and the payee's up, by at least the amount; reports when the batch has not settled yetNothing (you pass the balances)
check_payment_with_modelFull review by SRA-RiskGate-4B of the policy, the payment and your verification resultsThe model running locally

Every tool fails closed. Malformed input is rejected, and if the model is unreachable or answers off-schema, the result is hold, never approve.

Pass the payment's own text. The rule tools take an optional untrusted_text: the memo, invoice, description or x402 extra fields exactly as received (a string, object or list). If that text claims its own verification, such as "risk level: low (verified offline)", "pre-approved" or "ignore previous instructions", the payment is held, even when every other check passes. This is the trick that caused all 4 unsafe approvals by SRA-RiskGate-4B on its benchmark. Never pass your own verification results there: those legitimately say "verified".

Check what will actually be signed. Since 0.6.0 (with sra-riskgate 0.9.0+), check_transaction takes the transaction itself: the contract it calls (to), its calldata (data) and its native value. A plain USDC transfer is decoded (the result includes the recipient and amount) and gets every check of check_payment_rules. Anything else is held: approve, increaseAllowance and permit (TOKEN_APPROVAL, plus UNLIMITED_APPROVAL), which let someone else move the wallet's USDC later; other functions such as transferFrom; a contract that is not USDC on that chain; native ETH; and malformed calldata. Use it whenever the agent has the transaction, not just a description of the payment. Since 0.7.2 it also takes the transaction's tx_type and authorization_list: an EIP-7702 delegation (type 4, or any authorization) is held as CODE_DELEGATION, because it hands control of the whole account to contract code, on every chain if signed with chain id 0.

Check the x402 signature. Since 0.7.0 (with sra-riskgate 0.11.0+), check_x402_authorization takes the EIP-712 typed data the agent is about to sign for an x402 payment. In x402 on EVM chains the agent signs an EIP-3009 TransferWithAuthorization instead of sending a transaction, and anyone holding that signature can move the USDC until it expires. The tool checks the domain is USDC on that chain, from is the agent's wallet, and the authorization is current and short-lived (held if valid for more than SRA_MAX_AUTH_VALIDITY_SECONDS, default one hour), then gives the decoded payment every check of check_payment_rules. A Permit is held as a token approval. Time comes from the server's clock, not from the agent.

Circle Gateway. Since 0.8.0 (with sra-riskgate 0.13.0+), check_x402_authorization also checks Circle Gateway batched payments (nanopayments): the same authorization signed for Gateway's GatewayWalletBatched domain with Circle's GatewayWallet contract. Gateway requires these to stay valid for at least 3 days, so they have their own limit, SRA_MAX_GATEWAY_VALIDITY_SECONDS (default 8 days, above the 7 days plus 100 seconds that Circle's SDK signs for), set on the server like every other limit. A Gateway-named domain with any other contract is held. (0.8.0 shipped with a 7-day default, which held payments made by Circle's SDK; fixed in 0.9.0.)

Is the wallet still yours? Since 0.9.2 (with sra-riskgate 0.16.0+), every payment tool takes an optional account_code: your wallet's eth_getCode result. An EIP-7702 authorization signed anywhere else leaves 0xef0100 followed by the delegate's address in the account's code; if that delegate is not in SRA_EXPECTED_DELEGATES, the payment is held (ACCOUNT_DELEGATED). Plain accounts and ordinary contract wallets pass. Suggested by Carlos (Bloqarl) on DEV.to.

Circle Wallets. Since 0.9.0 (with sra-riskgate 0.14.0+), check_circle_wallets_request checks a request to Circle's developer-controlled wallets API before the agent sends it. With Circle Wallets the agent never signs: Circle signs as soon as it accepts the request, so this is the last point a bad payment can be stopped. Pass the operation (transfer, contractExecution, signTypedData, signTransaction) and the exact body. Set SRA_CIRCLE_WALLETS to the wallets the agent may use (walletId=0xaddress, comma-separated) so a request from any other wallet is held.

Sanctioned addresses. Since 0.4.0 (with sra-riskgate 0.7.1+), both rule tools reject any payment to or from an address on the OFAC SDN list, and check_address_sanctions checks addresses on their own, before a payment exists. The list is a dated snapshot bundled with sra-riskgate, matched exactly and offline. "Not listed" is not a compliance clearance: it does not trace funds or ownership, and addresses added after the snapshot date are not included.

Who is on the other side. Since 0.5.0 (with sra-riskgate 0.8.0+), you can give the server the payees you have already verified (SRA_KNOWN_RECIPIENTS). A payment to anyone else is then held with NEW_COUNTERPARTY, the usual first step in "our bank details have changed" fraud. Addresses on your blocklist (SRA_BLOCKED_ADDRESSES, or the tools' blocked_addresses argument) are always rejected. Known payees come only from the server's configuration, never from tool arguments or payment text: an agent whose input has been tampered with cannot declare an attacker's address "known". The blocklist argument is safe for agents to use because it can only make a decision stricter.

Install

Add it to your MCP client's configuration (Claude Desktop, Cursor and others):

{

"mcpServers": { "sra-riskgate": { "command": "uvx", "args": ["sra-riskgate-mcp"] } } }

Or install it with pip (pip install sra-riskgate-mcp) and use "command": "sra-riskgate-mcp".

The two rule-based tools work immediately. For check_payment_with_model, run the model locally:

ollama pull sriram1983007/sra-riskgate

Configuration

VariableDefaultMeaning
SRA_BASE_URLhttp://localhost:11434/v1OpenAI-compatible endpoint serving the model (Ollama, llama.cpp, vLLM). Must be http:// or https://; anything else gives hold
SRA_MODELsriram1983007/sra-riskgateModel name on that endpoint
SRA_API_KEYnoneAPI key, if the endpoint needs one
SRA_TIMEOUT120Seconds to wait for the model
SRA_MAX_AMOUNT1000Rule ceiling in whole tokens of the stablecoin paid; larger payments are held
SRA_ALLOWED_TOKENSUSDCStablecoins the payment checks may approve: any of USDC, USDT, USDB, USDG, comma- or space-separated. Any other token is held (UNSUPPORTED_ASSET); an unknown symbol is a configuration error
SRA_DEPEG_HOLD_PCT / SRA_DEPEG_REJECT_PCT1 / 5Depeg thresholds in percent, for the stablecoin paid
SRA_KNOWN_RECIPIENTSunset (check off)Verified payees, comma- or space-separated. Payments to anyone else are held (NEW_COUNTERPARTY). Set but empty: every payment is held
SRA_KNOWN_RECIPIENTS_FILEunsetA file with one verified payee per line (# comments allowed), added to the list above
SRA_BLOCKED_ADDRESSES / SRA_BLOCKED_ADDRESSES_FILEunsetAddresses to always reject, same formats
SRA_MAX_AUTH_VALIDITY_SECONDS3600Longest an x402 authorization may stay valid before it is held
SRA_MAX_GATEWAY_VALIDITY_SECONDS691200 (8 days)The same for Circle Gateway batched payments, which must stay valid for at least 3 days
SRA_EXPECTED_DELEGATES / SRA_EXPECTED_DELEGATES_FILEunsetEIP-7702 delegate contracts your wallet uses on purpose; with account_code, any other delegation is held
SRA_EXPECTED_PAYMASTERS / SRA_EXPECTED_PAYMASTERS_FILEunsetPaymasters your smart account uses on purpose; any other paymaster in a UserOperation is held
SRA_ALLOW_ACCOUNT_DEPLOYMENTunset1 to allow a UserOperation that also deploys the smart account (otherwise held)
SRA_CIRCLE_WALLETSunsetCircle wallets the agent may use, as walletId=0xaddress pairs; any other wallet id is held
SRA_CIRCLE_USDC_TOKEN_IDSunsetCircle token ids you have confirmed are USDC, for transfers by tokenId (otherwise held)

A malformed address or an unr

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx