New advertisers: 50% off your first month with code FIRSTMONTHSee slots
hwcho310 avatar

Reciprocal Ruler

hwcho310/reciprocal-ruler-mcp

Settlement oracle access for agent trades: quote locks, shortfall judgments, and arithmetic checks.

tools
5
transport
STDIO
env vars
2
last updated
Nov 21, 2026
View on GitHub

What it does

  • Reads and checks with ruler_trial_verify_math, ruler_verify_math, and ruler_trial_reconcile, which return MATCHED, SHORTFALL, OVERPAID, or settlement judgments
  • Writes terms and settlements with ruler_quote_lock and ruler_reconcile, recorded in an append-only audit ledger with idempotency_key retries
  • Charges per paid call through x402 in USDC on Base, with 3 free trial calls per client and no account or API key
  • Designed for agent-to-agent trades that need a neutral third party to verify amounts and compensate shortfalls from a holdback

Tools

5 tools

Public tool metadata for what this MCP can expose to an agent.

ruler_trial_verify_mathFree trial of the deterministic arithmetic check (MATCHED, SHORTFALL, OVERPAID).

Free trial of the deterministic arithmetic check (MATCHED, SHORTFALL, OVERPAID).

No parameter schema in public metadata yet.

ruler_verify_mathUltra-low-cost deterministic arithmetic check (expected_amount vs actual_amount with optional tolerance).

Ultra-low-cost deterministic arithmetic check (expected_amount vs actual_amount with optional tolerance).

No parameter schema in public metadata yet.

ruler_trial_reconcileRuns the real reconciliation engine and returns the judgment, so you can evaluate it before paying. Not written to the audit ledger.

Runs the real reconciliation engine and returns the judgment, so you can evaluate it before paying. Not written to the audit ledger.

No parameter schema in public metadata yet.

ruler_quote_lockLocks the terms both agents agreed on and returns a deterministic quote_hash they can cite later.

Locks the terms both agents agreed on and returns a deterministic quote_hash they can cite later.

No parameter schema in public metadata yet.

ruler_reconcileIdempotent settlement judgment recorded in an append-only audit ledger; retries with the same idempotency_key return the original result instead of charging again.

Idempotent settlement judgment recorded in an append-only audit ledger; retries with the same idempotency_key return the original result instead of charging again.

No parameter schema in public metadata yet.

Configuration

RULER_API_BASE

Base URL of the Reciprocal Ruler x402 API. Defaults to the public production deployment.

RULER_TRIAL_CLIENT_ID

Stable id for your agent, sent as X-Trial-Client, so the 3 free evaluation calls follow this id instead of the shared IP address.

Readme

reciprocal-ruler-mcp

Using n8n instead of an MCP client? examples/n8n/ has an importable quote-lock → reconcile workflow. Using Claude Code? examples/claude-code/ has a ready-to-copy SKILL.md and PreToolUse verification hook. Need a quick human CSV/TSV check? Open https://reciprocal-ruler-x402.vercel.app/app.

An MCP (Model Context Protocol) server that gives any MCP-capable agent — Claude Desktop, Claude Code, Cursor, or your own client — a settlement oracle for agent-to-agent transactions.

When two AI agents fail to agree on what must be proven before money moves, Reciprocal Ruler acts as the third party: it locks the agreed terms into a deterministic quote_hash, then judges the settlement afterwards (SETTLED_OK, COMPENSATED, PENDING_RECONCILIATION) and compensates shortfalls out of the agreed holdback. The service is paid per call with x402 in USDC on Base — no account, no API key, no invoice.


View the full README on GitHub

Details

Repository
github.com/hwcho310/reciprocal-ruler-mcp
Website
reciprocal-ruler-x402.vercel.app
Categories
Finance & Trading, AI Agents & LLM Apps
Package
https://github.com/hwcho310/reciprocal-ruler-mcp/releases/download/v0.1.0/reciprocal-ruler-mcp.mcpb
Transport
STDIO
Registry
MCP registry, active

Similar to Reciprocal Ruler

More Finance & Trading