OTR Protocol
The merchant trust layer for AI agent commerce
Deterministic, verifiable, open-source merchant trust scoring for the agentic economy
Protocol v4.1
Specification β’
Scoring Algorithm β’
Quick Start β’
Packages β’
Contributing
The Problem
AI agents are increasingly making purchase decisions on behalf of consumers. The agentic commerce stack is taking shape -- but there is a critical missing layer:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Agent Commerce Protocol Stack β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Visa TAP Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Agent Identity Verification β
β Google UCP Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Structured Data Exchange β
β Stripe ACP Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Payment Processing β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β OTR Protocol Β·Β·Β·Β·Β· MERCHANT TRUST VERIFICATION ββββββ β β
β β "Is this merchant safe to buy from?" β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β Visa TAP answers "Who is the AI agent?" β
β Google UCP answers "What products are available?" β
β Stripe ACP answers "How do I pay?" β
β OTR answers "Should I trust this merchant?" βββ ONLY OTR β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Without OTR, AI agents operate blind -- unable to distinguish a legitimate retailer from a sophisticated scam site. This exposes consumers to fraud and erodes trust in the entire agentic commerce ecosystem.
The Solution
OTR (Open Trust Registry) provides deterministic, verifiable merchant trust scores using 6 verification dimensions, a 10-layer anti-fraud pipeline (Layer 0: Google Web Risk one-vote veto + Layers 1-9: core detection engine), and three-layer immutable audit trail. It is fully open-source (MIT), machine-readable, and designed from the ground up for AI agent consumption.
Key Properties
- Deterministic -- Same inputs always produce identical outputs. Any validator can reproduce any score.
- Verifiable -- All data sources are publicly accessible. No hidden factors or proprietary signals.
- Unforgeable -- Verification dimension weighted at 40% in public assessment. SEC filings, Wikidata entries, and 10-year domain age cannot be faked.
- Tamper-proof -- SHA-256 hash chain + Base L2 blockchain anchoring + IPFS monthly snapshots.
- Fair -- No pay-for-trust. Scores reflect behavior, not subscription level.
- Category-aware -- Three site categories (ecommerce / saas / non_commerce) with tailored scoring weights.
- Safety-first -- Google Web Risk Layer 0 one-vote veto: flagged domains get score=0, status SUSPENDED.
Quick Start
# Verify any merchant instantly
npx @otr-protocol/validator verify nike.com
# Output:
# ββββββββββββββββββββββββββββββββββββββββββββββββ
# β nike.com GOLD β
# β Trust Score: 88/100 Category: ecommerce β
# β OTR-ID: OTR-1C-7F3A2B9E4D1C-K4 β
# β β
# β Verification: 85 ββββββββββββββββ β
# β Security: 80 ββββββββββββββββ β
# β Governance: 72 ββββββββββββββββ β
# β Transparency: 75 ββββββββββββββββ β
# β Data Quality: 65 ββββββββββββββββ β
# β Fulfillment: -- (COLD mode) β
# ββββββββββββββββββββββββββββββββββββββββββββββββ
For AI Agents (MCP Server)
The OTR MCP Server uses the standard Model Context Protocol and works with all MCP-compatible clients.
Claude Desktop / Claude Code -- add to claude_desktop_config.json:
{
"mcpServers": {
"otr": {
"command": "npx",
"args": ["@otr-protocol/mcp-server"]
}
}
}
Cursor / Windsurf / Cline -- same configuration in .cursor/mcp.json or equivalent. Any client implementing the MCP specification works out of the box.
Now any AI agent can verify merchants in natural language:
"Is nike.com trustworthy?" --> OTR returns trust score 88/100, badge GOLD, and a 6-dimension breakdown (Verification, Security, Governance, Transparency, DataQuality, Fulfillment) with evidence sources.
Two MCP Tools β One Call = Complete Answer
| Tool | Description | Returns |
|---|
verify_merchant | Complete merchant profile in one call | Trust score (0-100), badge, 6-dimension breakdown, safety status (Google Web Risk), site classification (ecommerce/saas/non_commerce), entity data, policy URLs, data sources |
search_registry | Search the OTR merchant registry | Paginated merchant list with scores, badges, and recommendations |
Design philosophy: AI agents should get everything they need in a single tool call. verify_merchant returns trust assessment + purchase capabilities + links + policy URLs + data freshness β no need to chain multiple calls.
TypeScript SDK
import { OtrClient } from "@otr-protocol/sdk";
const otr = new OtrClient();
const result = await otr.verify("nike.com");
console.log(result.trustScore); // 88
console.log(result.badge); // "GOLD"
console.log(result.dimensions); // { verification: 85, security: 80, ... }
// Search the registry
const results = await otr.search("electronics", { minScore: 70 });
Core Scoring Engine
import { calculateTrustScore } from "@otr-protocol/core";
// Deterministic: same inputs always produce identical outputs
const result = calculateTrustScore({
hasSecFiling: true,
hasStockSymbol: true,
stockExchange: "NYSE",
hasWikidataId: true,
trancoRank: 500,
domainAgeYears: 15,
// ... 40+ evidence fields
});
console.log(result.trustScore); // 88
console.log(result.badge); // "GOLD"
console.log(result.tier); // "TIER_4"
Architecture