A powerful news search and analysis tool built with MCP (Machine Conversation Protocol) that combines Google News API and Google's Gemini AI to provide intelligent news insights.
- 🔍 Smart news search with related keywords generation
- 🤖 AI-powered news analysis using Google's Gemini model
- 🌐 Multi-language support (default: Traditional Chinese)
- 📊 Customizable search parameters (time period, result count)
- 📝 Concise news insights in Traditional Chinese
- Python >= 3.11
- MCP CLI
- Google News API
- Google Gemini API key
- Clone the repository:
git clone https://github.com/yourusername/mcp-project.git
cd mcp-project- Install dependencies:
pip install -e .- Set up environment variables:
Create a
.envfile in thesrcdirectory with your Google API key:
GOOGLE_API_KEY=your_api_key_here
Run the MCP server:
python src/news_server.pyThe server provides a search_news tool with the following parameters:
keyword: Search term (required)language: Language code (default: "zh-TW")period: Time period (default: "2d" for 2 days)max_results: Number of results to return (default: 4)
- The system first uses Gemini AI to generate related keywords based on the search term
- It then searches Google News using both the original and related keywords
- For each news article found, it generates an AI-powered insight in Traditional Chinese
- Results are returned as a JSON string containing titles, links, publication dates, descriptions, and AI-generated insights
[Your chosen license]
Contributions are welcome! Please feel free to submit a Pull Request.