truth-anchor-agent

truth-anchor-agent

An MCP server that provides fact-checking capabilities and truth anchoring for AI agents using verified data sources.

Category
Visit Server

README

⚓️ Truth Anchor Agent

License: MIT Built on Base MCP x402

Truth Anchor Agent is an MCP (Model Context Protocol) server that provides a verifiable grounding layer for AI agents. It verifies URL status and content accessibility, gated by on-chain USDC micro-payments on Base via the x402 protocol.

The Problem: AI agents often reference dead links or hallucinate sources. The Solution: A trustless, pay-per-verification service that requires agents to commit a micro-payment before confirming a source's validity.


🛠 Model Context Protocol (MCP) Integration

This server exposes a verify tool that any MCP-compliant LLM (Claude Desktop, ChatGPT, IDEs) can use autonomously.

Registration in Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "truth-anchor": {
      "command": "npx",
      "args": ["-y", "truth-anchor-agent"],
      "env": {
        "MY_WALLET_ADDRESS": "0x367B9193D4F9cb4877Ca58E6F3ce944d761d8009"
      }
    }
  }
}

💳 The x402 Flow

The agent implements the HTTP 402 Payment Required standard, enabling seamless AI-to-AI economic transactions.

  1. Request: Agent calls /verify with a URL.
  2. Challenge: Server returns 402 Payment Required with payment instructions.
  3. Payment: Agent executes a 0.005 USDC transfer on Base Mainnet.
  4. Verification: Agent retries with the transaction hash in the X-402-Payment-Token header.
  5. Truth: Server validates the hash on-chain (preventing replays) and returns the status.

⚡️ API Reference

POST /verify

Verifies a URL's status. Requires a valid Base transaction hash.

Headers:

Header Description
X-402-Payment-Token The transaction hash of the 0.005 USDC payment on Base

Request Body:

{ "url": "https://base.org" }

Success Response (200 OK):

{
  "url": "https://base.org",
  "is_live": true,
  "status_code": 200,
  "payment_verified": true
}

🏗 Tech Stack

  • FastAPI — High-performance Python API framework.
  • Web3.py — Real-time on-chain verification (Base RPC).
  • SQLite — Replay attack prevention and transaction indexing.
  • Fly.io — Global edge deployment.
  • Base — L2 Ethereum for fast, low-cost USDC payments.

🛠 Local Development

# 1. Clone and Install
git clone https://github.com/cristiano-c1/truth-anchor-agent
cd truth-anchor-agent
pip install -r requirements.txt

# 2. Configure
echo "MY_WALLET_ADDRESS=0x367B9193D4F9cb4877Ca58E6F3ce944d761d8009" > .env

# 3. Run
uvicorn main:app --reload

📜 License

Distributed under the MIT License. See LICENSE for more information.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured