mcpField
T
TruthLens: Misinformation Surveillance Platform

TruthLens: Misinformation Surveillance Platform

本地服务
github.com/NemroNeno搜索与检索078 周前更新

关于 TruthLens: Misinformation Surveillance Platform

TruthLens 是供助手和研究人员调查潜在虚假信息的 MCP 服务。它可采集网页内容,借助 AI 和外部来源提取并核查声明,也能监测新闻和主题趋势。

主要功能

  1. 01采集网址和新闻内容
  2. 02使用 Gemini AI 或模式提取声明
  3. 03依据外部来源核查声明
  4. 04搜索并分析新闻内容
  5. 05追踪主题相关的虚假信息趋势

适用场景

  1. 01审查网页文章中的声明
  2. 02根据来源核查事实陈述
  3. 03搜索可能含虚假信息的新闻
  4. 04跟踪某主题的虚假信息趋势

MCP 相关

TruthLens 向 MCP 客户端提供网址采集、声明提取与核查、新闻分析和趋势监测工具。它返回带有证据和置信度分数的结果。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

暂未收录安装方式

我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。

代码仓库

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

TruthLens:虚假信息监测平台

TruthLens 是一个模型上下文协议(MCP)服务,为 AI 助手提供用于检测、分析和核实潜在虚假信息的工具。它基于 Python 和 MCP 框架构建,支持自动事实核查和虚假信息监测。

📋 功能

  • 网页内容摄取:从 URL 和新闻来源提取内容
  • 声明提取:使用 Google Gemini AI 自动识别文本中的事实声明
  • 声明核实:借助 AI 和外部知识来源评估声明的真实性
  • 新闻监测:搜索并分析新闻内容,检测虚假信息
  • 趋势分析:按主题跟踪并报告流行的虚假信息

🏗️ 架构

┌───────────────────────────────────────────────────────────┐
│                    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                 │
└───────────────────────────────────────────────────────────┘
数据流:
  1. AI 助手或 MCP 客户端请求有关声明或 URL 的信息
  2. TruthLens 服务从网络来源摄取内容或接收直接提供的文本
  3. 使用模式匹配或 Gemini AI 提取声明
  4. 使用多个来源(Wikipedia、事实核查数据库)核实每项声明
  5. 将结果连同证据和置信度评分一起返回给客户端

🚀 设置和安装

先决条件
  • Python 3.10 或更高版本
  • 外部服务的 API 密钥:
    • Google Gemini API(必需)
    • NewsAPI(可选)
    • Reddit API(可选)
使用 UV 安装(推荐)

UV 是一款快速的 Python 包安装和解析工具。使用 UV 安装并运行 TruthLens:

  1. 安装 UV(如果尚未安装)

    pip install uv
    
  2. 克隆此仓库

    git clone <repository-url>
    cd MCP\ Build
    
  3. 创建并激活虚拟环境

    uv venv
    # On Windows
    .venv\Scripts\activate
    # On macOS/Linux
    source .venv/bin/activate
    
  4. 安装依赖项

    uv pip install -r requirements.txt
    
  5. 设置 API 密钥

    • 在根目录中创建一个名为 .env 的新文件
    • 按以下格式添加 API 密钥:
    # 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
    

    重要提示:

    • 至少需要 GEMINI_API_KEY 才能使用 AI 驱动的分析
    • 如果缺少 API 密钥,系统将回退到模式匹配和演示数据
    • 切勿将 .env 文件提交到版本控制中
  6. 运行服务

    python run_server.py
    
使用 pip 安装(替代方式)

如果尚未安装 UV,可以使用 pip:

python -m venv .venv
# On Windows
.venv\Scripts\activate
# On macOS/Linux
source .venv/bin/activate
pip install -r requirements.txt
python run_server.py

🧪 测试

向 MCP 端点发送请求,以测试服务:

  1. 基本演示资源

    truthlens://demo
    
  2. 工具示例

    ingest_url(url="https://en.wikipedia.org/wiki/COVID-19_vaccine")
    extract_claims(text="Vaccines are effective at preventing serious illness.")
    verify_claim(claim_text="Climate change is caused by human activities.")
    

📚 API 密钥

本项目使用以下 API 密钥:

  1. Google Gemini API——用于基于 AI 的声明提取和核实,必需

  2. NewsAPI——用于新闻搜索功能

  3. Reddit API——用于社交媒体内容监测(可选)

⚠️ 局限性

  • 当前实现使用内存存储,不适合用于生产环境
  • 与 AI 驱动的分析相比,模式匹配回退方案的准确性有限
  • 网页抓取可能受速率限制和服务条款约束

📝 许可证

MIT 许可证

🤝 参与贡献

欢迎贡献!请随时提交 Pull Request。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。