Thoughtproof-mcp
Adversarial multi-model reasoning verification for AI agents. Claude, Grok, and DeepSeek challenge each decision — returns ALLOW or HOLD with JWKS-signed attestation. x402-gated on Base.
README
@pot-sdk2/x402
Decision verification hook for x402 payments — verifies whether an agent's payment decision is well-justified before settlement executes.
The Problem
x402 enables AI agents to pay for services autonomously. The facilitator verifies that the payment is valid (correct signature, sufficient balance, right network).
But nobody verifies whether the decision to pay was well-justified.
An agent can authorize a perfectly valid payment for a service it doesn't need, at a price it shouldn't accept, based on reasoning that wouldn't survive scrutiny.
The Solution
@pot-sdk2/x402 adds a beforeSettle hook to the x402 facilitator that runs ThoughtProof decision verification before settlement executes.
- Payment valid + decision strong → settle
- Payment valid + decision weak → hold
Install
npm install @pot-sdk2/x402 pot-sdk @x402/core
Quick Start
import { createThoughtProofHook } from '@pot-sdk2/x402';
import { x402Facilitator } from '@x402/core/facilitator';
import { registerExactEvmScheme } from '@x402/evm/exact/facilitator';
const facilitator = new x402Facilitator();
// Register your payment scheme
registerExactEvmScheme(facilitator, {
signer: evmSigner,
networks: 'eip155:8453', // Base
});
// Add ThoughtProof decision verification before settlement
facilitator.onBeforeSettle(createThoughtProofHook({
providers: [
{ name: 'anthropic', model: 'claude-sonnet-4-20250514', apiKey: process.env.ANTHROPIC_API_KEY! },
{ name: 'deepseek', model: 'deepseek-chat', apiKey: process.env.DEEPSEEK_API_KEY! },
],
stakeLevel: 'medium', // micro | low | medium | high | critical
classifyMateriality: true, // only block on material defects
debug: true,
}));
// Now settlement includes decision verification
const verifyResult = await facilitator.verify(paymentPayload, requirements);
if (verifyResult.isValid) {
// This will run ThoughtProof verification before settling
const settleResult = await facilitator.settle(paymentPayload, requirements);
}
Auto-Stake Detection
Don't want to set stake levels manually? Use createAutoStakeHook — it detects the payment amount and adjusts skepticism automatically:
import { createAutoStakeHook } from '@pot-sdk2/x402';
facilitator.onBeforeSettle(createAutoStakeHook({
providers: [...],
classifyMateriality: true,
}));
// $2.50 → micro (threshold 0.40, only material defects block)
// $149 → medium (threshold 0.60, proportional review)
// $5000 → critical (threshold 0.85, full adversarial)
Stake Levels
| Level | Threshold | Critic Mode | Example |
|---|---|---|---|
micro |
0.40 | Proportional — material defects only | $2.50 API batch |
low |
0.50 | Proportional — material defects + basic logic | $50 data purchase |
medium |
0.60 | Proportional — reasoning quality + evidence | $500 vendor selection |
high |
0.75 | Adversarial — full skepticism | $5K settlement |
critical |
0.85 | Adversarial — maximum scrutiny | $50K+ / regulated |
How It Works
Agent decides to pay
↓
x402 facilitator.verify() — payment valid?
↓
x402 facilitator.settle() — execute payment
↓
[beforeSettle hook]
↓
ThoughtProof runs multi-model adversarial verification:
- Is the payment amount proportional to the service?
- Is there a material defect in the decision reasoning?
- Would a competent reviewer change this decision?
↓
confidence >= threshold → SETTLE (payment executes)
confidence < threshold → HOLD (payment blocked with reason)
Monitoring
facilitator.onBeforeSettle(createThoughtProofHook({
providers: [...],
onVerification: (result) => {
console.log(`Decision: ${result.allowed ? 'ALLOW' : 'HOLD'}`);
console.log(`Confidence: ${result.confidence}`);
console.log(`Duration: ${result.durationMs}ms`);
if (result.materiality) {
console.log(`Material defects: ${result.materiality.materialCount}`);
}
// Send to your monitoring / analytics
},
}));
The Payment Trust Stack
Identity → Visa TAP / ERC-8004
Authorization → Mastercard Verifiable Intent
Risk → t54 / fraud scoring
Decision → ThoughtProof (@pot-sdk2/x402) ← you are here
Execution → x402 facilitator / settlement
Requirements
@x402/core>= 2.0.0pot-sdk>= 1.1.0- At least 2 LLM provider API keys (for multi-model verification)
License
MIT — ThoughtProof Protocol
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。