VeriTruths × Model Context Protocol

A Deep‑Dive into How Our Chrome Extension Battles Misinformation

Scroll to explore a live UI prototype, then keep reading for the nuts‑and‑bolts breakdown—complete with OpenAI CLI commands and MCP flowcharts you can replicate today.

Prototype only—data is illustrative.

Under the Hood

VeriTruths lives in the browser as a lightweight content‑script, funnels article text to a Flask API, and delegates bias / credibility scoring to multiple LLMs (OpenAI GPT‑4o, Google Gemini 1.5 Pro) plus fact‑checking datasets (Google FactCheck API, Snopes RSS mirror). A PostgreSQL store caches results so returning users don’t burn extra tokens.

Step 1 — Extraction

We parse DOM <article> nodes, strip ads/comments, then post the payload to /api/analyze.

Step 2 — LLM Orchestration

A Prompt‑Router decides whether GPT‑4o or Gemini has lower latency for the language detected. Responses are requested in a strict JSON schema so the front‑end never sees malformed data.

Step 3 — Caching & Edge Delivery

We hash article_title + source_domain and serve stale‑while‑revalidate results via Cloudflare KV.

Model Context Protocol (MCP) Integration

MCP is our internal spec for exactly how prompts, citations, and user context are threaded through multiple LLM calls without leaking PII or drifting off topic. Think of it as Chain‑of‑Thought as Code.

Why MCP?

OpenAI CLI Workflow

During local dev we skip the Flask layer and hit OpenAI with the official CLI. Below is the exact command that generated the bias scorecards shown in the demo:

# 1 — Pack context into a single JSON file
cat <<EOF > payload.json
{
  "trace_id": "demo-$(date +%s)",
  "purpose": "bias_detection",
  "allowed_tools": ["python","web_browser"],
  "context_manifest": {
    "article_text": "$(node extract.js https://example.com/news)"
  }
}
EOF

# 2 — Fire the request (GPT‑4o Mini for cost)
openai chat completions create \
  --model gpt-4o-mini \
  --temperature 0.2 \
  --max-tokens 800 \
  --response-format json \
  --file payload.json

Flow Diagram

▼ sequence: extraction → MCP adapter → LLM cluster → post‑processor → UI bridge

MCP sequence diagram

Security Notes

VeriTruths EDU Sneak Peek

See how the same pipeline morphs into a citation assistant & flash‑card generator for students.