Google News MCP
Enables AI assistants to fetch real-time news from Google News RSS feeds with support for headlines, categories, location-based queries, and advanced search operators. Features automatic URL decoding, concurrent processing, and intelligent caching for optimized access to global news content.
README
Google News MCP
A Model Context Protocol (MCP) server that exposes Google News RSS feeds as MCP tools, allowing AI assistants (Claude, GPT-4, etc.) to access real-time news data with automatic URL decoding, concurrent processing, and intelligent caching.
Key Features
Async & Concurrent - All operations run asynchronously with concurrent URL decoding for maximum performance
Smart Caching - LRU cache (1024 entries) for fast repeated URL decodings
Batch URL Decoding - Decode multiple Google News URLs in parallel
Clean Summaries - Extracts plain text from HTML summaries with decoded article links
Multi-language Support - Configure for any language/country combination
Advanced Search - Full support for Google News search operators (site:, when:, intitle:, etc.)
Tool Overview
| Tool | Purpose | Parameters |
|---|---|---|
get_top_headlines |
Latest headlines by country | language, country |
get_category_feed |
News by category (TECH, BUSINESS, etc.) | category, language, country |
get_search_feed |
Search news with advanced operators | query, language, country |
get_geo_feed |
Location-specific news | location, language, country |
get_topic_feed |
Trending topic by ID | topic_id, language, country |
decode_google_news_url |
Decode Google News URLs | urls (list) |
list_categories |
Available news categories | (none) |
Total: 7 tools
Quick Start
Installation
Option 1: Using uv (recommended)
# Clone the repository
git clone https://github.com/moltrus/google-news-mcp.git
cd google-news-mcp
# Install with uv
uv sync
Option 2: Using pip with virtual environment
# Clone the repository
git clone https://github.com/moltrus/google-news-mcp.git
cd google-news-mcp
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in development mode
pip install -e .
For Global Usage (Any Method)
To use the google-news-mcp command globally from anywhere:
pip install -e .
This installs the command-line entry point system-wide, allowing you to run google-news-mcp from any directory.
Configuration
Create a .env file:
# Optional - defaults shown
GOOGLE_NEWS_LANGUAGE=en
GOOGLE_NEWS_COUNTRY=US
Running the Server
google-news-mcp
Or directly:
python -m google_news_mcp.server
Tool Documentation
get_top_headlines
Fetch the latest top headlines for a country.
Parameters:
language(string, optional): Language code (e.g.,'en','fr','es'). Defaults toGOOGLE_NEWS_LANGUAGEenv var.country(string, optional): Country code (e.g.,'US','GB','JP'). Defaults toGOOGLE_NEWS_COUNTRYenv var.
Returns:
{
"title": "Google News",
"link": "https://news.google.com",
"description": "Latest news",
"entries": [
{
"title": "Article Title",
"link": "https://source.com/article",
"published": "2026-03-31T10:00:00Z",
"summary": "Article Title (https://source.com/article)\nAnother Article (https://another.com/news)",
"source": "Source Name"
}
]
}
Notes:
- Articles are sorted by relevance (Google News default)
- URLs are automatically decoded from Google News redirects
- Summaries contain extracted links in plain text format
get_category_feed
Get news headlines for a specific category.
Parameters:
category(string, required): News category. Valid values:WORLD- International newsNATION- National/local headlinesBUSINESS- Business & financeTECHNOLOGY- Tech & AIENTERTAINMENT- Entertainment & pop cultureSPORTS- SportsSCIENCE- Science & researchHEALTH- Health & medicine
language(string, optional): Language code. Defaults to config.country(string, optional): Country code. Defaults to config.
Returns: Same as get_top_headlines
Examples:
get_category_feed(category="TECHNOLOGY")
get_category_feed(category="BUSINESS", country="UK")
get_search_feed
Search Google News with keyword queries and advanced operators.
Parameters:
query(string, required): Search query with optional operatorslanguage(string, optional): Language code. Defaults to config.country(string, optional): Country code. Defaults to config.
Supported Search Operators:
- Exact phrase:
"Artificial Intelligence"(must match exactly) - Exclude term:
-apple(exclude articles with "apple") - Site-specific:
site:techcrunch.com(only from domain) - Time range (relative):
when:1h,when:24h,when:7d,when:30d,when:1y,when:1m - Time range (absolute):
after:2026-01-01,before:2026-03-31 - Title search:
intitle:merger(term appears in headline only) - Boolean OR:
Tesla OR SpaceX(either term) - Combinations:
"GPT-4" site:openai.com when:7d(all together)
Returns: Same as get_top_headlines (max ~100 articles)
Query Examples:
"OpenAI Sora" # Exact phrase
AI -hype # Include AI, exclude hype
site:arxiv.org quantum computing # From academic site
when:1h breaking # Last hour
when:24h -rumor Bitcoin # Last 24h, exclude rumors
after:2026-03-01 before:2026-03-31 merger # Date range
intitle:IPO tech companies # IPO in headline
SpaceX OR Blue Origin # Either company OR other
Important: Date filters work on a daily basis (not hourly/minute precision).
get_geo_feed
Get news for a specific geographic location.
Parameters:
location(string, required): City, state, region, or country (e.g.,'San Francisco','California','Japan')language(string, optional): Language code. Defaults to config.country(string, optional): Country code. Defaults to config.
Returns: Same as get_top_headlines
Examples:
get_geo_feed(location="New York")
get_geo_feed(location="London", language="en")
get_geo_feed(location="Tokyo", country="JP")
decode_google_news_url
Decode multiple Google News URLs to their actual article destinations in parallel.
Parameters:
urls(list of strings, required): Array of Google News redirect URLs to decode
Returns:
{
"decoded_urls": [
{
"original_url": "https://news.google.com/articles/CBMi8wFAUU...",
"decoded_url": "https://techcrunch.com/2026/03/31/ai-news"
},
{
"original_url": "https://news.google.com/articles/CBMixAFAUU...",
"decoded_url": "https://theverge.com/2026/3/31/10987654"
}
]
}
Performance:
- All URLs decoded concurrently (no sequential delays)
- Results cached for repeat lookups (instant on cache hit)
- LRU cache with 1024 entry limit
Examples:
decode_google_news_url(urls=[
"https://news.google.com/articles/CBMi8wFAUU...",
"https://news.google.com/articles/CBMixAFAUU...",
"https://news.google.com/articles/CBMi5gFAUU..."
])
get_topic_feed
Get news for a specific trending topic by its topic ID.
Google News tracks trending topics as hashes (e.g., companies, events, recurring themes).
Parameters:
topic_id(string, required): Google News topic hash identifierlanguage(string, optional): Language code. Defaults to config.country(string, optional): Country code. Defaults to config.
Returns: Same as get_top_headlines
Common Topic IDs:
CAAqKAgKIiJDQkFTRXdvS0wyMHZNSFp3YWpSZlloSUZaVzR0UjBJb0FBUAE- Cryptocurrencies- Find more by exploring Google News and checking the topic parameter in URLs
Examples:
get_topic_feed(topic_id="CAAqKAgKIiJDQkFTRXdvS0wyMHZNSFp3YWpSZlloSUZaVzR0UjBJb0FBUAE")
list_categories
Get the list of available news categories.
Parameters: None
Returns:
{
"categories": [
"WORLD",
"NATION",
"BUSINESS",
"TECHNOLOGY",
"ENTERTAINMENT",
"SPORTS",
"SCIENCE",
"HEALTH"
]
}
Architecture
Performance Optimizations
- Async/Await - All I/O operations (HTTP, decoding) are non-blocking
- Concurrent Processing - Multiple URLs and entries processed in parallel via
asyncio.gather() - LRU Cache (1024 entries) - Decoded URLs cached at function level
- In-Memory Dictionary Cache - Additional fast lookup cache for decoded URLs
- Batch Operations -
decode_google_news_urlprocesses lists of URLs concurrently
Summary Format
Article summaries are extracted from HTML and returned as plain text with decoded links:
Article Title 1 (https://original-source.com/article1)
Image caption link (https://image-source.com/photo)
Article Title 2 (https://original-source.com/article2)
HTML tags, CDATA wrappers, and entities are stripped for clean, readable text.
Usage Examples
1. Get breaking news in the last hour
get_search_feed(query="when:1h breaking", country="US")
2. Decode multiple article URLs at once
decode_google_news_url(urls=[
"https://news.google.com/articles/CBMi8wFAUU...",
"https://news.google.com/articles/CBMixAFAUU..."
])
3. Tech news from specific source
get_search_feed(query="site:techcrunch.com AI")
4. Local news for a city
get_geo_feed(location="San Francisco")
5. Search with date range
get_search_feed(query="SpaceX after:2026-03-01 before:2026-03-31")
6. Get health news
get_category_feed(category="HEALTH")
7. Trending cryptocurrency news
get_topic_feed(topic_id="CAAqJggKIiBDQkFTRWdvSUwyMHZNR3d5YldFeVpYVXVhVzV6U0FpQkFQAQ")
Limitations
- Result limit: Google News RSS returns max ~100 articles per request
- Sorting: Default is relevance. Use
when:filters for temporal ordering - Date precision: Filters work on daily basis, not by hour/minute
- Rate limiting: No API keys needed, but Google News may throttle rapid requests
- Availability: Some regional/language combinations may have limited content
- Topic IDs: Must be discovered from Google News URLs; no lookup API
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。