Skip to main content
Glama
AndyTheFactory

newspaper-mcp

Official

newspaper-mcp

一个 MCP 服务器,将 newspaper4k 的新闻文章发现和提取能力作为工具暴露给 LLM 智能体。基于官方 MCP Python SDK v2 构建。

工具

工具

描述

parse_article

下载并解析单篇文章(标题、作者、正文、图片、NLP)。

parse_articles

并发下载并解析多篇文章的 URL。

discover_source

爬取新闻网站的主页,获取品牌信息、分类、订阅源和文章。

list_source_articles

列出某个来源上发现的文章 URL/标题,支持分页。

search_news

按关键词/主题/网站/地点搜索 Google News(需要 gnews)。

extract_article_text

从原始 HTML 或 URL 快速提取纯文本(不含元数据/NLP)。

analyze_article

下载并运行 NLP:输出带分数的关键词和提取式摘要。

get_source_categories

列出某个来源的版块/分类 URL。

get_source_feeds

列出某个来源的 RSS/Atom 订阅源 URL。

Related MCP server: AllNewsAPI MCP

设置

该资料包依赖于位于仓库根目录的本地 newspaper4k checkout(通过 pyproject.toml 中的 tool.uv.sources 指定),因此始终使用库的在开发版本。

cd newspaper_mcp
uv sync

运行

uv run newspaper-mcp          # stdio transport (default)
uv run mcp dev src/newspaper_mcp/server.py   # MCP Inspector

要将其添加到 MCP 主机(例如 Claude Code、Claude Desktop),请让主机指向 uv run --directory /path/to/newspaper_mcp newspaper-mcp,作为 stdio 服务器运行。

备注

  • search_news 需要可选包 gnews,该包已通过 pyproject.toml 中声明的 newspaper4k[gnews] 额外依赖引入。

  • NLP 功能(nlp()、关键词提取、摘要)需要 nltk,该库通过 newspaper4k[nlp] 额外依赖引入。首次使用时,nltk 可能需要下载其 punkt 分词器数据。

  • 所有工具都会实时向目标新闻网站发出网络请求;调用之间没有任何缓存。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides AI agents access to news aggregation from 80,000+ sources via the NewsAPI. Supports both authenticated access with API keys and pay-per-use via HTTP 402 protocol with blockchain payment verification.
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to search for news articles, get top headlines, and access comprehensive news data with advanced filtering options through AllNewsAPI.
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to search news articles, get top headlines, and browse sources via the NewsAPI.org service.
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables fetching top headlines and searching news archives from NewsAPI.org, allowing AI agents to access current and historical news data.
    MIT

View all related MCP servers

Related MCP Connectors

  • Real-time corroborated news events + 5-year archive, for agents. Free tier, no key.

  • Real-time financial news for AI agents: search by ticker and source, with sentiment and entities.

  • Real-time curated crypto news for AI agents with sentiment, recaps, and search.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AndyTheFactory/newspaper4k-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server