Fact-Checker MCP Server

Fact-Checker MCP Server

This MCP server enables AI agents to extract, verify, and cache factual claims from text using Claude Haiku and semantic fingerprinting, with tools for content verification, signal verification, and fact memory search.

Category
Visit Server

README

Fact-Checker MCP Server

MCP TypeScript License

A Model Context Protocol (MCP) server that provides AI-powered fact-checking and claim verification. Uses Claude Haiku for claim extraction, SPO-based semantic fingerprinting, and Redis caching for deduplication.

Exposes both an MCP (StreamableHTTP) interface for AI agents and a REST API for HTTP clients.

Features

MCP Tools

Tool Description
extractClaims Extract verifiable claims from text with type and durability classification
verifyContent Verify outbound content — extracts claims, checks each against cache + Haiku, returns verdicts and corrected content
verifySignal Verify an inbound signal claim — returns a trust assessment with action recommendation
getFactMemory Search the fact-checker cache for previously verified claims

REST API

Method Endpoint Description
POST /api/extract-claims Extract claims from text
POST /api/verify-content Verify content (GATE tool)
POST /api/verify-signal Verify a signal claim (SENSE tool)
GET /api/fact-memory?query=... Search cached verifications
GET /health Health check

Quick Start

Prerequisites

  • Node.js 20+
  • An Anthropic API key
  • Redis (optional — caching is gracefully skipped when unavailable)

Install

git clone https://github.com/luminarylane/fact-checker-mcp.git
cd fact-checker-mcp
npm install
npm run build

Configure

Copy the example env file and add your Anthropic API key:

cp .env.example .env
# Edit .env and set ANTHROPIC_API_KEY

Run

# Development (auto-reload)
npm run dev

# Production
npm start

The server starts two listeners:

  • REST API on port 8004 (configurable via PORT)
  • MCP transport on port 8005 (configurable via MCP_PORT)

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "fact-checker": {
      "command": "node",
      "args": ["/path/to/fact-checker-mcp/dist/index.js"]
    }
  }
}

How It Works

Claim Extraction (extractClaims)

Extracts verifiable claims from text using Claude Haiku. Each claim is classified by type (statistic, company_fact, quote, product_claim, market_assertion, opinion) and durability (permanent, durable, transient, volatile).

Content Verification (verifyContent / GATE)

Full content verification pipeline:

  1. Extract claims from content
  2. Fingerprint each claim using SPO (Subject-Predicate-Object) triples
  3. Check Redis cache for previously verified claims
  4. Verify uncached claims via Claude Haiku with optional brand data and web context
  5. Return verdicts (publish, revise, block) with corrected content

Signal Verification (verifySignal / SENSE)

Verifies a single inbound claim (e.g., "Company X raised $50M") and returns:

  • Signal verdict: verified, likely_true, uncertain, likely_false, contradicted
  • Action recommendation: safe_to_act, proceed_with_caution, needs_human_review, do_not_act

Semantic Fingerprinting

Claims are normalized into Subject-Predicate-Object triples via Haiku, then hashed. Equivalent claims (different wording, same meaning) produce the same fingerprint, enabling cache deduplication.

Fact Memory (getFactMemory)

Search previously verified claims by keyword. Useful for avoiding re-verification during multi-step workflows.

Configuration

Env Var Default Description
ANTHROPIC_API_KEY Required. Anthropic API key
ANTHROPIC_MODEL claude-haiku-4-5-20251001 Model to use for verification
REDIS_URL Redis connection URL (optional)
PORT 8004 REST API port
MCP_PORT 8005 MCP transport port
HOST 0.0.0.0 Bind address
CACHE_TTL_PERMANENT -1 Cache TTL for permanent facts (seconds, -1 = no expiry)
CACHE_TTL_DURABLE 2592000 Cache TTL for durable facts (30 days)
CACHE_TTL_TRANSIENT 86400 Cache TTL for transient facts (1 day)
CACHE_TTL_VOLATILE 3600 Cache TTL for volatile facts (1 hour)

Architecture

  • Transport: StreamableHTTP (MCP) + Express (REST)
  • AI: Claude Haiku for claim extraction, verification, and SPO fingerprinting
  • Cache: Redis with durability-based TTLs (gracefully degrades without Redis)
  • Rate Limiting: Token-bucket rate limiter for Anthropic API calls (100 req/min)
  • Safety: Untrusted content wrapped with hashed markers for prompt injection defence

Development

# Development server (auto-reload)
npm run dev

# Type check
npx tsc --noEmit

# Run tests
npm test

# Test with coverage
npm run test:coverage

# Build
npm run build

License

MIT

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
Qdrant Server

Qdrant Server

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

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