hn-server logo

hn-serverHacker新闻MCP服务器

(0)
Daniel Nikulshyn审阅者 Daniel Nikulshyn·更新 2026年7月

概览

hn-server 是一个 Model Context Protocol (MCP) 服务器,提供用于从 Hacker News 获取故事的工具。该服务器解析 news.ycombinator.com 的 HTML 内容,并为不同类型的故事(top、new、ask、show、jobs)提供结构化数据。 服务器功能包括获取不同类型的故事、获取结构化数据(标题、URL、积分、作者、时间戳、评论数),以及可配置的返回故事数量限制。它还包含干净的错误处理和验证。 要使用该服务器,用户必须克隆仓库、安装依赖项并构建服务器。随后,用户可以在设置中配置 MCP 服务器,并通过自然语言接口与 Hacker News 交互,从而将该服务器与 Claude 等工具一起使用。 该服务器使用 TypeScript、Model Context Protocol SDK、Axios 进行 HTTP 请求,以及 Cheerio 进行 HTML 解析构建。它为多种情况提供了完善的错误处理,例如无效的故事类型、网络失败、HTML 解析错误以及无效参数值。

主要功能

  • 获取不同类型的故事(top、new、ask、show、jobs)
  • 获取结构化数据,包括标题、URL、积分、作者、时间戳和评论数
  • 可配置返回的故事数量限制
  • 清晰的错误处理和验证
  • 与 Claude 集成,支持自然语言接口

价格

模型
Free
评分
暂无评价

使用场景

获取精选故事

使用get_stories工具从Hacker News获取前5名故事,包括标题、网址、分数、作者、时间戳和评论数。

与Claude交互

将hn-server与Claude配置为使用自然语言与Hacker News交互,例如 '给我看Hacker News上的前5名故事' 或 '最新的Ask HN帖子是什么?'。

优点 & 缺点

优点

  • 为不同类型的Hacker News故事提供结构化数据
  • 可配置的返回故事数量限制
  • 强大的错误处理和验证
  • 与Claude集成,实现自然语言交互

缺点

  • 需要技术设置和配置
  • 仅限于从Hacker News获取故事

评测

登录以留下评测。

暂无评测。来当第一个吧!

问答

Does hn‑server support other platforms besides Claude?

The server exposes a standard MCP interface, so any tool that can consume MCP endpoints—including other AI assistants—can integrate with it.

Asked by Ludovic Girard · Mar 3, 2026

What data fields does hn‑server provide for each story?

Each story includes its title, URL, points, author, timestamp, and comment count, all returned in structured JSON for easy consumption.

Asked by Bruno Kaufmann · Feb 22, 2026

Can I limit how many stories the server returns?

Yes, the server allows you to set a configurable limit on the number of stories returned for each request, giving you control over the payload size.

Asked by Jovana Petrovic · Jan 1, 2026

How do I deploy hn‑server to start fetching Hacker News stories?

Clone the GitHub repo, install dependencies via your package manager, then build and run the server. Once running, configure the MCP endpoint in your client (e.g., Claude) to use the server.

Asked by Idris Suleiman · Dec 10, 2025

提问

服务配缩器 的替代品