News MCP
Provides access to news articles from a PostgreSQL database and offers a tool to summarize them using the OpenAI API.
news-mcp MCP server
mcp news server
Components
Resources
The server exposes news articles stored in a database via a resource URI:
news://{category}/{limit}: Retrieves a list of the latest articles for a given category.{category}: Filters articles by category (e.g.,tech,data_science,news). See tool description for full list.{limit}(optional, default 10): Specifies the maximum number of articles to return.
- Each returned article includes title, link, published date, and source.
Prompts
The server currently does not expose any prompts. (The summarization logic exists internally but is not available via an MCP prompt).
Tools
The server implements one tool:
summarize_news: Retrieves raw news articles from the database, allowing the client (LLM) to summarize them.- Takes optional
category(string) andlimit(integer, default 20) arguments. - Returns a list of article dictionaries, each containing
id,title,link,published,source, andcontent. - Available categories:
tech,data_science,llm_tools,cybersecurity,linux,audio_dsp,startups,news,science,research,policy.
- Takes optional
Configuration
The server relies on a PostgreSQL database configured via the DATABASE_URL environment variable (defaults to postgresql://localhost/mcp_news).
The news_gatherer.py script (intended to be run separately/scheduled) populates the database from various RSS feeds.
Summarization logic (internal, not exposed via MCP) uses the OpenAI API, configured via the OPENAI_API_KEY environment variable.
Other configurations (via environment variables or defaults):
LOOKBACK_HOURS: How far backnews_gatherer.pylooks for new articles (default: 6).SUMMARY_WORD_TARGET: Target word count for internal summarization (default: 500).MAX_ARTICLES_PER_SUMMARY: Maximum articles included in one summary batch (default: 25).KEYWORD_FILTER: Keywords used by internal summarization logic.
Quickstart
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development/Unpublished Servers Configuration
``` "mcpServers": { "news-mcp": { "command": "uv", "args": [ "--directory", "~/dev/news-mcp", "run", "news-mcp" ] } } ```Published Servers Configuration
``` "mcpServers": { "news-mcp": { "command": "uvx", "args": [ "news-mcp" ] } } ```Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory ~/dev/news-mcp run news-mcp
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Похожие серверы
Hyteria MCP
A server for looking up the daily menu at the Hyteria (B1) restaurant.
创思大模型安全 MCP
A content security protection system for large language models, providing real-time risk identification and interception to ensure safe and compliant applications.
Transkribus MCP Server
MCP server for the Transkribus REST API — manage collections, documents, HTR/OCR recognition, models, and more. 290 tools across 22 resource domains.
MCP Media Processing Server
A server for media processing, offering powerful video and image manipulation using FFmpeg and ImageMagick.
OpenDART MCP
orean corporate disclosure & financial data from DART (금융감독원 전자공시시스템). Search companies, filings, and financial statements via OpenDART API.
Stock Market Tracker
MCP server for advanced financial analysis, stock monitoring, and real-time market intelligence to support buy/sell decisions
Lcontext
An MCP server that exposes user behavior as queryable data for AI coding agents.
CryptoAPIs MCP Market Data
MCP server for cryptocurrency asset prices, exchange rates, and market metadata via Crypto APIs
ThinkPLC-MCP
Interface with SIEMENS PLC S7-1500/1200 using their JSON-RPC 2.0 API, exposing PLC functionalities as MCP tools for programmatic interaction.
YouTube Playlist Generator MCP Server
A Model Context Protocol (MCP) server that enables AI applications to search for YouTube music videos and manage playlists using the official YouTube Data API v3.