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
- Clone this repository:
git clone https://github.com/ltejedor/newsfeed-mcp.git
cd news-mcp
- 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
- 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 formatname1:url1;name2:url2LOG_LEVEL: Set logging level (INFO, DEBUG, WARNING, ERROR)
Usage with Claude for Desktop
-
Make sure you have Claude for Desktop installed and updated.
-
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
- On macOS:
-
Add your news server to the configuration:
{
"mcpServers": {
"news": {
"command": "python",
"args": [
"/ABSOLUTE/PATH/TO/news_mcp.py"
]
}
}
}
-
Restart Claude for Desktop.
-
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 articleslimit: 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 fetchlimit: 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz | 6.0 kB | Without provenance | Details for iflow_mcp_ltejedor_newsfeed_mcp-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for iflow_mcp_ltejedor_newsfeed_mcp-1.0.0-py3-none-any.whl |
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}
|
Security for iflow-mcp_ltejedor-newsfeed-mcp 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.