Quick start

Get your first verdict in 5 minutes.

Collar Guardrail is a deterministic pre-trade risk layer for AI trading agents on Robinhood Chain. This guide takes you from zero to your first allow / warn / deny verdict.

1 Connect via MCP (no install)

The fastest path: add the MCP server to your client config. No SDK, no install, no API key required for the hosted endpoint.

Claude Desktop / Cursor / VS Code

{
  "mcpServers": {
    "collar-guardrail": {
      "url": "https://api.collarguardrail.com/mcp-http/mcp"
    }
  }
}
What this gives you: five MCP tools — evaluate_trade, check_token_safety, simulate_balance, get_supported_assets, and verify_audit_trail. All at fixed Tier 1 ($5,000 notional), no authentication.

2 Verify the connection

Before wiring this into an agent, confirm the endpoint responds.

curl -X POST https://api.collarguardrail.com/mcp-http/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

You should get a JSON response listing the five tools. If you get a 400, make sure the Accept header includes both application/json and text/event-stream.

3 Run your first trade check

Call evaluate_trade with a wallet, asset, side, and amount. The verdict is deterministic — same input, same verdict, every time.

curl -X POST https://api.collarguardrail.com/mcp-http/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "evaluate_trade",
      "arguments": {
        "wallet": "0x1234567890abcdef1234567890abcdef12345678",
        "asset": "NVDA",
        "contract_address": "0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC",
        "side": "buy",
        "amount": 1
      }
    },
    "id": 1
  }'

What you get back

FieldMeaning
decisionallow, warn, or deny
reasonsHuman-readable explanation. ADVISORY: prefix is non-blocking
risk_score0–100. Higher = more risk
audit_hashSHA-256 hash chaining this decision
audit_seqMonotonic sequence number
Safety rule: if the response contains an error key, no verdict was produced. Treat it as a hard stop — do not execute the trade. If decision == "deny", do not execute the trade.

4 Use it from LangChain (Python)

If you are building in Python, the langchain-collar package wraps all five tools as native LangChain tools.

pip install langchain-collar
from langchain_collar import get_tools
from langchain.agents import create_agent

tools = get_tools()
agent = create_agent("gpt-4o", tools)

result = agent.invoke({
    "messages": [{
        "role": "user",
        "content": "Check a 10 NVDA buy from wallet 0x... before signing."
    }]
})

Or call a tool directly:

from langchain_collar import evaluate_trade

verdict = evaluate_trade.invoke({
    "wallet": "0x1234567890abcdef1234567890abcdef12345678",
    "asset": "NVDA",
    "contract_address": "0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC",
    "side": "buy",
    "amount": 10.0,
})
print(verdict)

5 Go beyond Tier 1 (optional)

The MCP endpoint is fixed at Tier 1 ($5,000 notional). For higher limits ($25K / $100K), use the REST API with wallet-signature auth.

Authentication uses EIP-191 wallet signatures — no gas, no spending approval, no private key handling. Full flow is in the agent docs.

For high-volume agent traffic: the x402 paid endpoint at POST /api/x402/analyze accepts $0.01 USDG per call on Robinhood Chain. No signup, no API key. Discovery document at /.well-known/x402.json.

Where to go next