Skip to main content

A Model Context Protocol server that provides news information from various RSS feeds

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e2d09ff03da5ea4a0eb0097441869910c1382a16832312dd26f0f21145ff747e
MD5 2fce10d36409d7c958f7c848756a68f7
BLAKE2b-256 f5bc05858bc1ce606f917df52d789b4d05fb82b588c62e45569aaedf5503278d

See more details on using hashes here.

File details

Details for the file iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1980a95167df10cb279530b01472a269215132143099f817b3bfc1c9a2e3972
MD5 04b07f06f3e50e171097e79e04576ead
BLAKE2b-256 cea2f2b6a1a86d473e7fa035135a8c783463e148617df71ecb47944bc7a5f406

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page