Skip to main content
Glama
ashtondebug

global-news-intelligence-mcp

by ashtondebug
README.md
ο»Ώ<p align="center">
  <h1 align="center">🌍 Global News Intelligence MCP</h1>
  <p align="center">
    <strong>A high-performance MCP server delivering structured global news to LLMs.</strong>
    <br/>
    28 RSS sources Β· 12 categories Β· 16 tools Β· MIT licensed
  </p>
</p>

<p align="center">
  <img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python">
  <img src="https://img.shields.io/badge/fastmcp-3.4-green" alt="FastMCP">
  <img src="https://img.shields.io/badge/license-MIT-yellow" alt="License">
  <img src="https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey" alt="Platform">
</p>

---

## Why This Exists

LLMs are only as good as their information. This MCP server gives your AI agent
real-time access to curated, ranked, and summarized global news β€” with technology
and AI coverage prioritized.

It is not a simple RSS reader. Every article passes through a pipeline:

```
RSS Fetch β†’ Parse β†’ Classify β†’ Rank by Importance β†’ Summarize β†’ JSON Response
```

Built for [XiaoZhi AI](https://xiaozhi.me) but compatible with any MCP client
(Claude Desktop, Codex, Continue, Cursor, etc.).

---

## Features

- **16 dedicated MCP tools** β€” one per news category, plus headline and summary tools
- **28 RSS sources** across technology, AI, hardware, open source, international, politics, finance, military, space, energy, entertainment, and domestic (China)
- **Smart ranking** β€” articles scored by source credibility, keyword relevance, and recency
- **SQLite cache** β€” 15-minute TTL eliminates redundant fetches; survives network outages
- **Proxy support** β€” configurable HTTP/HTTPS proxy for mainland China environments
- **Fault isolation** β€” a single failing source never crashes the server; degrades gracefully to cache
- **Zero API keys** β€” works entirely on public RSS feeds, no registration required
- **Cross-platform** β€” Windows, Linux, macOS; Python 3.10+

---

## Quick Start

```bash
git clone https://github.com/ashtondebug/global-news-intelligence-mcp.git
cd global-news-intelligence-mcp

python -m venv .venv
source .venv/bin/activate   # macOS/Linux
# .venv\Scripts\activate    # Windows

pip install -e .
cp config.example.yaml config.yaml
```

### Environment Check

```bash
python check_env.py
```

```
Global News Intelligence MCP - Environment Check

  Python 3.12.13: OK
  fastmcp: OK      httpx: OK      feedparser: OK
  pyyaml: OK       pydantic: OK

Result: ALL CHECKS PASSED
```

### Start

```bash
python -m global_news_mcp
```

The server listens on stdio. Connect it to your MCP client.

---

## MCP Tools

| Tool | Description |
|------|-------------|
| `get_top_news` | Top global headlines (tech/AI prioritized) |
| `get_news` | News by category with configurable limit |
| `get_technology_news` | AI, chips, software, hardware, open source |
| `get_ai_news` | Artificial intelligence |
| `get_hardware_news` | CPUs, GPUs, semiconductors, devices |
| `get_opensource_news` | Open source community and developer ecosystem |
| `get_space_news` | Space missions, science, technology |
| `get_international_news` | Global events from BBC, Reuters, Guardian |
| `get_politics_news` | Political coverage |
| `get_finance_news` | Markets, economy, business |
| `get_military_news` | Defense and security |
| `get_world_news` | Composite: international + politics + finance + military |
| `get_domestic_news` | China news (People s Daily, China News, NetEase, IT Home, 36Kr) |
| `get_energy_news` | Oil, gas, renewables, energy policy |
| `get_entertainment_news` | Entertainment industry |
| `get_news_summary` | Summary for a specific article URL |

### Response Format

```json
[
  {
    "title": "OpenAI Announces GPT-5",
    "source": "TechCrunch",
    "time": "2026-08-04T10:30:00+00:00",
    "summary": "OpenAI has officially announced GPT-5, their next-generation...",
    "url": "https://techcrunch.com/2026/08/04/...",
    "category": "ai"
  }
]
```

Up to 10 articles per response, ranked by importance.

---

## Configuration

`config.yaml` (copy from `config.example.yaml`):

```yaml
network:
  timeout: 15
  proxy:
    enabled: false       # Set to true for mainland China
    http: ""             # e.g. http://127.0.0.1:7890  (Clash)
    https: ""            # e.g. http://127.0.0.1:7890

cache:
  ttl: 900              # Seconds (15 min)

logging:
  level: "INFO"
  file: ""              # Empty = stderr only

sources:
  technology: true       # Toggle individual categories
  ai: true
  # ... 12 categories total
```

**Common proxy ports:** Clash `7890` Β· V2Ray `10809` Β· SSR `1080`

---

## Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           MCP Client (LLM)            β”‚
β”‚   XiaoZhi AI / Claude / Codex / ...   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚ stdio (JSON-RPC)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          main.py (FastMCP)            β”‚
β”‚         16 registered tools           β”‚
β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   β”‚       β”‚      β”‚       β”‚
   β–Ό       β–Ό      β–Ό       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ rss  β”‚ β”‚cacheβ”‚ β”‚rankingβ”‚ β”‚summarizerβ”‚
β”‚ .py  β”‚ β”‚ .py β”‚ β”‚ .py  β”‚ β”‚   .py    β”‚
β””β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”¬β”€β”˜ β””β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
   β”‚        β”‚      β”‚          β”‚
   β–Ό        β–Ό      β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚parserβ”‚ β”‚SQLiteβ”‚ β”‚sourcesβ”‚ β”‚classifierβ”‚
β”‚ .py  β”‚ β”‚  DB  β”‚ β”‚ .py  β”‚ β”‚   .py    β”‚
β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

Pipeline: **Sources β†’ Fetch β†’ Parse β†’ Classify β†’ Rank β†’ Summarize β†’ Return**

---

## News Sources

| Category | Sources |
|----------|---------|
| **Technology** | The Verge, TechCrunch, Ars Technica, MIT Technology Review |
| **AI** | OpenAI Blog, DeepMind Blog, Hugging Face Blog |
| **Hardware** | Tom s Hardware, AnandTech |
| **Open Source** | Hacker News |
| **International** | BBC News, Reuters World, The Guardian |
| **Politics** | BBC Politics |
| **Finance** | Reuters Business, CNBC |
| **Military** | Defense News |
| **Space** | Space.com, SpaceNews, NASA Releases, ESA Space Science |
| **Energy** | OilPrice |
| **Entertainment** | Variety |
| **Domestic (China)** | People s Daily, China News, NetEase News, IT Home, 36Kr |

28 feeds total. To add a source, edit `src/global_news_mcp/sources.py`:

```python
{"name": "My Source", "url": "https://example.com/rss", "category": "technology"},
```

---

## Client Integration

### Claude Desktop

```json
{
  "mcpServers": {
    "global_news": {
      "command": "python",
      "args": ["-m", "global_news_mcp"],
      "cwd": "/path/to/global-news-intelligence-mcp"
    }
  }
}
```

### Codex / Continue / Cursor

Same pattern β€” point the `command` to your Python and set `cwd` to the project root.

---

## Development

```bash
pip install -e ".[dev]"
pytest
```

### Code Conventions

- `logging` only β€” never `print()` (stdout is JSON-RPC)
- `pathlib` for all filesystem paths
- UTF-8 throughout
- Every `@mcp.tool()` function must have a complete docstring

### Adding a New Tool

```python
@mcp.tool()
async def get_my_category_news() -> str:
    """Get news for my custom category."""
    return await _fetch_news(["my_category"], 10)
```

---

## Project Structure

```
.
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ config.example.yaml
β”œβ”€β”€ README.md
β”œβ”€β”€ RUNBOOK.md
β”œβ”€β”€ check_env.py
β”œβ”€β”€ install.bat
β”œβ”€β”€ start.bat
β”œβ”€β”€ src/global_news_mcp/
β”‚   β”œβ”€β”€ main.py          # Entry point + 16 tool registrations
β”‚   β”œβ”€β”€ sources.py       # 28 RSS feed definitions
β”‚   β”œβ”€β”€ rss.py           # Async concurrent fetching
β”‚   β”œβ”€β”€ parser.py        # feedparser β†’ Article model
β”‚   β”œβ”€β”€ classifier.py    # Keyword-based classification
β”‚   β”œβ”€β”€ ranking.py       # Importance scoring
β”‚   β”œβ”€β”€ summarizer.py    # Response formatting
β”‚   β”œβ”€β”€ cache.py         # SQLite cache layer
β”‚   β”œβ”€β”€ network.py       # httpx client (proxy/timeout)
β”‚   β”œβ”€β”€ config.py        # YAML config loader
β”‚   └── logger.py        # stderr logging
└── .gitignore
```

---

## License

MIT Β© 2026

TDQS

B3.2/5.0

Scored across 16 tools

Disambiguation1/5

The generic get_news tool accepts a category parameter covering all specialized categories, making get_technology_news, get_ai_news, and others redundant. Additionally, get_world_news overlaps with get_international_news, get_politics_news, get_finance_news, and get_military_news, creating significant boundary ambiguity.

Naming Consistency5/5

All tools follow a consistent 'get_' verb prefix with descriptive nouns (e.g., get_finance_news, get_top_news). Even get_news_summary fits the pattern of 'get' + noun phrase, and no naming conventions are mixed.

Tool Count2/5

With 16 tools, the server is heavy, and the count is inflated by unnecessary category-specific variants that duplicate the functionality of get_news with a category parameter. The server could be reduced to get_news, get_top_news, and get_news_summary while maintaining full coverage, making the current count excessive.

Completeness4/5

The tool set covers the core news workflow: fetching by category, getting top news, and retrieving article summaries. However, it lacks search functionality and filtering by date/source, which are common in news intelligence, leaving minor gaps.

Maintenance

ActivitySlowing
ResponsivenessNo issues