AgentStack
MCP verified MIT Self-run

News Mcp

mcp-kingingwang-news-mcp · by KingingWang

Get news from an RSS source and serve as an MCP server.

No reviews yet
0 installs
5 views
0.0% view→install

Install

$ agentstack add mcp-kingingwang-news-mcp

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of News Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

News MCP Server

[](https://www.rust-lang.org) [](https://opensource.org/licenses/MIT) [](https://github.com/KingingWang/news-mcp/actions) [](https://crates.io/crates/news-mcp) [](https://hub.docker.com/r/kingingwang/news-mcp)

A Rust-based MCP (Model Context Protocol) server for fetching news from RSS feeds, with background polling, in-memory caching, and multiple transport modes.

Features

  • Background Polling - Periodically fetches news from RSS sources and caches locally
  • Multiple Transport Modes - Supports HTTP, SSE, stdio, and hybrid modes
  • MCP Tools - Provides get_news, get_categories, get_article_content
  • get_news - Fetch news headlines by category
  • get_categories - List available categories
  • get_article_content - Fetch full article by ID (RSS sources only, not hot search)
  • Multiple Categories - Technology, Science, HackerNews, and 21 China News categories
  • Pluggable Sources - Extensible NewsSource trait for adding custom data sources
  • In-memory Cache - High-performance article cache with search functionality
  • Retry Mechanism - Automatic retry for failed RSS fetch requests

Quick Start

Installation

Choose one of the following methods:

Option 1: Download Pre-built Binary
# Download latest release from GitHub
# Linux x86_64
curl -L https://github.com/KingingWang/news-mcp/releases/latest/download/news-mcp-linux-x86_64 -o news-mcp
chmod +x news-mcp
sudo mv news-mcp /usr/local/bin/

# macOS x86_64
curl -L https://github.com/KingingWang/news-mcp/releases/latest/download/news-mcp-darwin-x86_64 -o news-mcp
chmod +x news-mcp
sudo mv news-mcp /usr/local/bin/

# macOS ARM64
curl -L https://github.com/KingingWang/news-mcp/releases/latest/download/news-mcp-darwin-arm64 -o news-mcp
chmod +x news-mcp
sudo mv news-mcp /usr/local/bin/
Option 2: Install from crates.io
cargo install news-mcp
Option 3: Docker
docker pull kingingwang/news-mcp:latest
docker run -d -p 8080:8080 --name news-mcp kingingwang/news-mcp:latest
Option 4: Build from Source
git clone https://github.com/KingingWang/news-mcp
cd news-mcp
cargo build --release
# Binary will be at: ./target/release/news-mcp

Run Server

# HTTP mode (default)
news-mcp serve --mode http --port 8080

# stdio mode (for Claude Desktop)
news-mcp serve --mode stdio

# With background polling enabled
news-mcp serve --mode http --poll

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | NEWS_MCP_PORT | 8080 | Server port | | NEWS_MCP_HOST | 127.0.0.1 | Server host | | NEWS_MCP_TRANSPORT | http | Transport mode (stdio, http, sse, hybrid) | | NEWS_MCP_INTERVAL | 3600 | Polling interval in seconds | | NEWS_MCP_LOG_LEVEL | info | Log level (trace, debug, info, warn, error) |

Example:

NEWS_MCP_PORT=9090 NEWS_MCP_LOG_LEVEL=debug news-mcp serve --mode http

Configuration File

Create config.toml in the working directory:

[server]
name = "news-mcp"
version = "0.1.0"
host = "127.0.0.1"
port = 8080
transport_mode = "http"  # Options: stdio, http, sse, hybrid

[poller]
interval_secs = 3600  # Poll every hour
enabled = true

[cache]
max_articles_per_category = 100

[logging]
level = "info"        # trace, debug, info, warn, error
enable_console = true

Architecture

flowchart TB
    subgraph Client["Client"]
        CD["Claude Desktopor HTTP Client"]
    end

    subgraph Server["News MCP Server"]
        Transport["Transport Layer(stdio / HTTP / SSE)"]
        Handler["MCP Handler"]
        ToolRegistry["Tool Registry"]

        subgraph Tools["MCP Tools"]
            GN["get_news"]
            GC["get_categories"]
            GAC["get_article_content"]
        end
    end

    subgraph Core["Core Components"]
        Cache["Cache(RwLock)"]
        Poller["Background Poller"]
        Service["News Service(HTTP + Retry)"]
    end

    subgraph Feeds["RSS Sources"]
        Tech["TechCrunch, Ars Technica, The Verge"]
        Sci["ScienceDaily"]
        HN["Hacker News"]
        CN["China News (21 categories)"]
    end

    CD -->|"MCP Protocol"| Transport
    Transport --> Handler
    Handler --> ToolRegistry
    ToolRegistry --> Tools

    Tools --> Cache
    Poller -->|"Updates"| Cache
    Poller -->|"Fetches"| Service
    Service -->|"RSS/HTTP"| Feeds

MCP Tools

get_news

Fetch articles by category.

Parameters:

  • category - News category (see [Categories](#categories))
  • limit - Number of articles (default 10, max 50)
  • format - Output format: markdown, json, text

Example:

{
  "category": "technology",
  "limit": 5,
  "format": "markdown"
}

get_categories

List available news categories with article counts.

getarticlecontent

Fetch full article content by article ID. Use this after browsing headlines with get_news to read selected articles.

Note: Hot search/trending topics (微博热搜, 百度热搜, etc.) do not support content fetching - they are social platform trends, not full articles. Only works for RSS-based sources.

Parameters:

  • id - Article ID (shown in get_news output)
  • format - Output format: markdown, json, text

Example:

{
  "id": "article-id",
  "format": "markdown"
}

Categories

International

| Category | Sources | |----------|---------| | technology | TechCrunch, Ars Technica, The Verge | | science | ScienceDaily | | hackernews | Hacker News |

China News (chinanews.com.cn)

| Category | Description | |----------|-------------| | instant | Instant News | | headlines | Headlines | | politics | Politics | | society | Society | | finance | Finance | | life | Life | | wellness | Health | | education | Education | | law | Law | | ... | See full list |

Claude Desktop Integration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "news": {
      "command": "news-mcp",
      "args": ["serve", "--mode", "stdio"]
    }
  }
}

HTTP API Usage

# Initialize session
curl -X POST http://localhost:8080/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": {"name": "test", "version": "1.0"}
    },
    "id": 1
  }'

# Call tool (replace  with response from initialize)
curl -X POST http://localhost:8080/mcp \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: " \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "get_news",
      "arguments": {"category": "technology", "limit": 5}
    },
    "id": 2
  }'

# Health check
curl http://localhost:8080/health

Docker Deployment

# Run with default config
docker run -d -p 8080:8080 --name news-mcp kingingwang/news-mcp:latest

# With custom config
docker run -d -p 8080:8080 \
  -v /path/to/config.toml:/etc/news-mcp/config.toml \
  --name news-mcp kingingwang/news-mcp:latest

# With environment variables
docker run -d -p 8080:8080 \
  -e NEWS_MCP_INTERVAL=1800 \
  -e NEWS_MCP_LOG_LEVEL=debug \
  --name news-mcp kingingwang/news-mcp:latest

See [Docker Guide](examples/docker.md) for more details.

Development

# Run tests
cargo test
cargo test --test unit
cargo test --test e2e

# Format & lint
cargo fmt
cargo clippy

# Generate docs
cargo doc --open

Documentation

  • [Architecture](ARCHITECTURE.md) - System design and component overview
  • [Contributing](CONTRIBUTING.md) - Development guidelines
  • [Changelog](CHANGELOG.md) - Version history
  • [Examples](examples/) - Usage guides

License

MIT License - see [LICENSE](LICENSE)

Acknowledgments

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.