Skip to main content

News MCP Server

A Model Context Protocol (MCP) server that provides news information from various RSS feeds, designed to integrate with AI assistants like Claude.

Features

  • Get the latest news from various categories (tech, business, science, etc.)
  • Search for news articles matching specific terms
  • View articles from specific feeds
  • Get detailed information about individual articles
  • Caching to improve performance and reduce load on RSS sources
  • Configurable via environment variables

Installation

Prerequisites

  • Python 3.10 or higher
  • MCP SDK 1.2.0 or higher

Setup

  1. Clone this repository:
git clone https://github.com/ltejedor/newsfeed-mcp.git
cd news-mcp
  1. Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Run the server:
python news_mcp.py

Docker Installation

To run the server using Docker:

docker-compose up -d

Configuration

The server can be configured using environment variables:

  • NEWS_MCP_CUSTOM_FEEDS: Additional RSS feeds in the format name1:url1;name2:url2
  • LOG_LEVEL: Set logging level (INFO, DEBUG, WARNING, ERROR)

Usage with Claude for Desktop

  1. Make sure you have Claude for Desktop installed and updated.

  2. Open your Claude for Desktop App configuration:

    • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add your news server to the configuration:

{
    "mcpServers": {
        "news": {
            "command": "python",
            "args": [
                "/ABSOLUTE/PATH/TO/news_mcp.py"
            ]
        }
    }
}
  1. Restart Claude for Desktop.

  2. Look for the hammer icon (🔨) in Claude for Desktop to access your tools.

Available Tools

The server provides the following tools:

health_check()

Check if the server is running properly and get basic stats.

list_available_feeds()

Get a list of all available feeds and categories.

Example usage in Claude:

What news feeds do you have available?

get_latest_news(category, limit)

Get recent news articles, optionally filtered by category.

Parameters:

  • category: Optional - Filter by category (tech, general, business, science, travel, politics)
  • limit: Optional - Maximum number of articles to return (default: 5, max: 20)

Example usage in Claude:

Show me the latest tech news

search_news(query, limit)

Search for news articles matching a specific term.

Parameters:

  • query: Search term to look for in news articles
  • limit: Optional - Maximum number of articles to return (default: 5, max: 20)

Example usage in Claude:

Search for news about climate change

get_feed_content(feed_name, limit)

Get articles from a specific feed.

Parameters:

  • feed_name: Name of the feed to fetch
  • limit: Optional - Maximum number of articles to return (default: 5, max: 20)

Example usage in Claude:

Get articles from the NASA feed

get_article_details(url)

Get detailed information about an article by URL.

Parameters:

  • url: The URL of the article to retrieve details for

Example usage in Claude:

Tell me more about this article: https://www.example.com/article

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for iflow-mcp_ltejedor-newsfeed-mcp 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_ltejedor-newsfeed-mcp 1.0.0
File Size Uploaded
iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_ltejedor-newsfeed-mcp 1.0.0
File Interpreter ABI Platform
iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz

Download URL iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e2d09ff03da5ea4a0eb0097441869910c1382a16832312dd26f0f21145ff747e
BLAKE2b-256 checksum
How to use checksums
f5bc05858bc1ce606f917df52d789b4d05fb82b588c62e45569aaedf5503278d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl

Download URL iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1980a95167df10cb279530b01472a269215132143099f817b3bfc1c9a2e3972
BLAKE2b-256 checksum
How to use checksums
cea2f2b6a1a86d473e7fa035135a8c783463e148617df71ecb47944bc7a5f406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page