MCP server (any MCP client)
Tools: verify_claim (paid), quote and service_status (free). Published on PyPI and Smithery; source on GitHub.
pip install clearsigned-mcp
export CLEARSIGNED_BUYER_KEY=0x… # an EVM key holding a little USDC on Base
clearsigned-mcp # stdio
{ "mcpServers": { "clearsigned": { "command": "clearsigned-mcp",
"env": { "CLEARSIGNED_BUYER_KEY": "0x…" } } } }
LangChain (Python)
ClearsignedVerifyTool is a BaseTool you hand to any agent. Package: langchain-clearsigned; source on GitHub.
pip install langchain-clearsigned
export CLEARSIGNED_BUYER_KEY=0x…
from langchain_clearsigned import ClearsignedVerifyTool
from langgraph.prebuilt import create_react_agent
agent = create_react_agent(model, [ClearsignedVerifyTool()])
agent.invoke({"messages": [("user", "Is it true that the Eiffel Tower is in Paris? Verify before answering.")]})
The tool returns a JSON string: verdict, confidence (a measured realized rate, with the curve version in confidence_meaning), evidence as source and stance pairs, receipt_id, and signature_verified_offline. A receipt that fails verification comes back as RECEIPT_SIGNATURE_INVALID and nothing from it is passed on. Without a payment key the tool can also be used with an injected exchange for tests; the package's own tests never touch the network.
Vercel AI SDK (TypeScript)
clearsignedVerify is an AI SDK tool() that pays through x402-fetch. Package: clearsigned-ai-sdk; source on GitHub.
npm i clearsigned-ai-sdk ai zod viem x402-fetch
export CLEARSIGNED_BUYER_KEY=0x…
import { generateText } from "ai";
import { clearsignedVerify } from "clearsigned-ai-sdk";
const { text } = await generateText({
model,
tools: { clearsignedVerify },
prompt: "Verify before you answer: was the Eiffel Tower completed in 1889?",
});
What every integration guarantees
- Your key stays with you. It signs x402 payment authorizations where the integration runs. It is never sent to Clearsigned; the service sees the payment, not the key.
- The receipt is checked before it is trusted. Signature verified against /pubkey, pinned, never against the key inside the receipt.
- Abstention is an answer. The engine abstains on roughly a quarter of decidable claims instead of guessing. You still pay; refunds exist only for failure to deliver.
- Everything is auditable. Every receipt and settlement is in the public chain; live figures at /quality; the serving curve at /stats.json.
Building something else? The raw API is one POST: llms.txt has the contract, and buy_a_verdict.py is a complete client in 80 lines.