server-google-news
by: ChanMeng666
【Star-crossed coders unite!⭐️】Model Context Protocol (MCP) server implementation providing Google News search capabilities via SerpAPI, with automatic news categorization and multi-language support.
📌Overview
Purpose: The Google News MCP Server aims to provide a seamless interface for accessing Google News search capabilities while leveraging SerpAPI for enhanced functionality.
Overview: This server implementation utilizes the Model Context Protocol (MCP) to offer robust news search functionality, which includes automatic categorization of news results, support for multiple languages, and regional customizations, making it a versatile tool for users across various demographics.
Key Features:
-
Flexible Search Options: Comprehensive search capabilities, including query-based and topic searches, and the ability to filter news publications.
-
Global Coverage: Supports multiple languages and regions, allowing extensive interaction through adjustable language and country settings.
-
Smart Categorization: Automatically organizes news results into relevant topics such as AI & Technology, Business, Science & Research, and Healthcare for easier navigation.
-
Multiple Result Types: Capable of handling various types of news content, including headlines, stories, related topics, and menu links.
-
Robust Error Handling: Includes comprehensive error management for API errors and invalid inputs, providing informative feedback to users.
-
Language Support: Automatically reverts to English for unsupported languages, ensuring accessibility and ease of use.
Google News MCP Server
A Model Context Protocol (MCP) server implementation that provides Google News search capabilities via SerpAPI integration. It automatically categorizes news results and supports multiple languages and regions.
✨ Features
🔍 Flexible Search Options
Comprehensive search capabilities including query-based search, topic search, publication filtering, and story coverage.
🌐 Global Coverage
Supports multiple languages and regions through configurable language and country codes.
📊 Smart Categorization
Automatically categorizes news results into topics like AI & Technology, Business, Science & Research, and Healthcare.
🔀 Multiple Result Types
Handles various news result types including headlines, stories, related topics, and menu links.
🛠️ Robust Error Handling
Comprehensive error handling for API failures and invalid inputs, with helpful error messages.
🌍 Language Support
Automatic fallback to English for unsupported language codes with appropriate user notifications.
🔑 SERP API Setup Guide
Before getting started, you'll need to obtain a SERP API key. Here's how:
-
Visit SERP API website and create an account.
-
After registration, go to your Dashboard:
- Locate the "API Key" section
- Copy your API key
- New users get 100 free API calls.
-
API Usage Details:
- Free tier: 100 searches per month
- Paid plans start at $50/month for 5000 searches
-
Usage Limits:
- Request Rate: 2 requests/second
- IP Restrictions: None
- Concurrent Requests: 5
🚀 Quick Start
-
Install dependencies:
npm install
-
Configure environment: Modify your
claude_desktop_config.json
with the following content:"google-news": { "command": "D:\\Program\\nvm\\node.exe", "args": [ "D:\\github_repository\\path_to\\dist\\index.js" ], "env": { "SERP_API_KEY": "your-api-key" } }
-
Build the server:
npm run build
-
Start the server:
npm start
📦 Installation
Installing via Smithery
To install Google News for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @chanmeng666/google-news-server --client claude
Installing via mcp-get
npx @michaellatman/mcp-get@latest install @chanmeng666/google-news-server
Manual Installation
# Using npm
npm i @chanmeng666/google-news-server
# or
npm install @chanmeng666/google-news-server
# Using yarn
yarn add @chanmeng666/google-news-server
# Using pnpm
pnpm add @chanmeng666/google-news-server
💻 Tech Stack
- TypeScript
- NodeJS
- MCP
📖 API Documentation
The server implements the Model Context Protocol and exposes a Google News search tool with the following parameters:
q
: Search query stringgl
: Country code (e.g., 'us', 'uk')hl
: Language code (e.g., 'en', 'es')topic_token
: Token for specific news topicspublication_token
: Token for specific publishersstory_token
: Token for full coverage of a storysection_token
: Token for specific sections
🔧 Development
# Run in development mode with hot reload
npm run dev
# Run linting
npm run lint
# Run tests
npm run test
📝 License
This project is MIT licensed.
🙋♀ Author
Created and maintained by Chan Meng.