Serveur MCP

backend

io.github.aiguardrail/backend
Crypto et Web3 Sécurité Public et accessible MCP 2025-11-25

Ce que fait ce MCP

Performs deterministic token safety, pre-trade risk, balance simulation, and audit-trail checks for blockchain trading.

check_token_safety
Check Token Safety
Honeypot / contract safety check for any ERC-20 token.
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', 'required': ['contract_address'], 'properties': {'contract_address': {'type': 'string', 'description': 'Token contract address (0x...).'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'required': ['severity'], 'properties': {'error': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': "If present, the check failed. Do not assume 'safe'."}, 'severity': {'enum': ['safe', 'warn', 'danger'], 'type': 'string', 'description': 'Overall classification.'}, 'risk_factors': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Specific issues detected.'}, 'sell_simulation_ok': {'anyOf': [{'type': 'boolean'}, {'type': 'null'}], 'default': None, 'description': 'Whether a simulated sell succeeded.'}}, 'description': 'Heuristic honeypot / contract safety report.'}
evaluate_trade
Evaluate Trade (Free)
Pre-trade risk check for a proposed trade. Call this BEFORE executing any trade and treat a "deny" decision as a hard stop. Evaluated at a fixed Tier 1 ceiling ($5,000 notional). For higher limits, use `evaluate_trade_paid` (Tier 2, $25,000) which settles an x402 payment on-chain.
Lecture seule Idempotent
Schéma d’entrée
{'type': 'object', 'required': ['wallet', 'asset', 'contract_address', 'side', 'amount'], 'properties': {'side': {'type': 'string', 'description': '"buy" or "sell".'}, 'asset': {'type': 'string', 'description': 'Asset symbol, e.g. NVDA, AAPL, TSLA, USDG.'}, 'amount': {'type': 'number', 'description': 'Quantity in token units â\x80\x94 NOT a pre-computed USD value.'}, 'wallet': {'type': 'string', 'description': 'EVM wallet address (0x...) the trade would execute from.'}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Optional idempotency key.'}, 'contract_address': {'type': 'string', 'description': 'Token contract address (0x...). Must match the\nofficial registry address for that symbol, or the trade is\ndenied as a suspected fake token.'}, 'max_slippage_bps': {'type': 'integer', 'default': 100, 'description': 'Max slippage in basis points (default 100).'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'required': ['decision', 'reasons', 'tier', 'max_trade_usd', 'calculated_notional_usd', 'price_usd', 'price_source', 'risk_score'], 'properties': {'tier': {'type': 'integer', 'description': 'Tier the wallet was evaluated at (1-3).'}, 'error': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'If present, no verdict was produced. Treat as a hard stop; do not execute the trade.'}, 'reasons': {'type': 'array', 'items': {'type': 'string'}, 'description': "Human-readable reasons. Entries prefixed with 'ADVISORY:' are non-blocking context; all other entries drove the decision."}, 'decision': {'enum': ['allow', 'warn', 'deny'], 'type': 'string', 'description': "Final verdict. 'deny' is a hard stop."}, 'audit_seq': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Monotonic sequence number of this decision.'}, 'price_usd': {'type': 'number', 'description': 'Asset price used for the valuation.'}, 'audit_hash': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'SHA-256 hash chaining this decision.'}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Echoed idempotency key, if provided.'}, 'risk_score': {'type': 'integer', 'description': 'Composite risk score from 0 (safe) to 100 (blocked).'}, 'price_source': {'enum': ['oracle', 'uniswap_v4', 'fallback_default', 'unavailable'], 'type': 'string', 'description': 'Where the price came from.'}, 'max_trade_usd': {'type': 'number', 'description': 'USD ceiling for this tier.'}, 'calculated_notional_usd': {'type': 'number', 'description': 'USD value of the proposed trade.'}}, 'description': 'Result of a pre-trade risk check.'}
evaluate_trade_paid
Evaluate Trade (x402 Paid, Tier 2)
Pre-trade risk check gated by an x402 payment. Evaluated as COLR Tier 2: $25,000 notional ceiling, 10/25 per-minute rate limits. No COLR holdings are required — the on-chain payment is the credential. FLOW ---- 1. Call WITHOUT payment_proof → the tool returns a `PaymentRequiredOutput` describing the on-chain payment (network, asset, amount, payTo, resource). 2. Settle the payment on-chain using an x402-capable client. The facilitator returns a proof string. 3. Call again with `payment_proof=<proof>` → the tool forwards the proof to the guardrail's x402-paid endpoint and returns a full `EvaluateTradeOutput` with `tier=2`.
Lecture seule Idempotent
Schéma d’entrée
{'type': 'object', 'required': ['wallet', 'asset', 'contract_address', 'side', 'amount'], 'properties': {'side': {'type': 'string', 'description': '"buy" or "sell".'}, 'asset': {'type': 'string', 'description': 'Asset symbol, e.g. NVDA, AAPL, TSLA, USDG.'}, 'amount': {'type': 'number', 'description': 'Quantity in token units.'}, 'wallet': {'type': 'string', 'description': 'EVM wallet address (0x...) the trade would execute from.'}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Optional idempotency key.'}, 'payment_proof': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'x402 payment proof from the facilitator. Omit\non the first call to receive the payment challenge.'}, 'contract_address': {'type': 'string', 'description': 'Token contract address (0x...).'}, 'max_slippage_bps': {'type': 'integer', 'default': 100, 'description': 'Max slippage in basis points (default 100).'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'required': ['result'], 'properties': {'result': {'anyOf': [{'type': 'object', 'required': ['decision', 'reasons', 'tier', 'max_trade_usd', 'calculated_notional_usd', 'price_usd', 'price_source', 'risk_score'], 'properties': {'tier': {'type': 'integer', 'description': 'Tier the wallet was evaluated at (1-3).'}, 'error': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'If present, no verdict was produced. Treat as a hard stop; do not execute the trade.'}, 'reasons': {'type': 'array', 'items': {'type': 'string'}, 'description': "Human-readable reasons. Entries prefixed with 'ADVISORY:' are non-blocking context; all other entries drove the decision."}, 'decision': {'enum': ['allow', 'warn', 'deny'], 'type': 'string', 'description': "Final verdict. 'deny' is a hard stop."}, 'audit_seq': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Monotonic sequence number of this decision.'}, 'price_usd': {'type': 'number', 'description': 'Asset price used for the valuation.'}, 'audit_hash': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'SHA-256 hash chaining this decision.'}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Echoed idempotency key, if provided.'}, 'risk_score': {'type': 'integer', 'description': 'Composite risk score from 0 (safe) to 100 (blocked).'}, 'price_source': {'enum': ['oracle', 'uniswap_v4', 'fallback_default', 'unavailable'], 'type': 'string', 'description': 'Where the price came from.'}, 'max_trade_usd': {'type': 'number', 'description': 'USD ceiling for this tier.'}, 'calculated_notional_usd': {'type': 'number', 'description': 'USD value of the proposed trade.'}}, 'description': 'Result of a pre-trade risk check.'}, {'type': 'object', 'required': ['network', 'asset', 'amount', 'pay_to', 'resource', 'description', 'max_timeout_seconds', 'tier_granted'], 'properties': {'asset': {'type': 'string', 'description': 'USDG contract address.'}, 'error': {'type': 'null', 'default': None}, 'amount': {'type': 'string', 'description': 'Amount in asset base units (6 decimals for USDG).'}, 'pay_to': {'type': 'string', 'description': 'Recipient address for the payment.'}, 'status': {'type': 'string', 'const': 'payment_required', 'default': 'payment_required'}, 'network': {'type': 'string', 'description': 'CAIP-2 network id, e.g. eip155:4663.'}, 'resource': {'type': 'string', 'description': 'Resource URL the payment unlocks.'}, 'description': {'type': 'string', 'description': 'Human-readable purpose.'}, 'tier_granted': {'type': 'integer', 'description': 'Tier the paid proof grants (2 for x402 paid access).'}, 'max_timeout_seconds': {'type': 'integer', 'description': 'Payment validity window in seconds.'}}, 'description': 'x402 payment challenge returned when no proof is supplied.\n\nThe client is expected to settle this payment on-chain and retry the\ntool with the resulting proof carried in `payment_proof`.'}]}}, 'x-fastmcp-wrap-result': True}
get_supported_assets
Get Supported Assets
List every asset in the guardrail's official Robinhood Chain registry, with its canonical contract address.
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', 'properties': {}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'properties': {'error': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'If present, the registry was unreachable.'}, 'assets': {'type': 'array', 'items': {'type': 'object', 'required': ['symbol', 'contract_address'], 'properties': {'symbol': {'type': 'string'}, 'is_native': {'type': 'boolean', 'default': False}, 'contract_address': {'type': 'string'}}}, 'description': 'Registered assets.'}}, 'description': 'Response of the asset registry endpoint.'}
simulate_balance
Simulate Balance
Simulate a wallet's ERC-20 balance after a hypothetical trade using eth_call state override. Read-only: no transaction is ever sent.
Lecture seule Idempotent
Schéma d’entrée
{'type': 'object', 'required': ['token_address', 'holder', 'delta'], 'properties': {'delta': {'type': 'number', 'description': 'Signed amount (negative = spend).'}, 'holder': {'type': 'string', 'description': 'Wallet address whose balance is simulated (0x...).'}, 'decimals': {'type': 'integer', 'default': 18, 'description': 'Token decimals (default 18).'}, 'token_address': {'type': 'string', 'description': 'ERC-20 contract address (0x...).'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'properties': {'after': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Balance after.'}, 'delta': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Signed change.'}, 'error': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'If present, the simulation failed.'}, 'before': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Balance before.'}}, 'description': 'Result of an eth_call state-override balance simulation.'}
verify_audit_trail
Verify Audit Trail
Verify the tamper-evident audit trail for a wallet's past guardrail decisions.
Lecture seule Idempotent
Schéma d’entrée
{'type': 'object', 'required': ['wallet'], 'properties': {'limit': {'type': 'integer', 'default': 100, 'description': 'How many recent records to verify (1-1000, default 100).'}, 'wallet': {'type': 'string', 'description': 'EVM wallet address (0x...).'}}, 'additionalProperties': False}
Schéma de sortie
{'type': 'object', 'required': ['healthy'], 'properties': {'error': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'If present, verification could not run.'}, 'healthy': {'type': 'boolean', 'description': "True only if every record's hash matches and the chain is unbroken."}, 'records_checked': {'type': 'integer', 'default': 0, 'description': 'Number of records verified.'}, 'first_broken_seq': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Sequence number of the first broken link, if any.'}}, 'description': 'Audit-chain verification result.'}
Ajouté
evaluate_trade_paid
22 September 2026 02:40
Modifié
evaluate_trade
22 September 2026 02:40
Ajouté
verify_audit_trail
18 September 2026 02:40
Ajouté
get_supported_assets
18 September 2026 02:40
Ajouté
simulate_balance
18 September 2026 02:40
Ajouté
check_token_safety
18 September 2026 02:40
Ajouté
evaluate_trade
18 September 2026 02:40