mcp-news
Documentation
news-mcp MCP server
mcp news server
IMPORTANT
- Do not begin coding unless the user asks you to. If the user is asking a question about the code, answer the question - do not write or modify code unless explicitly asked.
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) and `limit` (integer, default 20) arguments.
- Returns a list of article dictionaries, each containing `id`, `title`, `link`, `published`, `source`, and `content`.
- Available categories: `tech`, `data_science`, `llm_tools`, `cybersecurity`, `linux`, `audio_dsp`, `startups`, `news`, `science`, `research`, `policy`.
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 back `news_gatherer.py` looks 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:
1. Sync dependencies and update lockfile:
uv sync2. Build package distributions:
uv buildThis will create source and wheel distributions in the `dist/` directory.
3. Publish to PyPI:
uv publishNote: You'll need to set PyPI credentials via environment variables or command flags:
- Token: `--token` or `UV_PUBLISH_TOKEN`
- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--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-mcpUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Frequently asked questions
What is mcp-news?
mcp-news is a Model Context Protocol (MCP) server listed in the TrackMCP directory.
How do I install mcp-news?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-news open source?
Yes — it is hosted on GitHub at https://github.com/eluc1a/mcp-news and has 3 stars.
Related MCP tools
5. Update .env file in the root directory with your mem0 API key: for the Model Context Protocol. Enhance AI assistants with powerful integrations.
Model Context Protocol integration for Python. Enhance AI assistants with powerful Python-based capabilities and integration support.
This repository contains Model Context Protocol (MCP) servers that enable MCP clients (like Claude Desktop or the cline.
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP