TruthLens: Misinformation Surveillance Platform

by NemroNeno

305 downloads
Not rated
GitHub

Description

# TruthLens: Misinformation Surveillance Platform TruthLens is a Model Context Protocol (MCP) server that provides AI assistants with tools to detect, analyze, and verify potential misinformation. Built with Python and the MCP framework, it enables automated fact-checking and…

About

# TruthLens: Misinformation Surveillance Platform TruthLens is a Model Context Protocol (MCP) server that provides AI assistants with tools to detect, analyze, and verify potential misinformation. Built with Python and the MCP framework, it enables automated fact-checking and misinformation monitoring capabilities. ##…

Details

Author
NemroNeno
Downloads
305
Categories
Other

- Ingests web content from URLs and news sources
- Extracts factual claims using pattern matching or Gemini AI
- Verifies claims against multiple external knowledge sources
- Monitors news and analyzes misinformation trends
- Provides confidence scores and evidence for each claim

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name TruthLens: Misinformation Surveillance Platform
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies and set API keys in a .env file, then run python run_server.py. Invoke MCP endpoints such as ingest_url, extract_claims, verify_claim, search_news, analyze_source, get_trending_info, and setup_monitor.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "truthlens: misinformation surveillance platform": {
            "mcp_server_TruthAnalyzer": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "mcp_server_TruthAnalyzer": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

TruthLens: Misinformation Surveillance Platform

TruthLens is a Model Context Protocol (MCP) server that provides AI assistants with tools to detect, analyze, and verify potential misinformation. Built with Python and the MCP framework, it enables automated fact-checking and misinformation monitoring capabilities.

📋 Features

- Web Content Ingestion: Extract content from URLs and news sources
- Claim Extraction: Automatically identify factual claims in text using Google's Gemini AI
- Claim Verification: Assess the veracity of claims using AI and external knowledge sources
- News Monitoring: Search for and analyze news content for misinformation
- Trend Analysis: Track and report on trending misinformation by topic

🏗️ Architecture

┌───────────────────────────────────────────────────────────┐
│                    TruthLens MCP Server                   │
├───────────────┬───────────────────────┬───────────────────┤
│  Data Sources │      Core Tools       │  External APIs    │
├───────────────┼───────────────────────┼───────────────────┤
│               │                       │                   │
│  Web Content  │   ingest_url()        │   Google Gemini   │
│  News Sites   │   extract_claims()    │   NewsAPI         │
│  Social Media │   verify_claim()      │   Wikipedia API   │
│  Wikipedia    │   search_news()       │   Reddit API      │
│  Fact-check   │   analyze_source()    │   Fact Check API  │
│  Databases    │   get_trending_info() │                   │
│               │   setup_monitor()     │                   │
│               │                       │                   │
└───────────────┴───────────────────────┴───────────────────┘
                          │
                          ▼
┌───────────────────────────────────────────────────────────┐
│                    MCP Clients / AI Models                 │
└───────────────────────────────────────────────────────────┘

Data Flow:

1. AI assistant or MCP client requests information about a claim or URL
2. TruthLens server ingests content from web sources or receives direct text
3. Claims are extracted using pattern matching or Gemini AI
4. Each claim is verified using multiple sources (Wikipedia, fact-check databases)
5. Results are returned to the client with evidence and confidence scores

🚀 Setup and Installation

Prerequisites

- Python 3.10 or higher
- API keys for external services:
- Google Gemini API (required)
- NewsAPI (optional)
- Reddit API (optional)

Installation with UV (Recommended)

UV is a fast Python package installer and resolver. To install and run TruthLens using UV:

1. Install UV (if not already installed)

   pip install uv

2. Clone this repository

   git clone <repository-url>
cd MCP\ Build

3. Create and activate a virtual environment

   uv venv
# On Windows
.venv\Scripts\activate
# On macOS/Linux
source .venv/bin/activate

4. Install dependencies

   uv pip install -r requirements.txt

5. Set up API keys
- Create a new file named .env in the root directory
- Add your API keys using the following format:

   # TruthLens API Keys
   # Replace placeholder values with your actual API keys
   
   # Google Gemini API Key (required for LLM-based claim extraction and verification)
   # Get it from: https://aistudio.google.com/app/apikey
   GEMINI_API_KEY=your_gemini_api_key_here
   
   # NewsAPI Key (used for fetching news articles)
   # Get it from: https://newsapi.org/
   NEWSAPI_KEY=your_newsapi_key_here
   
   # Reddit API Credentials (optional, for production use)
   # Get from: https://www.reddit.com/prefs/apps
   # Instructions:
   #  1. Click "Create App" button at the bottom
   #  2. Select "script" for personal use
   #  3. Fill in name (e.g., "TruthLens")
   #  4. For redirect URI, use: http://localhost:8000 (even though this app doesn't use it)
   #  5. After creation, you'll receive a client ID and secret
   REDDIT_CLIENT_ID=your_reddit_client_id_here
   REDDIT_CLIENT_SECRET=your_reddit_client_secret_here
   REDDIT_USER_AGENT=TruthLens/0.1 (by /u/YourUsername)
   
   # Google Fact Check Tools API Key (optional, for production use)
   # Get from: https://developers.google.com/fact-check/tools/api/
   FACTCHECK_API_KEY=your_factcheck_api_key_here
   

Important Notes:
- At minimum, you need the GEMINI_API_KEY for AI-powered analysis
- If API keys are missing, the system will fall back to pattern matching and demo data
- Never commit your .env file to version control

6. Run the server

   python run_server.py

Alternative Installation with pip

If you don't have UV installed, you can use pip:

```bash
python -m venv .venv

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.