Uses Google Gemini 2.0 Flash AI to fact-check news headlines and analyze claims with verdict classifications, confidence scores, and evidence verification.
Retrieves trending news topics from RSS feeds for international and local news sources.
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:
Install dependencies:
Set up your API key:
Run the server:
Usage
Fact-Check a Headline
Get Trending Topics
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
Building
MCP Integration
This server is compatible with:
Claude Desktop
MCP CLI
Any MCP-compatible client
Server Configuration
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