News Fact-Checker
Automated fact-checking of news headlines using web search and Google Gemini AI.
News Fact-Checker MCP Server
A modern Model Context Protocol (MCP) server for fact-checking news headlines using AI analysis and web search.
Features
- 🔍 Fact-Check Headlines: Verify news claims using Google Gemini AI and web search
- 📈 Trending Topics: Get current trending news from RSS feeds
- 🤖 AI-Powered Analysis: Uses Google Gemini 2.0 Flash for intelligent fact-checking
- 🌐 Multi-Source Verification: Searches multiple sources for comprehensive analysis
- ⚡ Modern MCP: Built with latest MCP conventions using
@mcp.tooldecorators
Quick Start
Prerequisites
- Python 3.11 or higher
- Google Gemini API key
Installation
- Clone the repository:
git clone <repository-url>
cd FactChecker
- Install dependencies:
pip install -r requirements.txt
- Set up your API key:
export GEMINI_API_KEY="your_gemini_api_key_here"
- Run the server:
python -m factchck.news_factcheck
Usage
Fact-Check a Headline
# Example MCP tool call
{
"tool": "fact_check_headline",
"arguments": {
"headline": "NASA announces discovery of water on Mars"
}
}
Get Trending Topics
# Example MCP tool call
{
"tool": "get_trending_topics",
"arguments": {
"location": "international" # or "local", "india"
}
}
Available Tools
fact_check_headline
Verifies news headlines using AI analysis and web search.
Parameters:
headline(string): The news headline to fact-check
Returns:
- Verdict (TRUE/FALSE/PARTIALLY_TRUE/UNVERIFIED/MISLEADING)
- Confidence score
- Truthfulness percentage
- Supporting and contradicting evidence
- Recommendations
get_trending_topics
Retrieves current trending news topics.
Parameters:
location(string, optional): "international", "local", or "india" (default: "international")
Returns:
- List of trending topics with titles, sources, and URLs
Configuration
Environment Variables
GEMINI_API_KEY: Required Google Gemini API keyNEWS_API_KEY: Optional NewsAPI key for enhanced searchSEARCH_API_KEY: Optional additional search API key
API Keys
- Google Gemini: Get your API key from Google AI Studio
- NewsAPI (optional): Get from NewsAPI
- Search API (optional): Additional search service API key
Development
Project Structure
FactChecker/
├── src/
│ └── factchck/
│ └── news_factcheck.py # Main MCP server
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
└── README.md # This file
Building
# Install in development mode
pip install -e .
# Run tests (if available)
python -m pytest
MCP Integration
This server is compatible with:
- Claude Desktop
- MCP CLI
- Any MCP-compatible client
Server Configuration
{
"mcpServers": {
"news-factcheck": {
"command": "python",
"args": ["-m", "factchck.news_factcheck"],
"env": {
"GEMINI_API_KEY": "your_api_key_here"
}
}
}
}
Error Handling
The server includes comprehensive error handling for:
- Missing API keys
- Network connectivity issues
- Invalid input validation
- Service unavailability
Limitations
- Requires internet connection for web search
- Depends on Google Gemini API availability
- RSS feed parsing is simplified (consider using proper XML parser for production)
- Rate limits may apply to API services
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details.
Version History
- v3.0.0: Modernized with latest MCP conventions, simplified codebase
- v2.1.0: Previous version with complex multi-source search
- v0.1.0: Initial release
Support
For issues and questions:
- Check the error logs
- Verify API key configuration
- Ensure network connectivity
- Open an issue on GitHub
関連サーバー
Memvid
Encodes text data into videos that can be quickly looked up with semantic search.
PortOne Global MCP Server
Search and read PortOne documentation, including API schemas and product guides.
Web fetch and search MCP Server
Provides web search, Wikipedia search, and web content fetching capabilities using OCaml.
DevRag
Free local RAG for Claude Code - Save tokens & time with vector search. Indexes markdown docs and finds relevant info without reading entire files (40x fewer tokens, 15x faster).
Grok Search
Comprehensive web, news, and social media search and analysis using xAI's Grok API.
JinaAI Grounding
Enhances LLM responses with factual, real-time web content using Jina AI's grounding capabilities.
Semiconductor Supply Chain MCP Server
Access semiconductor B2B platforms like AnySilicon and DesignReuse for IP core and ASIC service procurement.
Ferryhopper MCP Server
The Ferryhopper MCP Server exposes ferry routes, schedules and booking redirects so an AI assistant can discover connections across Europe and the Mediterranean and send users to Ferryhopper to complete bookings.
Google Search Console
An MCP server for accessing Google Search Console data, including site performance and indexing status.
Perplexity
Intelligent search, reasoning, and research capabilities powered by Perplexity's AI models.