Skip to main content
Glama
eluc1a

MCP News Server

by eluc1a

新闻-mcp MCP 服务器

mcp新闻服务器

成分

资源

服务器通过资源 URI 公开存储在数据库中的新闻文章:

  • news://{category}/{limit} :检索给定类别的最新文章列表。

    • {category} :按类别过滤文章(例如, tech 、 data_science 、 news )。完整列表请参阅工具说明。

    • {limit} (可选,默认为 10):指定要返回的最大文章数量。

  • 每篇返回的文章都包含标题、链接、发布日期和来源。

提示

服务器目前未公开任何提示。(摘要逻辑存在于内部,但无法通过 MCP 提示使用)。

工具

服务器实现了一个工具:

  • summarize_news :从数据库中检索原始新闻文章,允许客户端(LLM)对其进行总结。

    • 采用可选的category (字符串)和limit (整数,默认 20)参数。

    • 返回文章字典列表,每个字典包含id 、 title 、 link 、 published 、 source和content 。

    • 可用类别: tech 、 data_science 、 llm_tools 、 cybersecurity 、 linux 、 audio_dsp 、 startups 、 news 、 science 、 research 、 policy 。

Related MCP server: Juhe News MCP Server

配置

该服务器依赖于通过DATABASE_URL环境变量配置的 PostgreSQL 数据库(默认为postgresql://localhost/mcp_news )。

news_gatherer.py脚本(旨在单独运行/安排)从各种 RSS 提要填充数据库。

摘要逻辑(内部,不通过 MCP 公开)使用 OpenAI API,通过OPENAI_API_KEY环境变量进行配置。

其他配置(通过环境变量或默认值):

  • LOOKBACK_HOURS : news_gatherer.py回溯多久以前查找新文章(默认值:6)。

  • SUMMARY_WORD_TARGET :内部摘要的目标字数(默认值:500)。

  • MAX_ARTICLES_PER_SUMMARY :一批摘要中包含的最大文章数(默认值:25)。

  • KEYWORD_FILTER :内部摘要逻辑使用的关键字。

快速入门

安装

克劳德桌面

在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

发展

构建和发布

准备分发包:

  1. 同步依赖项并更新锁文件:

uv sync
  1. 构建软件包分发版:

uv build

这将在dist/目录中创建源和轮子分布。

  1. 发布到 PyPI:

uv publish

注意:您需要通过环境变量或命令标志设置 PyPI 凭据:

  • 令牌: --token或UV_PUBLISH_TOKEN

  • 或用户名/密码: --username / UV_PUBLISH_USERNAME和--password / UV_PUBLISH_PASSWORD

调试

由于 MCP 服务器通过 stdio 运行,调试起来可能比较困难。为了获得最佳调试体验,我们强烈建议使用MCP Inspector 。

您可以使用以下命令通过npm启动 MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory ~/dev/news-mcp run news-mcp 

启动后,检查器将显示一个 URL,您可以在浏览器中访问该 URL 以开始调试。

Available Tools

1 tool
add-noteC

Add a new note

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
contentYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only says 'Add a new note' and provides no details on side effects, permissions, return values, or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no wasted words, making it concise and front-loaded. However, it is under-specified for the tool's complexity, though this is largely a completeness issue rather than a conciseness issue.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, output schema, and parameter descriptions, a five-word description is insufficient for an agent to invoke the tool correctly. The meaning of the parameters and expected return behavior remain ambiguous.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero description coverage for the two required parameters ('name' and 'content'), and the description does not explain their meaning or format. The agent cannot infer what 'name' or 'content' represent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Add') and a specific resource ('note'), clearly stating the tool's function. It differentiates itself from the sibling 'get_report', which is a read operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description only states the action without any context about when to invoke it or when to choose a sibling tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool update
    • First observedadd-note

TDQS

C2.7/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'add-note' has a clear and distinct purpose that cannot be mistaken for any other tool in the set.

Naming Consistency5/5

The single tool name 'add-note' follows a consistent verb-noun pattern, and with only one tool, there is no inconsistency to evaluate. The naming is straightforward and predictable.

Tool Count2/5

A single tool is too few for a server named 'MCP News Server', which implies a broader scope related to news. This minimal toolset suggests an incomplete or trivial implementation that does not adequately cover the expected domain.

Completeness1/5

The tool surface is severely incomplete for a news server. It only allows adding notes, with no tools for retrieving, updating, deleting, or searching news items, nor any functionality specific to news like fetching headlines or articles. This leaves significant gaps that will cause agent failures.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol server that enables large language models to access the latest trending news headlines and detailed content across various categories including recommended, domestic, technology, and sports news.
    2
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server that provides Korean and global AI/tech news via 6 tools (categories, search, trending, article reading, daily briefing) without requiring an API key.
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A server that provides tools to search news articles and fetch top headlines using the GNews API.
    -