← All Posts

Add Nostr Trust Scoring to Your AI Agent with MCP

2026-02-10 — mcp, ai, nostr, wot, trust, agent, l402, lightning

Why Trust Scoring for AI Agents?

AI agents operating in the Nostr ecosystem need to answer questions that require social context: Is this account trustworthy? Is this a spam bot? How are these two people connected?

Without trust data, your agent is flying blind. It can read events but can't distinguish a well-connected developer from a freshly-minted Sybil account with 10,000 fake followers.

The maximumsats MCP server gives your agent 12 tools that answer these questions using a live graph of 51,000+ Nostr pubkeys and 620,000+ follow relationships, scored with PageRank.

Setup: 2 Minutes

Add the server to your MCP client config. No API key needed — 50 free requests per day per IP.

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "maximumsats": {
      "command": "npx",
      "args": ["-y", "maximumsats-mcp"]
    }
  }
}

Cline / VS Code

{
  "mcpServers": {
    "maximumsats": {
      "command": "npx",
      "args": ["-y", "maximumsats-mcp"]
    }
  }
}

Note: npm package pending publication. Until then, clone from GitHub and use node dist/index.js.

What Your Agent Gets

Once connected, your agent sees 12 tools:

ToolWhat It Does
wot_score0-100 trust score, rank, percentile for any pubkey
wot_sybil_check5-signal Sybil detection: genuine, suspicious, or likely_sybil
wot_trust_pathHop-by-hop trust path between two pubkeys
wot_trust_circleMutual follow analysis with cohesion and density
wot_follow_qualityFollow list quality score, ghost ratio, diversity
wot_anomaliesGhost followers, asymmetric relationships, cluster attacks
wot_predict_linkLink prediction between two pubkeys (5 topology signals)
wot_network_healthGraph metrics: nodes, edges, Gini coefficient, density
wot_compare_providersCross-provider trust score comparison (NIP-85)
wot_influenceWhat-if analysis: simulate follow/unfollow ripple effects
ask_bitcoinBitcoin/Lightning Q&A (Llama 3.3 70B, 21 sats)
generate_imageAI image generation (FLUX.1, 100 sats)

Example: Agent Verifies a Nostr Identity

Your agent receives a pubkey and needs to determine if the account is legitimate. It calls two tools:

// Agent calls wot_score
{
  "normalized_score": 18,
  "rank": 3,
  "percentile": 99.99,
  "pubkey": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
  "followers": 766,
  "following": 411
}

// Agent calls wot_sybil_check
{
  "classification": "genuine",
  "confidence": 92,
  "signals": [
    {"name": "follower_quality", "score": 85},
    {"name": "mutual_trust_ratio", "score": 95},
    {"name": "follow_diversity", "score": 88},
    {"name": "temporal_consistency", "score": 91},
    {"name": "community_integration", "score": 90}
  ]
}

The agent now knows: rank #3 out of 51K, 99.99th percentile, classified genuine with 92% confidence. It can summarize this to the user in natural language.

Example: Agent Investigates a Spam Report

A user reports suspicious activity from a pubkey. The agent runs anomaly detection:

// Agent calls wot_anomalies
{
  "anomalies": [
    {"type": "ghost_followers", "severity": "high", "detail": "78% of followers have zero outgoing follows"},
    {"type": "asymmetric_ratio", "severity": "medium", "detail": "follows 2,341 accounts but only 12 follow back"},
    {"type": "cluster_pattern", "severity": "high", "detail": "80% of followers were created within 48 hours"}
  ],
  "risk_level": "high"
}

Clear Sybil pattern. The agent can flag this account and explain why to the user.

L402 Micropayments

The WoT tools include 50 free requests per day. Beyond that, requests return an L402 payment challenge with a Lightning invoice. Your agent sees:

Payment required: 5 sats

Lightning invoice: lnbc50n1p5...
After paying, retry with payment_hash: abc123...

If your agent has a Lightning wallet (LNbits, NWC, or LND), it can pay the invoice and retry automatically. The MCP server handles the payment hash routing.

This is the L402 protocol in action: HTTP 402 Payment Required + Lightning invoice + retry. Machine-to-machine payments with no signup, no API key, no subscription.

Build Something

With these 12 tools, your agent can:

The API processes the full Nostr follow graph (51K+ nodes, 620K+ edges) with PageRank scoring, so your agent gets graph-theoretic trust analysis without running its own graph database.

Links

Max builds Lightning-powered trust tools for the Nostr ecosystem. maximumsats.com

Found this useful?

Send a tip via Lightning. One click, no account needed.

Tip 100 sats ⚡